public FailedToResolveDependency(Dependency dependency, Exception cause) { super("Failed to resolve dependency of " + dependency.getArtifact() + ". " + cause.getMessage(), cause); this.dependency = dependency; }
public FailedToResolveDependency(Dependency dependency, Exception cause) { super("Failed to resolve dependency of " + dependency.getArtifact() + ". " + cause.getMessage(), cause); this.dependency = dependency; }
private boolean isNewer(Dependency dep1, Dependency dep2) { return isNewer(dep1.getArtifact(), dep2.getArtifact()); }
public boolean traverseDependency( Dependency dependency ) { String prop = dependency.getArtifact().getProperty( ArtifactProperties.INCLUDES_DEPENDENCIES, "" ); return !Boolean.parseBoolean( prop ); }
public boolean selectDependency( Dependency dependency ) { Artifact artifact = dependency.getArtifact(); for ( Exclusion exclusion : exclusions ) { if ( matches( exclusion, artifact ) ) { return false; } } return true; }
public static DependencyId newInstance(Dependency dependency) { return newInstance(dependency.getArtifact()); }
@Override public String toString() { return String.valueOf( getArtifact() ) + " (" + getScope() + ( isOptional() ? "?" : "" ) + ")"; }
@Override public String toString() { return String.valueOf( getArtifact() ) + " (" + getScope() + ( isOptional() ? "?" : "" ) + ")"; }
@Override public String toString() { return String.valueOf( getArtifact() ) + " (" + getScope() + ( isOptional() ? "?" : "" ) + ")"; }
@Override public boolean accept(final DependencyNode node, final List<DependencyNode> parents) { final Dependency dependency = node.getDependency(); if (dependency == null) { return false; } final String groupId = dependency.getArtifact().getGroupId(); final boolean accept = groupId.startsWith(prefix); return accept; }
public DependencyTree(DependencyId dependencyId, Dependency dependency, List<DependencyTree> children) { this(dependencyId, dependency.getArtifact().getVersion(), children); this.scope = dependency.getScope(); this.optional = dependency.isOptional(); }
public void recordDependencyResolutionFinished(final List<Dependency> resolvedDependencies) { checkNotNull(resolvedDependencies); log.debug("Recording dependencies for {}:", resolvingProjectCoordinates); for (Dependency dependency : resolvedDependencies) { log.debug(" {}", dependency.toString()); if (isResolvingProjectRequests()) { ArtifactDTO artifactDto = MavenArtifactConverter.convertAetherArtifact(dependency.getArtifact()); artifactDto.withDependentProjects(MavenProjectDTOHelper.asId(resolvingProjectCoordinates)); recordArtifact(artifactDto); dependencyArtifactCount++; } } }
public void recordDependencyResolutionFinished(final List<Dependency> resolvedDependencies) { checkNotNull(resolvedDependencies); log.debug("Recording dependencies for {}:", resolvingProjectCoordinates); for (Dependency dependency : resolvedDependencies) { log.debug(" {}", dependency.toString()); if (isResolvingProjectRequests()) { ArtifactDTO artifactDto = MavenArtifactConverter.convertAetherArtifact(dependency.getArtifact()); artifactDto.withDependentProjects(MavenProjectDTOHelper.asId(resolvingProjectCoordinates)); recordArtifact(artifactDto); dependencyArtifactCount++; } } }
@Override public DependencySelector deriveChildSelector(DependencyCollectionContext context) { if ((depth > 0) && FORGE_ADDON.equals(context.getDependency().getArtifact().getClassifier())) { return new StaticDependencySelector(false); } return new AddonDependencySelector(context.getDependency(), depth + 1); }
public DependencyTree(DependencyId dependencyId, Dependency dependency, List<DependencyTree> children) { this(dependencyId, dependency.getArtifact().getBaseVersion(), children); this.scope = dependency.getScope(); this.optional = dependency.isOptional(); init(children); }
@Override public boolean matches(Dependency dependencyTree) { Artifact artifact = dependencyTree.getArtifact(); String groupId = artifact.getGroupId(); String artifactId = artifact.getArtifactId(); return groupFilter.matches(groupId) && artifactFilter.matches(artifactId); }
public DependencyTree(DependencyId dependencyId, Dependency dependency, List<DependencyTree> children) { this(dependencyId, dependency.getArtifact().getBaseVersion(), children); this.scope = dependency.getScope(); this.optional = dependency.isOptional(); init(children); }
@Override public boolean matches(Dependency dependencyTree) { Artifact artifact = dependencyTree.getArtifact(); String groupId = artifact.getGroupId(); String artifactId = artifact.getArtifactId(); return groupFilter.matches(groupId) && artifactFilter.matches(artifactId); }
private Artifact getDependencyArtifact( Dependency dep ) { Artifact mavenArtifact = RepositoryUtils.toArtifact( dep.getArtifact() ); mavenArtifact.setScope( dep.getScope() ); mavenArtifact.setOptional( dep.isOptional() ); return mavenArtifact; }
private Artifact getDependencyArtifact( Dependency dep ) { org.sonatype.aether.artifact.Artifact artifact = dep.getArtifact(); return factory.createDependencyArtifact( artifact.getGroupId(), artifact.getArtifactId(), VersionRange.createFromVersion( artifact.getVersion() ), artifact.getProperty( "type", artifact.getExtension() ), artifact.getClassifier(), dep.getScope(), dep.isOptional() ); }