if ( gav.getSnapshotTimeStamp() != null ) long itemTimestamp = gav.getSnapshotTimeStamp().longValue();
protected Gav getPomGav( ArtifactStoreRequest request ) { Gav pomGav = new Gav( request.getGav().getGroupId(), // groupId request.getGav().getArtifactId(), // artifactId request.getGav().getVersion(), // version null, // classifier "pom", // extension request.getGav().getSnapshotBuildNumber(), // snapshotBuildNumber request.getGav().getSnapshotTimeStamp(), // snapshotTimeStamp null, // name false, // hash null, // hashType false, // signature null // signatureType ); return pomGav; }
public static org.apache.maven.index.artifact.Gav convert(final Gav gav) { final org.apache.maven.index.artifact.Gav.HashType ht = gav.getHashType() != null ? org.apache.maven.index.artifact.Gav.HashType.valueOf(gav.getHashType().name()) : null; final org.apache.maven.index.artifact.Gav.SignatureType st = gav.getSignatureType() != null ? org.apache.maven.index.artifact.Gav.SignatureType .valueOf(gav.getSignatureType().name()) : null; return new org.apache.maven.index.artifact.Gav(gav.getGroupId(), gav.getArtifactId(), gav.getVersion(), gav.getClassifier(), gav.getExtension(), gav.getSnapshotBuildNumber(), gav.getSnapshotTimeStamp(), gav.getName(), gav.isHash(), ht, gav.isSignature(), st); }
resource.setSnapshotBuildNumber(resolvedGav.getSnapshotBuildNumber()); resource.setSnapshotTimeStamp(resolvedGav.getSnapshotTimeStamp());
resource.setSnapshotTimeStamp( resolvedGav.getSnapshotTimeStamp() );
public StorageFileItem retrieveArtifactPom( ArtifactStoreRequest gavRequest ) throws IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { Gav pomGav = new Gav( gavRequest.getGav().getGroupId(), gavRequest.getGav().getArtifactId(), gavRequest.getGav().getVersion(), null, // gavRequest.getGav().getClassifier(), "pom", // gavRequest.getGav().getExtension(), gavRequest.getGav().getSnapshotBuildNumber(), gavRequest.getGav().getSnapshotTimeStamp(), gavRequest.getGav().getName(), gavRequest.getGav().isHash(), gavRequest.getGav().getHashType(), gavRequest.getGav().isSignature(), gavRequest.getGav().getSignatureType() ); ArtifactStoreRequest pomRequest = new ArtifactStoreRequest( gavRequest.getMavenRepository(), pomGav, gavRequest.isRequestLocalOnly(), gavRequest.isRequestRemoteOnly() ); return retrieveArtifact( pomRequest ); }