Model pom = new Model();
pom.setGroupId( groupId );
pom.setArtifactId( artifactId );
pom.setVersion( version );
DistributionManagement dMngt = new DistributionManagement();
Relocation relocation = new Relocation();
relocation.setGroupId( newGroupId );
relocation.setArtifactId( newArtifactId );
relocation.setVersion( newVersion );
if ( message != null && message.length() > 0 )
{
relocation.setMessage( message );
}
dMngt.setRelocation( relocation );
pom.setDistributionManagement( dMngt );
Artifact artifact = artifactFactory.createBuildArtifact( groupId, artifactId, version, "pom" ); //$NON-NLS-1$
File pomFile = new File( repository.getBasedir(), repository.pathOf( artifact ) );