/** {@inheritDoc} */ public boolean isSnapshot() { return artifact.isSnapshot(); }
public boolean isSnapshot() { return parent.isSnapshot(); }
/** {@inheritDoc} */ public boolean isSnapshot() { return artifact.isSnapshot(); }
public boolean isSnapshot() { return parent.isSnapshot(); }
public boolean isSnapshot() { return artifact.isSnapshot(); }
/** * Checks if the current artifact is actually in the reactor projects. If * true a virtual dependency is created based on the evidence in the * project. * * @param engine a reference to the engine being used to scan * @param artifact the artifact being analyzed in the mojo * @return <code>true</code> if the artifact is a snapshot artifact in the * reactor; otherwise <code>false</code> */ private boolean addSnapshotReactorDependency(Engine engine, Artifact artifact) { if (!artifact.isSnapshot()) { return false; } return addVirtualDependencyFromReactor(engine, artifact, "Found snapshot reactor project in aggregate for %s - " + "creating a virtual dependency as the snapshot found in the repository may contain outdated dependencies."); }
public ArtifactRepository getDistributionManagementArtifactRepository() { return getArtifact().isSnapshot() && ( getSnapshotArtifactRepository() != null ) ? getSnapshotArtifactRepository() : getReleaseArtifactRepository(); }
public ArtifactRepository getDistributionManagementArtifactRepository() { return getArtifact().isSnapshot() && ( getSnapshotArtifactRepository() != null ) ? getSnapshotArtifactRepository() : getReleaseArtifactRepository(); }
public boolean isStale() { File pomFile = pomArtifact.getFile(); if ( pomFile != null ) { if ( pomFile.canRead() ) { return length != pomFile.length() || timestamp != pomFile.lastModified(); } else { // if the POM didn't exist, retry if any repo is configured to always update boolean snapshot = pomArtifact.isSnapshot(); for ( ArtifactRepository repository : remoteRepositories ) { ArtifactRepositoryPolicy policy = snapshot ? repository.getSnapshots() : repository.getReleases(); if ( ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS.equals( policy.getUpdatePolicy() ) ) { return true; } } } } return length != -1 || timestamp != -1; } }
public void transformForInstall( Artifact artifact, ArtifactRepository localRepository ) { if ( artifact.isSnapshot() ) { Snapshot snapshot = new Snapshot(); snapshot.setLocalCopy( true ); RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact, snapshot ); artifact.addMetadata( metadata ); } }
public void transformForResolve( Artifact artifact, RepositoryRequest request ) throws ArtifactResolutionException { // Only select snapshots that are unresolved (eg 1.0-SNAPSHOT, not 1.0-20050607.123456) if ( artifact.isSnapshot() && artifact.getBaseVersion().equals( artifact.getVersion() ) ) { try { String version = resolveVersion( artifact, request ); artifact.updateVersion( version, request.getLocalRepository() ); } catch ( RepositoryMetadataResolutionException e ) { throw new ArtifactResolutionException( e.getMessage(), artifact, e ); } } }
public int getNature() { if ( artifact.getVersion() != null ) { return artifact.isSnapshot() ? SNAPSHOT : RELEASE; } VersionRange range = artifact.getVersionRange(); if ( range != null ) { for ( Restriction restriction : range.getRestrictions() ) { if ( isSnapshot( restriction.getLowerBound() ) || isSnapshot( restriction.getUpperBound() ) ) { return RELEASE_OR_SNAPSHOT; } } } return RELEASE; }
if ( !projectArtifact.isSnapshot() && ( status.compareTo( ArtifactStatus.DEPLOYED ) < 0 ) )
ArtifactRepositoryPolicy policy = artifact.isSnapshot() ? repository.getSnapshots() : repository.getReleases(); else if ( artifact.isSnapshot() || !artifact.getFile().exists() )
artifact.setResolved( true ); if ( artifact.isSnapshot() )
ArtifactRepositoryPolicy policy = artifact.isSnapshot() ? repository.getSnapshots() : repository.getReleases();
if ( artifact.isSnapshot() )
if ( !artifact.isSnapshot() || Artifact.LATEST_VERSION.equals( artifact.getBaseVersion() ) )
public void transformForDeployment( Artifact artifact, ArtifactRepository remoteRepository, ArtifactRepository localRepository ) throws ArtifactDeploymentException { if ( artifact.isSnapshot() ) { Snapshot snapshot = new Snapshot(); snapshot.setTimestamp( getDeploymentTimestamp() ); // we update the build number anyway so that it doesn't get lost. It requires the timestamp to take effect try { int buildNumber = resolveLatestSnapshotBuildNumber( artifact, localRepository, remoteRepository ); snapshot.setBuildNumber( buildNumber + 1 ); } catch ( RepositoryMetadataResolutionException e ) { throw new ArtifactDeploymentException( "Error retrieving previous build number for artifact '" + artifact.getDependencyConflictId() + "': " + e.getMessage(), e ); } RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact, snapshot ); artifact.setResolvedVersion( constructVersion( metadata.getMetadata().getVersioning(), artifact.getBaseVersion() ) ); artifact.addMetadata( metadata ); } }
if ( artifact.isSnapshot() )