本文整理汇总了Java中org.apache.maven.model.Reporting类的典型用法代码示例。如果您正苦于以下问题:Java Reporting类的具体用法?Java Reporting怎么用?Java Reporting使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Reporting类属于org.apache.maven.model包,在下文中一共展示了Reporting类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
private void writeReporting(Reporting reporting, String tagName, XmlSerializer serializer)
throws java.io.IOException {
serializer.startTag(NAMESPACE, tagName);
flush(serializer);
StringBuffer b = b(serializer);
int start = b.length();
if (reporting.getExcludeDefaults() != null) {
writeValue(serializer, "excludeDefaults", reporting.getExcludeDefaults(), reporting);
}
if (reporting.getOutputDirectory() != null) {
writeValue(serializer, "outputDirectory", reporting.getOutputDirectory(), reporting);
}
if ((reporting.getPlugins() != null) && (reporting.getPlugins().size() > 0)) {
serializer.startTag(NAMESPACE, "plugins");
for (Iterator iter = reporting.getPlugins().iterator(); iter.hasNext();) {
ReportPlugin o = (ReportPlugin) iter.next();
writeReportPlugin(o, "plugin", serializer);
}
serializer.endTag(NAMESPACE, "plugins");
}
serializer.endTag(NAMESPACE, tagName).flush();
logLocation(reporting, "", start, b.length());
}
示例2: visitProfileReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
private void visitProfileReporting( ModelVisitor visitor, Reporting reporting )
{
List<ReportPlugin> plugins = reporting.getPlugins();
if ( plugins != null )
{
ListIterator<ReportPlugin> pluginIterator = plugins.listIterator();
while ( pluginIterator.hasNext() )
{
ReportPlugin plugin = pluginIterator.next();
visitor.visitProfileReportingPlugin( plugin );
visitProfileReportingPlugin( visitor, plugin );
plugin = visitor.replaceProfileReportingPlugin( plugin );
if ( plugin == null )
pluginIterator.remove();
else
pluginIterator.set( plugin );
}
}
}
示例3: visitReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
private void visitReporting( ModelVisitor visitor, Reporting reporting )
{
List<ReportPlugin> plugins = reporting.getPlugins();
if ( plugins != null )
{
ListIterator<ReportPlugin> pluginIterator = plugins.listIterator();
while ( pluginIterator.hasNext() )
{
ReportPlugin plugin = pluginIterator.next();
visitor.visitReportingPlugin( plugin );
visitReportingPlugin( visitor, plugin );
plugin = visitor.replaceReportingPlugin( plugin );
if ( plugin == null )
pluginIterator.remove();
else
pluginIterator.set( plugin );
}
}
}
示例4: expandPluginConfiguration
import org.apache.maven.model.Reporting; //导入依赖的package包/类
public void expandPluginConfiguration( Model model, ModelBuildingRequest request, ModelProblemCollector problems )
{
Reporting reporting = model.getReporting();
if ( reporting != null )
{
for ( ReportPlugin reportPlugin : reporting.getPlugins() )
{
Xpp3Dom parentDom = (Xpp3Dom) reportPlugin.getConfiguration();
if ( parentDom != null )
{
for ( ReportSet execution : reportPlugin.getReportSets() )
{
Xpp3Dom childDom = (Xpp3Dom) execution.getConfiguration();
childDom = Xpp3Dom.mergeXpp3Dom( childDom, new Xpp3Dom( parentDom ) );
execution.setConfiguration( childDom );
}
}
}
}
}
示例5: updateReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
/**
* Method updateReporting
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateReporting( Reporting value, String xmlTag, Counter counter, Element element )
{
boolean shouldExist = value != null;
Element root = updateElement( counter, element, xmlTag, shouldExist );
if ( shouldExist )
{
Counter innerCount = new Counter( counter.getDepth() + 1 );
findAndReplaceSimpleElement( innerCount, root, "excludeDefaults", !value.isExcludeDefaults() ? null
: String.valueOf( value.isExcludeDefaults() ), "false" );
findAndReplaceSimpleElement( innerCount, root, "outputDirectory", value.getOutputDirectory(), null );
iterateReportPlugin( innerCount, root, value.getPlugins(), "plugins", "plugin" );
}
}
示例6: updateReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
/**
* Method updateReporting
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateReporting( Reporting value, String xmlTag, Counter counter, Element element )
{
boolean shouldExist = value != null;
Element root = updateElement( counter, element, xmlTag, shouldExist );
if ( shouldExist )
{
Counter innerCount = new Counter( counter.getDepth() + 1 );
findAndReplaceSimpleElement( innerCount, root, "excludeDefaults", !value.isExcludeDefaults()
? null
: String.valueOf( value.isExcludeDefaults() ), "false" );
findAndReplaceSimpleElement( innerCount, root, "outputDirectory", value.getOutputDirectory(), null );
iterateReportPlugin( innerCount, root, value.getPlugins(), "plugins", "plugin" );
}
}
示例7: mergeReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
protected void mergeReporting( Reporting target, Reporting source, boolean sourceDominant,
Map<Object, Object> context )
{
mergeReporting_OutputDirectory( target, source, sourceDominant, context );
mergeReporting_ExcludeDefaults( target, source, sourceDominant, context );
mergeReporting_Plugins( target, source, sourceDominant, context );
}
示例8: mergeReporting_OutputDirectory
import org.apache.maven.model.Reporting; //导入依赖的package包/类
protected void mergeReporting_OutputDirectory( Reporting target, Reporting source, boolean sourceDominant,
Map<Object, Object> context )
{
String src = source.getOutputDirectory();
if ( src != null )
{
if ( sourceDominant || target.getOutputDirectory() == null )
{
target.setOutputDirectory( src );
target.setLocation( "outputDirectory", source.getLocation( "outputDirectory" ) );
}
}
}
示例9: mergeReporting_ExcludeDefaults
import org.apache.maven.model.Reporting; //导入依赖的package包/类
protected void mergeReporting_ExcludeDefaults( Reporting target, Reporting source, boolean sourceDominant,
Map<Object, Object> context )
{
String src = source.getExcludeDefaults();
if ( src != null )
{
if ( sourceDominant || target.getExcludeDefaults() == null )
{
target.setExcludeDefaults( src );
target.setLocation( "excludeDefaults", source.getLocation( "excludeDefaults" ) );
}
}
}
示例10: getReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
public Reporting getReporting()
{
return null;
}
示例11: getPlugin
import org.apache.maven.model.Reporting; //导入依赖的package包/类
/**
* Returns a plugin from a pom based on its group id and artifact id
* <p>
* It searches in the build section, then the reporting section and finally the pluginManagement section
* </p>
*
* @param pom the project pom
* @param groupId the plugin group id
* @param artifactId the plugin artifact id
* @return the plugin if it exists, null otherwise
*/
@CheckForNull
public static MavenPlugin getPlugin(MavenProject pom, String groupId, String artifactId) {
Object pluginConfiguration = null;
// look for plugin in <build> section
Plugin plugin = getPlugin(pom.getBuildPlugins(), groupId, artifactId);
if (plugin != null) {
pluginConfiguration = plugin.getConfiguration();
} else {
// look for plugin in reporting
Reporting reporting = pom.getModel().getReporting();
if (reporting != null) {
ReportPlugin reportPlugin = getReportPlugin(reporting.getPlugins(), groupId, artifactId);
if (reportPlugin != null) {
pluginConfiguration = reportPlugin.getConfiguration();
}
}
}
// look for plugin in <pluginManagement> section
PluginManagement pluginManagement = pom.getPluginManagement();
if (pluginManagement != null) {
Plugin pluginFromManagement = getPlugin(pluginManagement.getPlugins(), groupId, artifactId);
if (pluginFromManagement != null) {
Object pluginConfigFromManagement = pluginFromManagement.getConfiguration();
if (pluginConfiguration == null) {
pluginConfiguration = pluginConfigFromManagement;
} else if (pluginConfigFromManagement != null) {
Xpp3Dom.mergeXpp3Dom((Xpp3Dom) pluginConfiguration, (Xpp3Dom) pluginConfigFromManagement);
}
}
}
if (pluginConfiguration != null) {
return new MavenPlugin(pluginConfiguration);
}
return null;
}
示例12: replaceProfileReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
@Override
public Reporting replaceProfileReporting( Reporting reporting )
{
return reporting;
}
示例13: replaceReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
@Override
public Reporting replaceReporting( Reporting reporting )
{
return reporting;
}
示例14: visitProfileReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
@Override
public void visitProfileReporting( Reporting reporting )
{
}
示例15: visitReporting
import org.apache.maven.model.Reporting; //导入依赖的package包/类
@Override
public void visitReporting( Reporting reporting )
{
}