/** {@inheritDoc} */ public void setArtifactId( String artifactId ) { artifact.setArtifactId( artifactId ); }
/** {@inheritDoc} */ public void setArtifactId( String artifactId ) { artifact.setArtifactId( artifactId ); }
artifact.setArtifactId( relocation.getArtifactId() ); project.setArtifactId( relocation.getArtifactId() );
artifact.setArtifactId( relocation.getArtifactId() ); relocatedArtifact = artifact; project.setArtifactId( relocation.getArtifactId() );
public void setArtifactId( String artifactId ) { delegate.setArtifactId( artifactId ); }
public void setArtifactId(String artifactId) { original.setArtifactId(artifactId); }
public void setArtifactId(String artifactId) { original.setArtifactId(artifactId); }
public void setArtifactId(final String artifactId) { this.artifact.setArtifactId(artifactId); }
public void setArtifactId(final String artifactId) { this.artifact.setArtifactId(artifactId); }
@Override public void execute() throws MojoExecutionException, MojoFailureException { getLog().info("artifactIdSuffix is: " + artifactIdSuffix); if (artifactIdSuffix != null && !"".equals(artifactIdSuffix.trim())) { final String originalArtifactId = project.getArtifactId(); project.getArtifact().setArtifactId(originalArtifactId + "_" + artifactIdSuffix); getLog().info( "ArtifactId has been updated from '" + originalArtifactId + "' to '" + project.getArtifact().getArtifactId() + "'."); } else { getLog().info("ArtifactId has not been modified."); } } }
artifact.setArtifactId( newArtifactId ); artifact.setVersion( newVersion );
artifact.setArtifactId( newArtifactId ); artifact.setVersion( newVersion );
artifact.setArtifactId( newArtifactId ); artifact.setVersion( newVersion );
artifact.setArtifactId( newArtifactId ); artifact.setVersion( newVersion );
private MavenProject projectFromArtifact(final Artifact artifact) throws ProjectBuildingException, GemException { final ProjectBuildingRequest request = new DefaultProjectBuildingRequest().setLocalRepository(this.localRepository) .setRemoteRepositories(this.project.getRemoteArtifactRepositories()); manager.setRepositorySession(request, this.repositorySession ); final MavenProject project = this.builder.build(artifact, request) .getProject(); if (project.getDistributionManagement() != null && project.getDistributionManagement().getRelocation() != null) { final Relocation reloc = project.getDistributionManagement() .getRelocation(); final String key = artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getType() + ":" + artifact.getVersion(); artifact.setArtifactId(reloc.getArtifactId()); artifact.setGroupId(reloc.getGroupId()); if (reloc.getVersion() != null) { artifact.setVersion(reloc.getVersion()); } this.relocationMap.put(key, artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getType() + ":" + artifact.getVersion()); return projectFromArtifact(artifact); } else { return project; } }
private MavenProject projectFromArtifact(final Artifact artifact) throws ProjectBuildingException, GemException { final ProjectBuildingRequest request = new DefaultProjectBuildingRequest().setLocalRepository(this.localRepository) .setRemoteRepositories(this.project.getRemoteArtifactRepositories()); manager.setRepositorySession(request, this.repositorySession ); final MavenProject project = this.builder.build(artifact, request) .getProject(); if (project.getDistributionManagement() != null && project.getDistributionManagement().getRelocation() != null) { final Relocation reloc = project.getDistributionManagement() .getRelocation(); final String key = artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getType() + ":" + artifact.getVersion(); artifact.setArtifactId(reloc.getArtifactId()); artifact.setGroupId(reloc.getGroupId()); if (reloc.getVersion() != null) { artifact.setVersion(reloc.getVersion()); } this.relocationMap.put(key, artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getType() + ":" + artifact.getVersion()); return projectFromArtifact(artifact); } else { return project; } }
depMavenProject.getArtifact().setArtifactId( artifact.getArtifactId() );