private Xpp3Dom convert( ReportPlugin plugin ) { Xpp3Dom dom = new Xpp3Dom( "reportPlugin" ); addDom( dom, "groupId", plugin.getGroupId() ); addDom( dom, "artifactId", plugin.getArtifactId() ); addDom( dom, "version", plugin.getVersion() ); Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration(); if ( configuration != null ) { configuration = new Xpp3Dom( configuration ); dom.addChild( configuration ); } if ( !plugin.getReportSets().isEmpty() ) { Xpp3Dom reportSets = new Xpp3Dom( "reportSets" ); for ( ReportSet reportSet : plugin.getReportSets() ) { Xpp3Dom rs = convert( reportSet ); reportSets.addChild( rs ); } dom.addChild( reportSets ); } return dom; }
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; }
protected void mergeReportPlugin_Version( ReportPlugin target, ReportPlugin source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getVersion(); if ( src != null ) { if ( sourceDominant || target.getVersion() == null ) { target.setVersion( src ); target.setLocation( "version", source.getLocation( "version" ) ); } } }
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" ) ); } } }
protected void mergeReportPlugin_GroupId( ReportPlugin target, ReportPlugin source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getGroupId(); if ( src != null ) { if ( sourceDominant || target.getGroupId() == null ) { target.setGroupId( src ); target.setLocation( "groupId", source.getLocation( "groupId" ) ); } } }
if ( container instanceof Plugin ){ plugin = (Plugin) container; pluginProlog( plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion() ); pluginProlog( rplugin.getGroupId(), rplugin.getArtifactId(), rplugin.getVersion() ); if ( rplugin != null && !rplugin.getReportSets().isEmpty() ) { p.printStartBlock(); for( ReportSet set : rplugin.getReportSets() ){ p.printWithOptions( "report_set", options( "id", "default".equals( set.getId() ) ? null : set.getId(),
String g1 = o1 instanceof Plugin ? ( (Plugin) o1 ).getGroupId() : ( (ReportPlugin) o1 ).getGroupId(); String g2 = o2 instanceof Plugin ? ( (Plugin) o2 ).getGroupId() : ( (ReportPlugin) o2 ).getGroupId(); String a1 = o1 instanceof Plugin ? ( (Plugin) o1 ).getArtifactId() : ( (ReportPlugin) o1 ).getArtifactId(); String a2 = o2 instanceof Plugin ? ( (Plugin) o2 ).getArtifactId() : ( (ReportPlugin) o2 ).getArtifactId(); r = a1.compareTo( a2 ); String v1 = o1 instanceof Plugin ? ( (Plugin) o1 ).getVersion() : ( (ReportPlugin) o1 ).getVersion(); String v2 = o2 instanceof Plugin ? ( (Plugin) o2 ).getVersion() : ( (ReportPlugin) o2 ).getVersion(); if ( v1 == null )
p.getArtifactId(), p ); p.getGroupId(), p ); validate20PluginVersion( "build.plugins.plugin.version", problems, p.getVersion(), p.getKey(), p, request ); if ( reporting != null ) for ( ReportPlugin p : reporting.getPlugins() ) Version.V20, p.getArtifactId(), p ); p.getGroupId(), p );
for ( ReportPlugin report : project.getReportPlugins() ) Plugin pp = new Plugin(); pp.setGroupId( report.getGroupId() ); pp.setArtifactId( report.getArtifactId() ); pp.setVersion( report.getVersion() );
plugin = new Plugin(); plugin.setGroupId( getGroupId() ); plugin.setArtifactId( getArtifactId() ); plugin = new ReportPlugin(); plugin.setGroupId( getGroupId() ); plugin.setArtifactId( getArtifactId() ); plugin.setConfiguration( configuration ); plugin.setReportSets( getReportSets() ); v4Model.setReporting( new Reporting() ); v4Model.getReporting().addPlugin( plugin ); sendInfoMessage( "Adding report " + plugin.getGroupId() + ":" + plugin.getArtifactId() ); fireAddReportEvent( plugin );
sitePlugin = new Plugin(); sitePlugin.setArtifactId( "maven-site-plugin" ); PluginManagement pluginManagement = build.getPluginManagement(); if ( pluginManagement == null ) Xpp3Dom configuration = (Xpp3Dom) sitePlugin.getConfiguration(); addDom( configuration, "outputDirectory", reporting.getOutputDirectory() ); for ( ReportPlugin plugin : reporting.getPlugins() ) if ( !reporting.isExcludeDefaults() && !hasMavenProjectInfoReportsPlugin && "org.apache.maven.plugins".equals( plugin.getGroupId() ) && "maven-project-info-reports-plugin".equals( plugin.getArtifactId() ) )
String pluginId = ArtifactUtils.versionlessKey( plugin.getGroupId(), plugin.getArtifactId() ); if ( dag.getVertex( pluginId ) != null && !pluginId.equals( id ) ) for ( Iterator k = plugin.getDependencies().iterator(); k.hasNext(); ) String pluginId = ArtifactUtils.versionlessKey( plugin.getGroupId(), plugin.getArtifactId() ); if ( dag.getVertex( pluginId ) != null && !pluginId.equals( id ) )
private static Plugin cloneReportPluginToPlugin(ReportPlugin reportPlugin) { Plugin plugin = new Plugin(); plugin.setGroupId(reportPlugin.getGroupId()); plugin.setArtifactId(reportPlugin.getArtifactId()); plugin.setVersion(reportPlugin.getVersion()); plugin.setConfiguration(reportPlugin.getConfiguration()); return plugin; }
if ( StringUtils.isEmpty( p.getVersion() ) ) version = p.getVersion(); try artifact = artifactFactory.createPluginArtifact( p.getGroupId(), p.getArtifactId(), VersionRange.createFromVersionSpec( version ) ); "' for report '" + ArtifactUtils.versionlessKey( p.getGroupId(), p.getArtifactId() ) + "': " + e.getMessage(), e );
if ( lifecyclePlugin.getVersion() != null ) String parentVersion = parentPluginManagement.get( lifecyclePlugin.getKey() ); if ( parentVersion != null ) if ( buildPlugin.getVersion() == null ) String parentVersion = parentPluginManagement.get( buildPlugin.getKey() ); List<ReportPlugin> reportPlugins = new ArrayList<>( originalModel.getReporting().getPlugins() ); for ( Iterator<ReportPlugin> i = reportPlugins.iterator(); i.hasNext(); ) if ( reportPlugin.getVersion() == null ) String parentVersion = parentPluginManagement.get( reportPlugin.getKey() ); if ( parentVersion != null ) addProjectPlugins( plugins, toPlugins( profile.getReporting().getPlugins() ), parentReportPlugins );
for ( Iterator<?> it = project.getModel().getReporting().getPlugins().iterator(); it.hasNext(); ) pluginConf = (Xpp3Dom) plugin.getConfiguration(); pluginConf = (Xpp3Dom) reportPlugin.getConfiguration();
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 } }
oldBuildPlugin.setArtifactId( getNewArtifactId() ); oldBuildPlugin.setGroupId( getNewGroupId() ); sendInfoMessage( "Relocating build plugin " + getOldGroupId() + ":" + getOldArtifactId() ); fireRelocatePluginEvent( getOldGroupId(), getOldArtifactId(), getNewGroupId(), getNewArtifactId() ); v4Model.getReporting().getPlugins().remove( oldReportPlugin ); sendInfoMessage( "Removing report plugin " + getOldGroupId() + ":" + getOldArtifactId() ); fireRemovePluginEvent( getOldGroupId(), getOldArtifactId() ); oldReportPlugin.setArtifactId( getNewArtifactId() ); oldReportPlugin.setGroupId( getNewGroupId() ); sendInfoMessage( "Relocating report plugin " + getOldGroupId() + ":" + getOldArtifactId() ); fireRelocateReportEvent( getOldGroupId(), getOldArtifactId(), getNewGroupId(), getNewArtifactId() ); v4Model.getReporting().getPlugins().remove( oldReportPlugin ); sendInfoMessage( "Removing old report plugin " + getOldGroupId() + ":" + getOldArtifactId() + " because the new one already exist" );
public VersionlessProjectKey( final ReportPlugin plugin ) { groupId = plugin.getGroupId(); artifactId = plugin.getArtifactId(); }
ReportPlugin reportPlugin = new ReportPlugin(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) reportPlugin.setGroupId( interpolatedTrimmed( parser.nextText(), "groupId" ) ); reportPlugin.setArtifactId( interpolatedTrimmed( parser.nextText(), "artifactId" ) ); reportPlugin.setVersion( interpolatedTrimmed( parser.nextText(), "version" ) ); reportPlugin.setReportSets( reportSets ); while ( parser.nextTag() == XmlPullParser.START_TAG ) reportPlugin.setInherited( interpolatedTrimmed( parser.nextText(), "inherited" ) ); reportPlugin.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );