protected void mergeModelBase_DistributionManagement( ModelBase target, ModelBase source, boolean sourceDominant, Map<Object, Object> context ) { DistributionManagement src = source.getDistributionManagement(); if ( src != null ) { DistributionManagement tgt = target.getDistributionManagement(); if ( tgt == null ) { tgt = new DistributionManagement(); target.setDistributionManagement( tgt ); } mergeDistributionManagement( tgt, src, sourceDominant, context ); } }
private Model createStubModel( Artifact projectArtifact ) { getLogger().debug( "Using defaults for missing POM " + projectArtifact ); Model model = new Model(); model.setModelVersion( "4.0.0" ); model.setArtifactId( projectArtifact.getArtifactId() ); model.setGroupId( projectArtifact.getGroupId() ); model.setVersion( projectArtifact.getVersion() ); // TODO: not correct in some instances model.setPackaging( projectArtifact.getType() ); model.setDistributionManagement( new DistributionManagement() ); model.getDistributionManagement().setStatus( ArtifactStatus.GENERATED.toString() ); return model; }
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 distributionManagement = new DistributionManagement(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
DistributionManagement distributionManagement = new DistributionManagement(); InputLocation _location; _location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
childDistMgmt = new DistributionManagement();
childDistMgmt = new DistributionManagement();
/** * This elements describes all that pertains to distribution for a * project. It is primarily used for deployment of artifacts * and the site produced by the build. */ public static FluentDistributionManagementBuilder newDistributionManagement() { return new FluentDistributionManagementBuilder(new DistributionManagement()); }
DistributionManagement distributionManagement = new DistributionManagement(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
protected void mergeModelBase_DistributionManagement( ModelBase target, ModelBase source, boolean sourceDominant, Map<Object, Object> context ) { DistributionManagement src = source.getDistributionManagement(); if ( src != null ) { DistributionManagement tgt = target.getDistributionManagement(); if ( tgt == null ) { tgt = new DistributionManagement(); target.setDistributionManagement( tgt ); } mergeDistributionManagement( tgt, src, sourceDominant, context ); } }
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 ); }
private static void setDistMgmntSiteUrl( Model model, String url ) { if ( model.getDistributionManagement() == null ) { model.setDistributionManagement( new DistributionManagement() ); } if ( model.getDistributionManagement().getSite() == null ) { model.getDistributionManagement().setSite( new Site() ); } model.getDistributionManagement().getSite().setUrl( url ); } }
@Override protected void execute(final GitBranchInfo gitBranchInfo) throws MojoExecutionException, MojoFailureException { if (project.getDistributionManagement() == null) { project.setDistributionManagement(new DistributionManagement());
moduleProject.setDistributionManagement( new DistributionManagement() ); moduleProject.getDistributionManagement().setSite( new Site() ); moduleProject.getDistributionManagement().getSite().setUrl( module );
throws PomTranslationException DistributionManagement distributionManagement = new DistributionManagement();
DistributionManagement distributionManagement = new DistributionManagement(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
DistributionManagement distributionManagement = new DistributionManagement(); InputLocation _location; _location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );