本文整理了Java中org.apache.maven.model.Reporting.addPlugin
方法的一些代码示例,展示了Reporting.addPlugin
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reporting.addPlugin
方法的具体详情如下:
包路径:org.apache.maven.model.Reporting
类名称:Reporting
方法名:addPlugin
[英]Method addPlugin.
[中]方法addPlugin。
代码示例来源:origin: org.apache.maven.shared/maven-model-converter
reports.addPlugin( reportPlugin );
代码示例来源:origin: stackoverflow.com
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();
}
代码示例来源:origin: org.sonatype.maven.archetype/archetype-common
private void mergeReportPlugins(Model model, Model generatedModel) {
if (generatedModel.getReporting() != null) {
if (model.getReporting() == null) {
model.setReporting(new Reporting());
}
Map<String,ReportPlugin> reportPluginsByIds=model.getReporting().getReportPluginsAsMap();
Map<String,ReportPlugin> generatedReportPluginsByIds=generatedModel.getReporting().getReportPluginsAsMap();
for (String generatedReportPluginsId : generatedReportPluginsByIds.keySet()) {
if (!reportPluginsByIds.containsKey(generatedReportPluginsId)) {
model.getReporting().addPlugin(generatedReportPluginsByIds.get(generatedReportPluginsId));
}
else {
log.warn("Can not override report: " + generatedReportPluginsId);
}
}
}
}
代码示例来源:origin: apache/maven-archetype
private void mergeReportPlugins( Model model, Model generatedModel )
{
if ( generatedModel.getReporting() != null )
{
if ( model.getReporting() == null )
{
model.setReporting( new Reporting() );
}
@SuppressWarnings( "unchecked" )
Map<String, ReportPlugin> reportPluginsByIds = model.getReporting().getReportPluginsAsMap();
@SuppressWarnings( "unchecked" )
Map<String, ReportPlugin> generatedReportPluginsByIds =
generatedModel.getReporting().getReportPluginsAsMap();
for ( String generatedReportPluginsId : generatedReportPluginsByIds.keySet() )
{
if ( !reportPluginsByIds.containsKey( generatedReportPluginsId ) )
{
model.getReporting().addPlugin( generatedReportPluginsByIds.get( generatedReportPluginsId ) );
}
else
{
getLogger().warn( "Can not override report: " + generatedReportPluginsId );
}
}
}
}
代码示例来源:origin: io.fabric8.forge/devops
reportPlugin.setArtifactId(PLUGIN_JAVADOC_ARTIFACT_ID);
reportPlugin.setVersion(PLUGIN_JAVADOC_VERSION);
reporting.addPlugin(reportPlugin);
代码示例来源:origin: org.apache.maven.shared/maven-model-converter
v4Model.getReporting().addPlugin( plugin );
sendInfoMessage( "Adding report " + plugin.getGroupId() + ":" + plugin.getArtifactId() );
fireAddReportEvent( plugin );
内容来源于网络,如有侵权,请联系作者删除!