@Override public int compare( final VersionlessArtifactRef f, final VersionlessArtifactRef s ) int comp = f.compareTo( s ); // compare groupId and artifactId ONLY. if ( comp == 0 ) final String fc = f.getClassifier(); final String sc = s.getClassifier(); final String ft = f.getType(); // never null final String st = s.getType(); // never null
public <T extends VersionlessArtifactRef> SimpleVersionlessArtifactRef( final VersionlessArtifactRef ref ) { super( ref ); this.tc = ref.getTypeAndClassifier(); }
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 ); } }
for ( final VersionlessArtifactRef artifact : arts ) if ( "pom".equals( artifact.getType() ) && artifact.getClassifier() == null )
@Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( !super.equals( obj ) ) { return false; } if ( !(obj instanceof VersionlessArtifactRef) ) { return false; } final VersionlessArtifactRef other = (VersionlessArtifactRef) obj; if ( tc == null ) { if ( other.getTypeAndClassifier() != null ) { return false; } } else if ( !tc.equals( other.getTypeAndClassifier() ) ) { return false; } return true; }
for ( final VersionlessArtifactRef artifact : arts ) if ( "pom".equals( artifact.getType() ) && artifact.getClassifier() == null )
@Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( !super.equals( obj ) ) { return false; } if ( !( obj instanceof VersionlessArtifactRef ) ) { return false; } final VersionlessArtifactRef other = (VersionlessArtifactRef) obj; if ( tc == null ) { if ( other.getTypeAndClassifier() != null ) { return false; } } else if ( !tc.equals( other.getTypeAndClassifier() ) ) { return false; } return true; }