@Override public synchronized DependencyRelationship cloneFor( final ProjectVersionRef projectRef ) { return new SimpleDependencyRelationship( getSources(), getPomLocation(), projectRef, getTarget(), scope, getIndex(), isManaged(), isInherited(), optional ); }
@Override public String toString() { return String.format( "DependencyRelationship [%s => %s (managed=%s, scope=%s, index=%s)]", getDeclaring(), getTarget(), isManaged(), scope, getIndex() ); }
@Override public boolean isBOM() { return DependencyScope._import == getScope() && "pom".equals( getTargetArtifact().getType() ); }
@Override public DependencyRelationship detach() { return new SimpleDependencyRelationship( this ); }
public static DependencyRelationship dependency( final URI source, final URI pomLocation, final ProjectVersionRef owner, final ProjectVersionRef dep, final DependencyScope scope, final int index, final boolean managed, final boolean inherited, final boolean optional ) throws InvalidVersionSpecificationException { return new SimpleDependencyRelationship( source, pomLocation, owner, artifact( dep, null, null ), scope, index, managed, inherited, optional ); }
@Override public DependencyRelationship addSource( final URI source ) { Set<URI> srcs = getSources(); srcs.add( source ); return new SimpleDependencyRelationship( srcs, getPomLocation(), getDeclaring(), getTarget(), scope, getIndex(), isManaged(), isInherited(), optional ); }
public static DependencyRelationship dependency( final URI source, final ProjectVersionRef owner, final String groupId, final String artifactId, final String version, final String type, final String classifier, final boolean optional, final DependencyScope scope, final int index, final boolean managed, final boolean inherited ) throws InvalidVersionSpecificationException { return new SimpleDependencyRelationship( source, owner, artifact( groupId, artifactId, version, type, classifier ), scope, index, managed, inherited, optional ); }
@Override public DependencyRelationship addSources( final Collection<URI> sources ) { Set<URI> srcs = getSources(); srcs.addAll( sources ); return new SimpleDependencyRelationship( srcs, getPomLocation(), getDeclaring(), getTarget(), scope, getIndex(), isManaged(), isInherited(), optional ); }
public static DependencyRelationship dependency( final URI source, final URI pomLocation, final ProjectVersionRef owner, final ProjectVersionRef dep, final String type, final String classifier, final boolean optional, final DependencyScope scope, final int index, final boolean managed, final boolean inherited ) throws InvalidVersionSpecificationException { return new SimpleDependencyRelationship( source, pomLocation, owner, artifact( dep, type, classifier ), scope, index, managed, inherited, optional ); }
@Override public DependencyRelationship selectDeclaring( final ProjectVersionRef ref ) { final ArtifactRef t = getTarget(); Set<ProjectRef> var = getExcludes(); return new SimpleDependencyRelationship( getSources(), getPomLocation(), ref, t, getScope(), getIndex(), isManaged(), isInherited(), optional, var.toArray( new ProjectRef[var.size()] ) ); }
public static DependencyRelationship dependency( final URI source, final ProjectVersionRef owner, final ProjectVersionRef dep, final DependencyScope scope, final int index, final boolean managed, final boolean inherited, final boolean optional ) throws InvalidVersionSpecificationException { return new SimpleDependencyRelationship( source, owner, artifact( dep, null, null ), scope, index, managed, inherited, optional ); }
@Override public DependencyRelationship selectTarget( final ProjectVersionRef ref ) { final ProjectVersionRef d = getDeclaring(); ArtifactRef t = getTarget(); t = (ArtifactRef) ( ( ref instanceof ArtifactRef ) ? ref : new SimpleArtifactRef( ref, t.getType(), t.getClassifier() ) ); Set<ProjectRef> var = getExcludes(); return new SimpleDependencyRelationship( getSources(), getPomLocation(), d, t, getScope(), getIndex(), isManaged(), isInherited(), optional, var.toArray( new ProjectRef[var.size()] ) ); }
public static DependencyRelationship dependency( final URI source, final ProjectVersionRef owner, final ProjectVersionRef dep, final String type, final String classifier, final boolean optional, final DependencyScope scope, final int index, final boolean managed, final boolean inherited ) throws InvalidVersionSpecificationException { return new SimpleDependencyRelationship( source, owner, artifact( dep, type, classifier ), scope, index, managed, inherited, optional ); }
public static DependencyRelationship dependency( final URI source, final URI pomLocation, final ProjectVersionRef owner, final String groupId, final String artifactId, final String version, final String type, final String classifier, final boolean optional, final DependencyScope scope, final int index, final boolean managed, final boolean inherited ) throws InvalidVersionSpecificationException { return new SimpleDependencyRelationship( source, pomLocation, owner, artifact( groupId, artifactId, version, type, classifier ), scope, index, managed, inherited, optional ); }
public Builder withDependency( final ProjectVersionRef ref, final String type, final String classifier, final DependencyScope scope, final boolean managed, final boolean inherited, final boolean optional ) { withDependencies( new SimpleDependencyRelationship( source, ref, new SimpleArtifactRef( ref, type, classifier ), scope, getNextDependencyIndex( managed ), managed, inherited, optional ) ); return this; }
rel = new SimpleDependencyRelationship( sources, pomLocation, declaring, target, scope, index, managed, inherited, optional ); break;
rel = new SimpleDependencyRelationship( sources, pomLocation, declaring, target, scope, index, managed, inherited, optional ); break;
new SimpleDependencyRelationship( dep.getSources(), dep.getPomLocation(), ref, dep.getTargetArtifact(), DependencyScope.embedded, dep.getIndex(), false, dep.isInherited(), dep.isOptional(), excludedRefs );
new SimpleDependencyRelationship( dep.getSources(), dep.getPomLocation(), ref, dep.getTargetArtifact(), DependencyScope.embedded, dep.getIndex(), false, dep.isInherited(), dep.isOptional(), excludedRefs );
new SimpleDependencyRelationship( dep.getSources(), ref, dep.getTargetArtifact(), DependencyScope.embedded, dep.getIndex(), false, depView.getOriginInfo().isInherited(), new SimpleDependencyRelationship( source, RelationshipUtils.profileLocation( depView.getProfileId() ), ref, depView.asArtifactRef(), DependencyScope.embedded,