mDistMgmt.setRelocation( pDistMgmt.getRelocation() );
public static DistributionManagement cloneDistributionManagement( DistributionManagement src ) { if ( src == null ) { return null; } DistributionManagement result = new DistributionManagement(); result.setDownloadUrl( src.getDownloadUrl() ); result.setRelocation( cloneRelocation( src.getRelocation() ) ); result.setRepository( cloneDeploymentRepository( src.getRepository() ) ); result.setSite( cloneSite( src.getSite() ) ); result.setSnapshotRepository( cloneDeploymentRepository( src.getSnapshotRepository() ) ); result.setStatus( src.getStatus() ); return result; }
distributionManagement.setRelocation( parseRelocation( parser, strict ) );
distributionManagement.setRelocation( parseRelocation( parser, strict, source ) );
/** * Set relocation information of the artifact if it has been * moved to a new group ID and/or artifact ID. * * @param relocation */ public FluentDistributionManagementBuilder withRelocation(Relocation relocation) { management.setRelocation(relocation); return this; }
distributionManagement.setRelocation( parseRelocation( parser, strict ) );
private void writeRelocationPom( String groupId, String artifactId, String version, String newGroupId, String newArtifactId, String newVersion, String message, ArtifactRepository repository, FileTransaction transaction ) throws IOException { 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 ) ); StringWriter strWriter = new StringWriter(); MavenXpp3Writer pomWriter = new MavenXpp3Writer(); pomWriter.write( strWriter, pom ); transaction.createFile( strWriter.toString(), pomFile, digesters ); }
private void writeRelocationPom( String groupId, String artifactId, String version, String newGroupId, String newArtifactId, String newVersion, String message, ArtifactRepository repository, FileTransaction transaction ) throws IOException { 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 ) ); StringWriter strWriter = new StringWriter(); MavenXpp3Writer pomWriter = new MavenXpp3Writer(); pomWriter.write( strWriter, pom ); transaction.createFile( strWriter.toString(), pomFile, digesters ); }
private void writeRelocationPom( String groupId, String artifactId, String version, String newGroupId, String newArtifactId, String newVersion, String message, ArtifactRepository repository, FileTransaction transaction ) throws IOException { 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$ Path pomFile = Paths.get( repository.getBasedir(), repository.pathOf( artifact ) ); StringWriter strWriter = new StringWriter(); MavenXpp3Writer pomWriter = new MavenXpp3Writer(); pomWriter.write( strWriter, pom ); transaction.createFile( strWriter.toString(), pomFile, digesters ); }
private void writeRelocationPom( String groupId, String artifactId, String version, String newGroupId, String newArtifactId, String newVersion, String message, ArtifactRepository repository, FileTransaction transaction ) throws IOException { 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 ) ); StringWriter strWriter = new StringWriter(); MavenXpp3Writer pomWriter = new MavenXpp3Writer(); pomWriter.write( strWriter, pom ); transaction.createFile( strWriter.toString(), pomFile, digesters ); }
distributionManagement.setRelocation( parseRelocation( parser, strict ) );
distributionManagement.setRelocation( parseRelocation( parser, strict, source ) );