public NeoProjectVersionRef( final ProjectRef ref, final String versionSpec ) throws InvalidVersionSpecificationException { this( ref.getGroupId(), ref.getArtifactId(), versionSpec ); }
public <T extends ProjectRef> SimpleProjectRef( final ProjectRef ref ) { this.groupId = ref.getGroupId(); this.artifactId = ref.getArtifactId(); }
@Override public int compareTo( final ProjectRef o ) { int comp = groupId.compareTo( o.getGroupId() ); if ( comp == 0 ) { comp = artifactId.compareTo( o.getArtifactId() ); } return comp; }
public SimpleProjectVersionRef( final ProjectRef ref, final String versionSpec ) throws InvalidVersionSpecificationException { this( ref.getGroupId(), ref.getArtifactId(), versionSpec ); }
public SimpleProjectVersionRef( final ProjectRef ref, final VersionSpec versionSpec ) { this( ref.getGroupId(), ref.getArtifactId(), versionSpec, null ); }
public NeoProjectRef(final ProjectRef ref) { if ( ref instanceof NeoProjectRef) { NeoProjectRef npr = (NeoProjectRef) ref; container = npr.container; this.groupId = npr.groupId; this.artifactId = npr.artifactId; this.groupIdProperty = npr.groupIdProperty; this.artifactIdProperty = npr.artifactIdProperty; } else { groupId = ref.getGroupId(); artifactId = ref.getArtifactId(); } }
@Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( obj == null ) { return false; } if ( !(obj instanceof ProjectRef) ) { return false; } final ProjectRef other = (ProjectRef) obj; if ( !artifactId.equals( other.getArtifactId() ) ) { return false; } return groupId.equals( other.getGroupId() ); }
@Override public int compareTo( final ProjectRef o ) { int comp = getGroupId().compareTo( o.getGroupId() ); if ( comp == 0 ) { comp = getArtifactId().compareTo( o.getArtifactId() ); } return comp; }
public NeoVersionlessArtifactRef( final ProjectRef ref, final TypeAndClassifier tc ) { super( ref.getGroupId(), ref.getArtifactId() ); this.tc = tc == null ? new NeoTypeAndClassifier() : tc; }
public NeoVersionlessArtifactRef( final ProjectRef ref, final String type, final String classifier ) { super( ref.getGroupId(), ref.getArtifactId() ); this.tc = new NeoTypeAndClassifier( type, classifier ); }
public SimpleVersionlessArtifactRef( final ProjectRef ref, final TypeAndClassifier tc ) { super( ref.getGroupId(), ref.getArtifactId() ); this.tc = tc == null ? new SimpleTypeAndClassifier() : tc; }
public SimpleVersionlessArtifactRef( final ProjectRef ref, final String type, final String classifier ) { super( ref.getGroupId(), ref.getArtifactId() ); this.tc = new SimpleTypeAndClassifier( type, classifier ); }
@Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( obj == null ) { return false; } if ( !(obj instanceof ProjectRef) ) { return false; } final ProjectRef other = (ProjectRef) obj; if ( !getArtifactId().equals( other.getArtifactId() ) ) { return false; } return getGroupId().equals( other.getGroupId() ); }
@Override public boolean matches( final ProjectRef ref ) { if ( equals( ref ) ) { return true; } final String gidPattern = toWildcard( getGroupId() ); if ( !ref.getGroupId() .matches( gidPattern ) ) { return false; } final String aidPattern = toWildcard( getArtifactId() ); return ref.getArtifactId().matches( aidPattern ); }
@Override public boolean matches( final ProjectRef ref ) { if ( equals( ref ) ) { return true; } final String gidPattern = toWildcard( getGroupId() ); if ( !ref.getGroupId() .matches( gidPattern ) ) { return false; } final String aidPattern = toWildcard( getArtifactId() ); return ref.getArtifactId().matches( aidPattern ); }
sb.append( exclude.getGroupId() ).append( ":" ).append( exclude.getArtifactId() ); relationship.setProperty( PLUGIN_GROUP_ID, plugin.getGroupId() ); relationship.setProperty( IS_MANAGED, specificRel.isManaged() );
private void addDependencyTo( final Model model, final VersionlessArtifactRef artifact, final VersionSpec spec, final ProjectRef ga, final DependencyManagement depMgmt, final PomRequest dto ) { final Dependency d = new Dependency(); d.setGroupId( ga.getGroupId() ); d.setArtifactId( ga.getArtifactId() ); d.setVersion( spec.renderStandard() ); if ( !"jar".equals( artifact.getType() ) ) { d.setType( artifact.getType() ); } if ( artifact.getClassifier() != null ) { d.setClassifier( artifact.getClassifier() ); } if ( dto.isGraphToManagedDeps() ) { depMgmt.addDependency( d ); } else { model.addDependency( d ); } }
private void addDependencyTo( final Model model, final VersionlessArtifactRef artifact, final VersionSpec spec, final ProjectRef ga, final DependencyManagement depMgmt, final PomRequest dto ) { final Dependency d = new Dependency(); d.setGroupId( ga.getGroupId() ); d.setArtifactId( ga.getArtifactId() ); d.setVersion( spec.renderStandard() ); if ( !"jar".equals( artifact.getType() ) ) { d.setType( artifact.getType() ); } if ( artifact.getClassifier() != null ) { d.setClassifier( artifact.getClassifier() ); } if ( dto.isGraphToManagedDeps() ) { depMgmt.addDependency( d ); } else { model.addDependency( d ); } }