protected void mergeReportPlugin_ArtifactId( ReportPlugin target, ReportPlugin source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getArtifactId(); if ( src != null ) { if ( sourceDominant || target.getArtifactId() == null ) { target.setArtifactId( src ); target.setLocation( "artifactId", source.getLocation( "artifactId" ) ); } } }
public static ReportPlugin cloneReportPlugin( ReportPlugin src ) { if ( src == null ) { return null; } ReportPlugin result = new ReportPlugin(); result.setArtifactId( src.getArtifactId() ); result.setConfiguration( cloneConfiguration( src.getConfiguration() ) ); result.setGroupId( src.getGroupId() ); result.setInherited( src.getInherited() ); result.setReportSets( cloneList( src.getReportSets(), REPORT_SET_CLONER ) ); result.setVersion( src.getVersion() ); return result; }
reportPlugin.setArtifactId( interpolatedTrimmed( parser.nextText(), "artifactId" ) );
public ReportPlugin mergeReportPlugin(ReportPlugin plugin) { plugin.setGroupId(groupId); plugin.setArtifactId(artifactId); if(version != null) plugin.setVersion(version); return plugin; }
reportPlugin.setArtifactId( interpolatedTrimmed( parser.nextText(), "artifactId" ) );
reportPlugin.setArtifactId( getTrimmedValue( value ) );
public ReportPlugin mergeReportPlugin(ReportPlugin plugin) { plugin.setGroupId(groupId); plugin.setArtifactId(artifactId); if(version != null) plugin.setVersion(version); return plugin; }
reportPlugin.setArtifactId( reportName );
/** * Get the report plugins from reporting section, adding if necessary (ni.e. not excluded) * default reports (i.e. maven-project-info-reports) * * @return the effective list of reports * @since 3.7.1 */ private ReportPlugin[] getReportingPlugins() { List<ReportPlugin> reportingPlugins = reporting.getPlugins(); // MSITE-806: add default report plugin like done in maven-model-builder DefaultReportingConverter boolean hasMavenProjectInfoReportsPlugin = false; for ( ReportPlugin plugin : reportingPlugins ) { if ( "org.apache.maven.plugins".equals( plugin.getGroupId() ) && "maven-project-info-reports-plugin".equals( plugin.getArtifactId() ) ) { hasMavenProjectInfoReportsPlugin = true; break; } } if ( !reporting.isExcludeDefaults() && !hasMavenProjectInfoReportsPlugin ) { ReportPlugin mpir = new ReportPlugin(); mpir.setArtifactId( "maven-project-info-reports-plugin" ); reportingPlugins.add( mpir ); } return reportingPlugins.toArray( new ReportPlugin[reportingPlugins.size()] ); }
Model model = new Model(); ReportPlugin reportPlugin = new ReportPlugin(); reportPlugin.setGroupId("org.codehaus.mojo"); reportPlugin.setArtifactId("cobertura-maven-plugin"); Reporting reporting = new Reporting(); reporting.addPlugin(reportPlugin); model.setReporting(reporting); StringWriter writer = new StringWriter(); MavenXpp3Writer xpp = new MavenXpp3Writer(); try { xpp.write(writer, model); System.out.println(writer.toString()); } catch (IOException e) { e.printStackTrace(); }
protected void mergeReportPlugin_ArtifactId( ReportPlugin target, ReportPlugin source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getArtifactId(); if ( src != null ) { if ( sourceDominant || target.getArtifactId() == null ) { target.setArtifactId( src ); target.setLocation( "artifactId", source.getLocation( "artifactId" ) ); } } }
private void resolve( ReportPlugin plugin ) { try { plugin.setGroupId( (String) helper.evaluate( plugin.getGroupId() ) ); plugin.setArtifactId( (String) helper.evaluate( plugin.getArtifactId() ) ); plugin.setVersion( (String) helper.evaluate( plugin.getVersion() ) ); } catch ( ExpressionEvaluationException e ) { // this should have gone already before } }
private void resolve( ReportPlugin plugin ) { try { plugin.setGroupId( (String) helper.evaluate( plugin.getGroupId() ) ); plugin.setArtifactId( (String) helper.evaluate( plugin.getArtifactId() ) ); plugin.setVersion( (String) helper.evaluate( plugin.getVersion() ) ); } catch ( ExpressionEvaluationException e ) { // this should have gone already before } }
releaseReportPlugin.setArtifactId( reportPlugin.getArtifactId() ); releaseReportPlugin.setVersion( version ); releaseReportPlugin.setInherited( reportPlugin.getInherited() );
reportPlugin.setArtifactId( getTrimmedValue( parser.nextText() ) );
ReportPlugin reportPlugin = new ReportPlugin(); reportPlugin.setGroupId(PLUGIN_JAVADOC_GROUP_ID); reportPlugin.setArtifactId(PLUGIN_JAVADOC_ARTIFACT_ID); reportPlugin.setVersion(PLUGIN_JAVADOC_VERSION); reporting.addPlugin(reportPlugin);
plugin = new ReportPlugin(); plugin.setGroupId( getGroupId() ); plugin.setArtifactId( getArtifactId() );
reportPlugin.setArtifactId( getTrimmedValue( parser.nextText() ) );
oldReportPlugin.setArtifactId( getNewArtifactId() ); oldReportPlugin.setGroupId( getNewGroupId() ); sendInfoMessage( "Relocating report plugin " + getOldGroupId() + ":" + getOldArtifactId() );