本文整理汇总了Java中org.apache.maven.model.ReportPlugin类的典型用法代码示例。如果您正苦于以下问题:Java ReportPlugin类的具体用法?Java ReportPlugin怎么用?Java ReportPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReportPlugin类属于org.apache.maven.model包,在下文中一共展示了ReportPlugin类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getReportPluginPropertyImpl
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
private static @CheckForNull <T> T getReportPluginPropertyImpl(@NonNull MavenProject prj, @NonNull String groupId, @NonNull String artifactId, @NonNull ConfigurationBuilder<T> builder, @NullAllowed String report) {
T toRet = null;
for (ReportPlugin plug : getEffectiveReportPlugins(prj)) {
if (artifactId.equals(plug.getArtifactId()) &&
groupId.equals(plug.getGroupId())) {
if (plug.getReportSets() != null) {
for (ReportSet exe : plug.getReportSets()) {
if (exe.getReports().contains(report)) {
toRet = builder.build((Xpp3Dom)exe.getConfiguration(), DUMMY_EVALUATOR);
if (toRet != null) {
break;
}
}
}
}
if (toRet == null) {
toRet = builder.build((Xpp3Dom)plug.getConfiguration(), DUMMY_EVALUATOR);
}
}
}
return toRet;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:PluginPropertyUtils.java
示例2: writeReporting
import org.apache.maven.model.ReportPlugin; //导入依赖的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());
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:LocationAwareMavenXpp3Writer.java
示例3: visitProfileReporting
import org.apache.maven.model.ReportPlugin; //导入依赖的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 );
}
}
}
开发者ID:fedora-java,项目名称:xmvn,代码行数:20,代码来源:DefaultModelProcessor.java
示例4: visitProfileReportingPlugin
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
private void visitProfileReportingPlugin( ModelVisitor visitor, ReportPlugin reportPlugin )
{
List<ReportSet> reportSets = reportPlugin.getReportSets();
if ( reportSets != null )
{
ListIterator<ReportSet> reportSetIterator = reportSets.listIterator();
while ( reportSetIterator.hasNext() )
{
ReportSet reportSet = reportSetIterator.next();
visitor.visitProfileReportingPluginReportSet( reportSet );
visitProfileReportingPluginReportSet( visitor, reportSet );
reportSet = visitor.replaceProfileReportingPluginReportSet( reportSet );
if ( reportSet == null )
reportSetIterator.remove();
else
reportSetIterator.set( reportSet );
}
}
}
开发者ID:fedora-java,项目名称:xmvn,代码行数:20,代码来源:DefaultModelProcessor.java
示例5: visitReporting
import org.apache.maven.model.ReportPlugin; //导入依赖的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 );
}
}
}
开发者ID:fedora-java,项目名称:xmvn,代码行数:20,代码来源:DefaultModelProcessor.java
示例6: visitReportingPlugin
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
private void visitReportingPlugin( ModelVisitor visitor, ReportPlugin reportPlugin )
{
List<ReportSet> reportSets = reportPlugin.getReportSets();
if ( reportSets != null )
{
ListIterator<ReportSet> reportSetIterator = reportSets.listIterator();
while ( reportSetIterator.hasNext() )
{
ReportSet reportSet = reportSetIterator.next();
visitor.visitReportingPluginReportSet( reportSet );
visitReportingPluginReportSet( visitor, reportSet );
reportSet = visitor.replaceReportingPluginReportSet( reportSet );
if ( reportSet == null )
reportSetIterator.remove();
else
reportSetIterator.set( reportSet );
}
}
}
开发者ID:fedora-java,项目名称:xmvn,代码行数:20,代码来源:DefaultModelProcessor.java
示例7: expandPluginConfiguration
import org.apache.maven.model.ReportPlugin; //导入依赖的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 );
}
}
}
}
}
开发者ID:gems-uff,项目名称:oceano,代码行数:23,代码来源:DefaultReportConfigurationExpander.java
示例8: getReportPluginVersion
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
/**
* Like {@link #getPluginVersion} but for report plugins.
* @since 2.32
*/
public static @CheckForNull String getReportPluginVersion(@NonNull MavenProject prj, @NonNull String groupId, @NonNull String artifactId) {
for (ReportPlugin plug : getEffectiveReportPlugins(prj)) {
if (groupId.equals(plug.getGroupId()) && artifactId.equals(plug.getArtifactId())) {
return plug.getVersion();
}
}
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:PluginPropertyUtils.java
示例9: getEffectiveReportPlugins
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
/**
* Should handle both deprecated 2.x-style report section, and 3.x-style Site Plugin config.
* https://jira.codehaus.org/browse/MSITE-484 and https://jira.codehaus.org/browse/MSITE-443 if and when implemented may require updates.
*/
private static @NonNull Iterable<ReportPlugin> getEffectiveReportPlugins(@NonNull MavenProject prj) {
List<ReportPlugin> plugins = new ArrayList<ReportPlugin>();
for (Plugin plug : prj.getBuildPlugins()) {
if (Constants.GROUP_APACHE_PLUGINS.equals(plug.getGroupId()) && Constants.PLUGIN_SITE.equals(plug.getArtifactId())) {
Xpp3Dom cfg = (Xpp3Dom) plug.getConfiguration(); // MNG-4862
if (cfg == null) {
continue;
}
Xpp3Dom reportPlugins = cfg.getChild("reportPlugins");
if (reportPlugins == null) {
continue;
}
for (Xpp3Dom plugin : reportPlugins.getChildren("plugin")) {
ReportPlugin p = new ReportPlugin();
Xpp3Dom groupId = plugin.getChild("groupId");
if (groupId != null) {
p.setGroupId(groupId.getValue());
}
Xpp3Dom artifactId = plugin.getChild("artifactId");
if (artifactId != null) {
p.setArtifactId(artifactId.getValue());
}
Xpp3Dom version = plugin.getChild("version");
if (version != null) {
p.setVersion(version.getValue());
}
p.setConfiguration(plugin.getChild("configuration"));
// XXX reportSets
// maven-site-plugin does not appear to apply defaults from plugin.xml (unlike 2.x?)
plugins.add(p);
}
}
}
@SuppressWarnings("deprecation") List<ReportPlugin> m2Plugins = prj.getReportPlugins();
plugins.addAll(m2Plugins);
return plugins;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:42,代码来源:PluginPropertyUtils.java
示例10: definesCheckStyle
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
static boolean definesCheckStyle(MavenProject prj) {
for (ReportPlugin plug : prj.getReportPlugins()) {
if (Constants.GROUP_APACHE_PLUGINS.equals(plug.getGroupId()) &&
Constants.PLUGIN_CHECKSTYLE.equals(plug.getArtifactId())) { //NOI18N
return true;
}
}
return false;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:AuxPropsImpl.java
示例11: writeReportPlugin
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
private void writeReportPlugin(ReportPlugin reportPlugin, String tagName, XmlSerializer serializer)
throws java.io.IOException {
serializer.startTag(NAMESPACE, tagName);
flush(serializer);
StringBuffer b = b(serializer);
int start = b.length();
if ((reportPlugin.getGroupId() != null) && !reportPlugin.getGroupId().equals("org.apache.maven.plugins")) {
writeValue(serializer, "groupId", reportPlugin.getGroupId(), reportPlugin);
}
if (reportPlugin.getArtifactId() != null) {
writeValue(serializer, "artifactId", reportPlugin.getArtifactId(), reportPlugin);
}
if (reportPlugin.getVersion() != null) {
writeValue(serializer, "version", reportPlugin.getVersion(), reportPlugin);
}
if ((reportPlugin.getReportSets() != null) && (reportPlugin.getReportSets().size() > 0)) {
serializer.startTag(NAMESPACE, "reportSets");
for (Iterator iter = reportPlugin.getReportSets().iterator(); iter.hasNext();) {
ReportSet o = (ReportSet) iter.next();
writeReportSet(o, "reportSet", serializer);
}
serializer.endTag(NAMESPACE, "reportSets");
}
if (reportPlugin.getInherited() != null) {
writeValue(serializer, "inherited", reportPlugin.getInherited(), reportPlugin);
}
if (reportPlugin.getConfiguration() != null) {
writeXpp3DOM(serializer, (Xpp3Dom)reportPlugin.getConfiguration(), reportPlugin);
}
serializer.endTag(NAMESPACE, tagName).flush();
logLocation(reportPlugin, "", start, b.length());
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:33,代码来源:LocationAwareMavenXpp3Writer.java
示例12: updateReportPlugin
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
/**
* Method updateReportPlugin
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateReportPlugin( ReportPlugin value, String xmlTag, Counter counter, Element element )
{
Element root = element;
Counter innerCount = new Counter( counter.getDepth() + 1 );
findAndReplaceSimpleElement( innerCount, root, "groupId", value.getGroupId(), "org.apache.maven.plugins" );
findAndReplaceSimpleElement( innerCount, root, "artifactId", value.getArtifactId(), null );
findAndReplaceSimpleElement( innerCount, root, "version", value.getVersion(), null );
findAndReplaceSimpleElement( innerCount, root, "inherited", value.getInherited(), null );
findAndReplaceXpp3DOM( innerCount, root, "configuration", (Xpp3Dom) value.getConfiguration() );
iterateReportSet( innerCount, root, value.getReportSets(), "reportSets", "reportSet" );
}
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:20,代码来源:MavenJDOMWriter.java
示例13: getReportPlugin
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
@CheckForNull
private static ReportPlugin getReportPlugin(Collection<ReportPlugin> plugins, String groupId, String artifactId) {
for (ReportPlugin plugin : plugins) {
if (isEqual(plugin, groupId, artifactId)) {
return plugin;
}
}
return null;
}
开发者ID:SonarSource,项目名称:sonar-scanner-maven,代码行数:10,代码来源:MavenPlugin.java
示例14: compare
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
/**
* Compares to {@link Plugin} or {@link ReportPlugin} instances.
*
* @param o1 the first object
* @param o2 the second object.
* @return the comparison result
* @see java.util.Comparator#compare(Object, Object)
* @since 1.0-beta-1
*/
public int compare( Object o1, Object o2 )
{
if ( !( o1 instanceof Plugin || o1 instanceof ReportPlugin ) )
{
throw new IllegalArgumentException( "This comparator can only be used to compare Plugin and ReportPlugin instances" );
}
if ( !( o2 instanceof Plugin || o2 instanceof ReportPlugin ) )
{
throw new IllegalArgumentException( "This comparator can only be used to compare Plugin and ReportPlugin instances" );
}
String g1 = o1 instanceof Plugin ? ( (Plugin) o1 ).getGroupId() : ( (ReportPlugin) o1 ).getGroupId();
String g2 = o2 instanceof Plugin ? ( (Plugin) o2 ).getGroupId() : ( (ReportPlugin) o2 ).getGroupId();
int r = g1.compareTo( g2 );
if ( r == 0 )
{
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 );
}
if ( r == 0 )
{
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 )
{
// hope I got the +1/-1 the right way around
return v2 == null ? 0 : -1;
}
if ( v2 == null )
{
return 1;
}
r = v1.compareTo( v2 );
}
return r;
}
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:47,代码来源:PluginComparator.java
示例15: toPlugin
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
private static Plugin toPlugin( ReportPlugin reportPlugin )
{
Plugin plugin = new Plugin();
plugin.setGroupId( reportPlugin.getGroupId() );
plugin.setArtifactId( reportPlugin.getArtifactId() );
plugin.setVersion( reportPlugin.getVersion() );
return plugin;
}
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:9,代码来源:DisplayPluginUpdatesMojo.java
示例16: toReportPlugin
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
private static ReportPlugin toReportPlugin( Plugin plugin )
{
ReportPlugin reportPlugin = new ReportPlugin();
reportPlugin.setGroupId( plugin.getGroupId() );
reportPlugin.setArtifactId( plugin.getArtifactId() );
reportPlugin.setVersion( plugin.getVersion() );
return reportPlugin;
}
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:9,代码来源:DisplayPluginUpdatesMojo.java
示例17: toPlugins
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
private static Set<Plugin> toPlugins( Set<ReportPlugin> reportPlugins )
{
Set<Plugin> result;
if ( reportPlugins instanceof LinkedHashSet )
{
result = new LinkedHashSet<>( reportPlugins.size() );
}
else if ( reportPlugins instanceof SortedSet )
{
final Comparator<? super ReportPlugin> comparator =
( (SortedSet<ReportPlugin>) reportPlugins ).comparator();
result = new TreeSet<>( new Comparator<Plugin>()
{
public int compare( Plugin o1, Plugin o2 )
{
return comparator.compare( toReportPlugin( o1 ), toReportPlugin( o2 ) );
}
} );
}
else
{
result = new HashSet<>( reportPlugins.size() );
}
for ( ReportPlugin reportPlugin : reportPlugins )
{
result.add( toPlugin( reportPlugin ) );
}
return result;
}
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:30,代码来源:DisplayPluginUpdatesMojo.java
示例18: compare
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
/**
* Compares to {@link Plugin} or {@link ReportPlugin} instances.
*
* @param o1 the first object
* @param o2 the second object.
* @return the comparison result
* @see java.util.Comparator#compare(Object, Object)
* @since 1.0-beta-1
*/
public int compare( Object o1, Object o2 )
{
if ( !( o1 instanceof Plugin || o1 instanceof ReportPlugin ) )
{
throw new IllegalArgumentException(
"This comparator can only be used to compare Plugin and ReportPlugin instances" );
}
if ( !( o2 instanceof Plugin || o2 instanceof ReportPlugin ) )
{
throw new IllegalArgumentException(
"This comparator can only be used to compare Plugin and ReportPlugin instances" );
}
String g1 = o1 instanceof Plugin ? ( (Plugin) o1 ).getGroupId() : ( (ReportPlugin) o1 ).getGroupId();
String g2 = o2 instanceof Plugin ? ( (Plugin) o2 ).getGroupId() : ( (ReportPlugin) o2 ).getGroupId();
int r = g1.compareTo( g2 );
if ( r == 0 )
{
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 );
}
if ( r == 0 )
{
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 )
{
// hope I got the +1/-1 the right way around
return v2 == null ? 0 : -1;
}
if ( v2 == null )
{
return 1;
}
r = v1.compareTo( v2 );
}
return r;
}
开发者ID:petr-ujezdsky,项目名称:versions-maven-plugin-svn-clone,代码行数:49,代码来源:PluginComparator.java
示例19: toPlugins
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
private static Set<Plugin> toPlugins( Set<ReportPlugin> reportPlugins )
{
Set<Plugin> result;
if ( reportPlugins instanceof LinkedHashSet )
{
result = new LinkedHashSet<Plugin>( reportPlugins.size() );
}
else if ( reportPlugins instanceof SortedSet )
{
final Comparator<? super ReportPlugin> comparator =
( (SortedSet<ReportPlugin>) reportPlugins ).comparator();
result = new TreeSet<Plugin>( new Comparator<Plugin>()
{
public int compare( Plugin o1, Plugin o2 )
{
return comparator.compare( toReportPlugin( o1 ), toReportPlugin( o2 ) );
}
} );
}
else
{
result = new HashSet<Plugin>( reportPlugins.size() );
}
for ( ReportPlugin reportPlugin : reportPlugins )
{
result.add( toPlugin( reportPlugin ) );
}
return result;
}
开发者ID:petr-ujezdsky,项目名称:versions-maven-plugin-svn-clone,代码行数:30,代码来源:DisplayPluginUpdatesMojo.java
示例20: getReportArtifacts
import org.apache.maven.model.ReportPlugin; //导入依赖的package包/类
@Deprecated
public Set<Artifact> getReportArtifacts()
{
if ( reportArtifacts != null )
{
return reportArtifacts;
}
reportArtifacts = new HashSet<Artifact>();
if ( repositorySystem != null )
{
for ( ReportPlugin p : getReportPlugins() )
{
Plugin pp = new Plugin();
pp.setGroupId( p.getGroupId() );
pp.setArtifactId( p.getArtifactId() );
pp.setVersion( p.getVersion() );
Artifact artifact = repositorySystem.createPluginArtifact( pp );
if ( artifact != null )
{
reportArtifacts.add( artifact );
}
}
}
reportArtifactMap = null;
return reportArtifacts;
}
开发者ID:gems-uff,项目名称:oceano,代码行数:33,代码来源:MavenProject.java
注:本文中的org.apache.maven.model.ReportPlugin类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论