Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
maven-model-builder-3.5.4.jar - Model Builder Module
maven-model-builder-3.5.4.jar is the JAR file for Apache Maven 3.5.4 Model Builder module.
Apache Maven is a software project management and comprehension tool.
JAR File Size and Download Location:
File: 2018-06-17 19:31 177426 lib\maven-model-builder-3.5.4.jar Download: Apache Maven Website
✍: FYIcenter.com
⏎ org/apache/maven/model/plugin/DefaultReportingConverter.java
package org.apache.maven.model.plugin; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.model.Build; import org.apache.maven.model.Model; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginManagement; import org.apache.maven.model.ReportPlugin; import org.apache.maven.model.ReportSet; import org.apache.maven.model.Reporting; import org.apache.maven.model.building.ModelBuildingRequest; import org.apache.maven.model.building.ModelProblemCollector; import org.apache.maven.model.building.ModelProblemCollectorRequest; import org.apache.maven.model.building.ModelProblem.Severity; import org.apache.maven.model.building.ModelProblem.Version; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.Xpp3Dom; /** * Handles conversion of the <code><reporting></code> section into the configuration of Maven Site Plugin 3.x, * i.e. <code>reportPlugins</code> and <code>outputDirectory</code> parameters. * * @author Benjamin Bentmann */ @Component( role = ReportingConverter.class ) public class DefaultReportingConverter implements ReportingConverter { @Override public void convertReporting( Model model, ModelBuildingRequest request, ModelProblemCollector problems ) { Reporting reporting = model.getReporting(); if ( reporting == null ) { return; } Build build = model.getBuild(); if ( build == null ) { build = new Build(); model.setBuild( build ); } Plugin sitePlugin = findSitePlugin( build ); if ( sitePlugin == null ) { sitePlugin = new Plugin(); sitePlugin.setArtifactId( "maven-site-plugin" ); PluginManagement pluginManagement = build.getPluginManagement(); if ( pluginManagement == null ) { pluginManagement = new PluginManagement(); build.setPluginManagement( pluginManagement ); } pluginManagement.addPlugin( sitePlugin ); } Xpp3Dom configuration = (Xpp3Dom) sitePlugin.getConfiguration(); if ( configuration == null ) { configuration = new Xpp3Dom( "configuration" ); sitePlugin.setConfiguration( configuration ); } Xpp3Dom reportPlugins = configuration.getChild( "reportPlugins" ); if ( reportPlugins != null ) { // new-style report configuration already present: warn since this new style has been deprecated // in favor of classical reporting section MSITE-647 / MSITE-684 problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.BASE ) .setMessage( "Reporting configuration should be done in <reporting> section, " + "not in maven-site-plugin <configuration> as reportPlugins parameter." ) .setLocation( sitePlugin.getLocation( "configuration" ) ) ); return; } if ( configuration.getChild( "outputDirectory" ) == null ) { addDom( configuration, "outputDirectory", reporting.getOutputDirectory() ); } reportPlugins = new Xpp3Dom( "reportPlugins" ); configuration.addChild( reportPlugins ); boolean hasMavenProjectInfoReportsPlugin = false; /* waiting for MSITE-484 before deprecating <reporting> section if ( !reporting.getPlugins().isEmpty() && request.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 ) { problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V31 ) .setMessage( "The <reporting> section is deprecated, please move the reports to the <configuration>" + " section of the new Maven Site Plugin." ) .setLocation( reporting.getLocation( "" ) ) ); }*/ for ( ReportPlugin plugin : reporting.getPlugins() ) { Xpp3Dom reportPlugin = convert( plugin ); reportPlugins.addChild( reportPlugin ); if ( !reporting.isExcludeDefaults() && !hasMavenProjectInfoReportsPlugin && "org.apache.maven.plugins".equals( plugin.getGroupId() ) && "maven-project-info-reports-plugin".equals( plugin.getArtifactId() ) ) { hasMavenProjectInfoReportsPlugin = true; } } if ( !reporting.isExcludeDefaults() && !hasMavenProjectInfoReportsPlugin ) { Xpp3Dom dom = new Xpp3Dom( "reportPlugin" ); addDom( dom, "groupId", "org.apache.maven.plugins" ); addDom( dom, "artifactId", "maven-project-info-reports-plugin" ); reportPlugins.addChild( dom ); } } private Plugin findSitePlugin( Build build ) { for ( Plugin plugin : build.getPlugins() ) { if ( isSitePlugin( plugin ) ) { return plugin; } } PluginManagement pluginManagement = build.getPluginManagement(); if ( pluginManagement != null ) { for ( Plugin plugin : pluginManagement.getPlugins() ) { if ( isSitePlugin( plugin ) ) { return plugin; } } } return null; } private boolean isSitePlugin( Plugin plugin ) { return "maven-site-plugin".equals( plugin.getArtifactId() ) && "org.apache.maven.plugins".equals( plugin.getGroupId() ); } 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; } private Xpp3Dom convert( ReportSet reportSet ) { Xpp3Dom dom = new Xpp3Dom( "reportSet" ); addDom( dom, "id", reportSet.getId() ); Xpp3Dom configuration = (Xpp3Dom) reportSet.getConfiguration(); if ( configuration != null ) { configuration = new Xpp3Dom( configuration ); dom.addChild( configuration ); } if ( !reportSet.getReports().isEmpty() ) { Xpp3Dom reports = new Xpp3Dom( "reports" ); for ( String report : reportSet.getReports() ) { addDom( reports, "report", report ); } dom.addChild( reports ); } return dom; } private void addDom( Xpp3Dom parent, String childName, String childValue ) { if ( StringUtils.isNotEmpty( childValue ) ) { parent.addChild( newDom( childName, childValue ) ); } } private Xpp3Dom newDom( String name, String value ) { Xpp3Dom dom = new Xpp3Dom( name ); dom.setValue( value ); return dom; } }
⏎ org/apache/maven/model/plugin/DefaultReportingConverter.java
Or download all of them as a single archive file:
File name: maven-model-builder-3.5.4-src.zip File size: 146807 bytes Release date: 2018-06-17 Download
⇐ maven-settings-builder-3.5.4.jar - Maven Settings Builder Module
2023-06-19, ≈13🔥, 0💬
Popular Posts:
Apache ZooKeeper is an open-source server which enables highly reliable distributed coordination. Ap...
maven-core-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Core module. Apache Maven is a software ...
What Is junit-3.8.1.jar? junit-3.8.1.jar is the version 3.8.1 of JUnit JAR library file. JUnit is a ...
JRE 8 deploy.jar is the JAR file for JRE 8 Java Control Panel and other deploy tools. JRE (Java Runt...
How to download and install xml-commons External Source Package? The source package contains Java so...