public String getRemoteFilename() { return getFilename(); }
public void put( Artifact artifact, boolean resolveManagedVersions, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories, ResolutionGroup result ) { put( newCacheKey( artifact, resolveManagedVersions, localRepository, remoteRepositories ), result ); }
private static int repositoriesHashCode( List<ArtifactRepository> repositories ) { int result = 17; for ( ArtifactRepository repository : repositories ) { result = 31 * result + repositoryHashCode( repository ); } return result; }
/** * @todo the lazy initialisation of this makes me uneasy. * @return {@link Set} < {@link Artifact} > */ public Set createArtifacts( ArtifactFactory artifactFactory, String inheritedScope, ArtifactFilter dependencyFilter ) throws InvalidDependencyVersionException { return MavenMetadataSource.createArtifacts( artifactFactory, getDependencies(), inheritedScope, dependencyFilter, this ); }
/** {@inheritDoc} */ public int hashCode() { int result = 17; result = 37 * result + getGroupId().hashCode(); result = 37 * result + getArtifactId().hashCode(); result = 37 * result + getType().hashCode(); if ( getVersion() != null ) { result = 37 * result + getVersion().hashCode(); } result = 37 * result + ( getClassifier() != null ? getClassifier().hashCode() : 0 ); return result; }
public ProjectArtifact( MavenProject project ) { super( project.getGroupId(), project.getArtifactId(), project.getVersion(), null, "pom", null, new PomArtifactHandler() ); this.project = project; setFile( project.getFile() ); setResolved( true ); }
public PluginArtifact( Plugin plugin, Artifact pluginArtifact ) { super( plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion(), null, "maven-plugin", null, new PluginArtifactHandler() ); this.plugin = plugin; setFile( pluginArtifact.getFile() ); setResolved( true ); }
@Override public CacheRecord put( Key key, LifecycleExecutionException exception ) { Objects.requireNonNull( exception, "exception cannot be null" ); assertUniqueKey( key ); CacheRecord record = new CacheRecord( exception ); cache.put( key, record ); return record; }
private String getFilename() { return getArtifactId() + "-" + artifact.getVersion() + ".pom"; }
private static boolean repositoryEquals( ArtifactRepository r1, ArtifactRepository r2 ) { if ( r1 == r2 ) { return true; } return eq( r1.getId(), r2.getId() ) && eq( r1.getUrl(), r2.getUrl() ) && repositoryPolicyEquals( r1.getReleases(), r2.getReleases() ) && repositoryPolicyEquals( r1.getSnapshots(), r2.getSnapshots() ); }
protected CacheKey newCacheKey( Artifact artifact, boolean resolveManagedVersions, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories ) { return new CacheKey( artifact, resolveManagedVersions, localRepository, remoteRepositories ); }
public void merge( org.apache.maven.repository.legacy.metadata.ArtifactMetadata metadata ) { this.merge( (ArtifactMetadata) metadata ); } }
@Override public CacheRecord get( Key key ) throws LifecycleExecutionException { CacheRecord cacheRecord = cache.get( key ); if ( cacheRecord != null && cacheRecord.getException() != null ) { throw cacheRecord.getException(); } return cacheRecord; }
public InvalidDependencyVersionException( String projectId, Dependency dependency, File pomFile, InvalidVersionSpecificationException cause ) { super( projectId, formatLocationInPom( dependency ), dependency.getVersion(), pomFile, cause ); this.dependency = dependency; }
@Override public Key createKey( MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve, boolean aggregating, RepositorySystemSession session ) { return new CacheKey( project, project.getRemoteProjectRepositories(), scopesToCollect, scopesToResolve, aggregating, session ); }
private static boolean repositoryPolicyEquals( ArtifactRepositoryPolicy p1, ArtifactRepositoryPolicy p2 ) { if ( p1 == p2 ) { return true; } return p1.isEnabled() == p2.isEnabled() && eq( p1.getUpdatePolicy(), p2.getUpdatePolicy() ); }
@Override public Set<Artifact> createArtifacts( MavenProject project ) throws InvalidDependencyVersionException { return MavenMetadataSource.createArtifacts( artifactFactory, project.getDependencies(), null, null, project ); }
public String getLocalFilename( ArtifactRepository repository ) { return getFilename(); }
public String getRemoteFilename() { return getFilename(); }
public String getLocalFilename( ArtifactRepository repository ) { return getFilename(); }