public Artifact setFile( File file ) { if ( ( this.file == null ) ? file == null : this.file.equals( file ) ) { return this; } return new SubArtifact( mainArtifact, classifier, extension, file, properties ); }
public Artifact setProperties( Map<String, String> properties ) { if ( this.properties.equals( properties ) || ( properties == null && this.properties.isEmpty() ) ) { return this; } return new SubArtifact( mainArtifact, classifier, extension, properties, file ); }
/** * Installs the given artifact and all its transitive dependencies */ public GAV install(GAV gav, File jar, File pom) throws Exception { Artifact jarArtifact = toArtifact(gav); jarArtifact = jarArtifact.setFile(jar); Artifact pomArtifact = new SubArtifact(jarArtifact, "", "pom"); pomArtifact = pomArtifact.setFile(pom); InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact(jarArtifact).addArtifact(pomArtifact); rs.install(session, installRequest); return install(gav); }
Artifact pomArtifact = new SubArtifact( mainArtifact, "", "pom" ); pomArtifact = pomArtifact.setFile( ( (ProjectArtifactMetadata) metadata ).getFile() ); request.addArtifact( pomArtifact );
Artifact pomArtifact = new SubArtifact( aetherArtifact, "", "pom" ); pomArtifact = pomArtifact.setFile( ( (ProjectArtifactMetadata) metadata ).getFile() ); request.addArtifact( pomArtifact );