This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch fixes in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git
commit 8c2f8a351bb4e16aaf635eed037bfe57a74989ce Author: Michael Osipov <micha...@apache.org> AuthorDate: Tue May 9 16:14:29 2023 +0200 [MPLUGIN-467] Remove reporting from maven-plugin-plugin --- maven-plugin-plugin/pom.xml | 18 - .../plugin/plugin/report_old/PluginReport.java | 759 --------------------- .../plugin/plugin/report_old/Requirements.java | 86 --- .../plugin/report_old/RequirementsHistory.java | 64 -- .../EnhancedPluginDescriptorBuilder.java | 97 --- .../src/main/resources/plugin-report.properties | 54 -- .../src/main/resources/plugin-report_de.properties | 54 -- .../src/main/resources/plugin-report_en.properties | 23 - .../src/main/resources/plugin-report_fr.properties | 54 -- .../src/main/resources/plugin-report_sv.properties | 54 -- maven-plugin-report-plugin/pom.xml | 8 +- .../src/it/mplugin-187/invoker.properties | 6 +- .../src/it/mplugin-187/pom.xml | 6 +- maven-plugin-tools-generators/pom.xml | 1 - pom.xml | 31 +- 15 files changed, 16 insertions(+), 1299 deletions(-) diff --git a/maven-plugin-plugin/pom.xml b/maven-plugin-plugin/pom.xml index b354b7ed..d2424d3b 100644 --- a/maven-plugin-plugin/pom.xml +++ b/maven-plugin-plugin/pom.xml @@ -93,16 +93,6 @@ <optional>true</optional> </dependency> - <!-- doxia --> - <dependency> - <groupId>org.apache.maven.doxia</groupId> - <artifactId>doxia-sink-api</artifactId> - </dependency> - <dependency> - <groupId>org.apache.maven.doxia</groupId> - <artifactId>doxia-site-renderer</artifactId> - </dependency> - <!-- Maven --> <dependency> <groupId>org.apache.maven</groupId> @@ -126,12 +116,6 @@ <scope>provided</scope> </dependency> - <!-- shared --> - <dependency> - <groupId>org.apache.maven.reporting</groupId> - <artifactId>maven-reporting-impl</artifactId> - </dependency> - <!-- plexus --> <dependency> <groupId>org.codehaus.plexus</groupId> @@ -291,8 +275,6 @@ <streamLogsOnFailures>true</streamLogsOnFailures> <showErrors>true</showErrors> <filterProperties> - <sitePluginVersion>3.12.1</sitePluginVersion> - <projectInfoReportsPlugin>3.4.1</projectInfoReportsPlugin> <antVersion>${antVersion}</antVersion> </filterProperties> <properties> diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/PluginReport.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/PluginReport.java deleted file mode 100644 index d50295da..00000000 --- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/PluginReport.java +++ /dev/null @@ -1,759 +0,0 @@ -/* - * 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. - */ -package org.apache.maven.plugin.plugin.report_old; - -import java.io.File; -import java.io.IOException; -import java.io.Reader; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.ResourceBundle; - -import org.apache.maven.doxia.sink.Sink; -import org.apache.maven.model.Plugin; -import org.apache.maven.plugin.descriptor.MojoDescriptor; -import org.apache.maven.plugin.descriptor.PluginDescriptor; -import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder; -import org.apache.maven.plugin.plugin.DescriptorGeneratorMojo; -import org.apache.maven.plugins.annotations.Component; -import org.apache.maven.plugins.annotations.Execute; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.plugin.descriptor_old.EnhancedPluginDescriptorBuilder; -import org.apache.maven.project.MavenProject; -import org.apache.maven.reporting.AbstractMavenReport; -import org.apache.maven.reporting.AbstractMavenReportRenderer; -import org.apache.maven.reporting.MavenReportException; -import org.apache.maven.rtinfo.RuntimeInformation; -import org.apache.maven.tools.plugin.DefaultPluginToolsRequest; -import org.apache.maven.tools.plugin.PluginToolsRequest; -import org.apache.maven.tools.plugin.generator.GeneratorException; -import org.apache.maven.tools.plugin.generator.GeneratorUtils; -import org.apache.maven.tools.plugin.generator.PluginXdocGenerator; -import org.apache.maven.tools.plugin.util.PluginUtils; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.xml.XmlStreamReader; -import org.codehaus.plexus.util.xml.Xpp3Dom; - -/** - * Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, - * and one <code><i>goal</i>-mojo.html</code> per goal. - * Relies on one output file from {@link DescriptorGeneratorMojo}. - * - * @author <a href="snic...@apache.org">Stephane Nicoll</a> - * @author <a href="mailto:vincent.sive...@gmail.com">Vincent Siveton</a> - * @since 2.0 - * @deprecated use the maven-plugin-report-plugin instead - */ -@Deprecated -@Mojo(name = "report", threadSafe = true) -@Execute(phase = LifecyclePhase.PROCESS_CLASSES) -public class PluginReport extends AbstractMavenReport { - /** - * Report output directory for mojos' documentation. - */ - @Parameter(defaultValue = "${project.build.directory}/generated-site/xdoc") - private File outputDirectory; - - /** - * The file encoding of the source files. - * - * @deprecated not used in report, will be removed in the next major version - * - * @since 2.7 - */ - @Deprecated - @Parameter(property = "encoding", defaultValue = "${project.build.sourceEncoding}") - private String encoding; - - /** - * Specify some requirements to execute this plugin. - * Example: - * <pre> - * <requirements> - * <maven>2.0</maven> - * <jdk>1.4</jdk> - * <memory>256m</memory> - * <diskSpace>1m</diskSpace> - * <others> - * <property> - * <name>SVN</name> - * <value>1.4.6</value> - * </property> - * </others> - * </requirements> - * </pre> - * <p> - * If not is specified, Maven requirement is extracted from - * <code><project><prerequisites><maven></code> - * and JDK requirement is extracted from maven-compiler-plugin configuration. - * - * @deprecated will be removed in the next major version, please don't use - */ - @Deprecated - @Parameter - private Requirements requirements; - - /** - * <p> - * The goal prefix that will appear before the ":". - * By default, this plugin applies a heuristic to derive a heuristic from - * the plugin's artifactId. - * </p> - * <p> - * It removes any occurrences of the regular expression <strong>-?maven-?</strong>, - * and then removes any occurrences of <strong>-?plugin-?</strong>. - * </p> - * <p> - * For example, horsefeature-maven-plugin becomes horsefeature. - * </p> - * <p> - * (There is a special case for maven-plugin-plugin: it is mapped to 'plugin') - * </p> - * - * @deprecated not used in report, will be removed in the next major version - * - * @since 2.4 - */ - @Deprecated - @Parameter(property = "goalPrefix") - protected String goalPrefix; - - /** - * Set this to "true" to skip invoking any goals or reports of the plugin. - * - * @deprecated use {@link #skip} parameter instead - * - * @since 2.8 - */ - @Deprecated - @Parameter(defaultValue = "false", property = "maven.plugin.skip") - private boolean skipReport; - - /** - * Set this to "true" to skip generating the report. - * - * @since 2.8 - */ - @Parameter(defaultValue = "false", property = "maven.plugin.report.skip") - private boolean skip; - - /** - * Set this to "true" to generate the usage section for "plugin-info.html" with - * {@code <extensions>true</extensions>}. - * - * @since 3.7.0 - */ - @Parameter(defaultValue = "false", property = "maven.plugin.report.hasExtensionsToLoad") - private boolean hasExtensionsToLoad; - - /** - * The Plugin requirements history list. - * <p> - * Can be specified as list of <code>requirementsHistory</code>: - * - * <pre> - * <requirementsHistories> - * <requirementsHistory> - * <version>plugin version</version> - * <maven>maven version</maven> - * <jdk>jdk version</jdk> - * </requirementsHistory> - * </requirementsHistories> - * </pre> - * - * @since 3.7.0 - */ - @Parameter - private List<RequirementsHistory> requirementsHistories = new ArrayList<>(); - - /** - * @since 3.5.1 - */ - @Component - private RuntimeInformation rtInfo; - - /** - * Path to {@code plugin.xml} plugin descriptor to generate the report from. - * - * @since 3.5.1 - * @deprecated No longer evaluated, use {@link #enhancedPluginXmlFile}. - */ - @Parameter( - defaultValue = "${project.build.outputDirectory}/META-INF/maven/plugin.xml", - required = true, - readonly = true) - @Deprecated - private File pluginXmlFile; - - /** - * Path to enhanced plugin descriptor to generate the report from (must contain some XHTML values) - * - * @since 3.7.0 - */ - @Parameter(defaultValue = "${project.build.directory}/plugin-enhanced.xml", required = true, readonly = true) - private File enhancedPluginXmlFile; - - /** - * In case the internal javadoc site has not been generated when running this report goal - * (e.g. when using an aggregator javadoc report) link validation needs to be disabled by setting - * this value to {@code true}. - * This might have the drawback that some links being generated in the report might be broken - * in case not all parameter types and javadoc link references are resolvable through the sites being given to - * {@link DescriptorGeneratorMojo}. - * - * @since 3.7.0 - */ - @Parameter(property = "maven.plugin.report.disableInternalJavadocLinkValidation") - private boolean disableInternalJavadocLinkValidation; - - /** - * {@inheritDoc} - */ - @Override - protected String getOutputDirectory() { - // PLUGIN-191: output directory of plugin.html, not *-mojo.xml - return project.getReporting().getOutputDirectory(); - } - - /** - * {@inheritDoc} - */ - @Override - public boolean canGenerateReport() { - return enhancedPluginXmlFile != null && enhancedPluginXmlFile.isFile() && enhancedPluginXmlFile.canRead(); - } - - /** - * {@inheritDoc} - */ - @Override - protected void executeReport(Locale locale) throws MavenReportException { - getLog().warn("The 'report' goal of the maven-plugin-plugin is deprecated, please use " - + "the 'report' goal from the maven-plugin-report-plugin instead. This goal will be removed " - + "in version 4.0.0."); - - if (skip || skipReport) { - getLog().info("Maven Plugin Plugin Report generation skipped."); - return; - } - - PluginDescriptor pluginDescriptor = extractPluginDescriptor(); - - // Generate the mojos' documentation - generateMojosDocumentation(pluginDescriptor, locale); - - // Write the overview - PluginOverviewRenderer r = new PluginOverviewRenderer( - getProject(), - requirements, - requirementsHistories, - getSink(), - pluginDescriptor, - locale, - hasExtensionsToLoad); - r.render(); - } - - private PluginDescriptor extractPluginDescriptor() throws MavenReportException { - PluginDescriptorBuilder builder = new EnhancedPluginDescriptorBuilder(rtInfo); - - try (Reader input = new XmlStreamReader(Files.newInputStream(enhancedPluginXmlFile.toPath()))) { - return builder.build(input); - } catch (IOException | PlexusConfigurationException e) { - throw new MavenReportException("Error extracting plugin descriptor from " + enhancedPluginXmlFile, e); - } - } - - /** - * {@inheritDoc} - */ - @Override - public String getDescription(Locale locale) { - return getBundle(locale).getString("report.plugin.description"); - } - - /** - * {@inheritDoc} - */ - @Override - public String getName(Locale locale) { - return getBundle(locale).getString("report.plugin.name"); - } - - /** - * {@inheritDoc} - */ - @Override - public String getOutputName() { - return "plugin-info"; - } - - /** - * Generate the mojos documentation, as xdoc files. - * - * @param pluginDescriptor not null - * @param locale not null - * @throws MavenReportException if any - */ - private void generateMojosDocumentation(PluginDescriptor pluginDescriptor, Locale locale) - throws MavenReportException { - try { - File outputDir = outputDirectory; - outputDir.mkdirs(); - - PluginXdocGenerator generator = new PluginXdocGenerator( - getProject(), locale, getReportOutputDirectory(), disableInternalJavadocLinkValidation); - PluginToolsRequest pluginToolsRequest = new DefaultPluginToolsRequest(getProject(), pluginDescriptor); - generator.execute(outputDir, pluginToolsRequest); - } catch (GeneratorException e) { - throw new MavenReportException("Error writing plugin documentation", e); - } - } - - /** - * @param locale not null - * @return the bundle for this report - */ - protected static ResourceBundle getBundle(Locale locale) { - return ResourceBundle.getBundle("plugin-report", locale, PluginReport.class.getClassLoader()); - } - - /** - * Generates an overview page with the list of goals - * and a link to the goal's page. - */ - static class PluginOverviewRenderer extends AbstractMavenReportRenderer { - private final MavenProject project; - - private final Requirements requirements; - - private final List<RequirementsHistory> requirementsHistories; - - private final PluginDescriptor pluginDescriptor; - - private final Locale locale; - - private final boolean hasExtensionsToLoad; - - /** - * @param project not null - * @param requirements not null - * @param requirementsHistories not null - * @param sink not null - * @param pluginDescriptor not null - * @param locale not null - */ - PluginOverviewRenderer( - MavenProject project, - Requirements requirements, - List<RequirementsHistory> requirementsHistories, - Sink sink, - PluginDescriptor pluginDescriptor, - Locale locale, - boolean hasExtensionsToLoad) { - super(sink); - - this.project = project; - - this.requirements = requirements == null ? new Requirements() : requirements; - - this.requirementsHistories = requirementsHistories; - - this.pluginDescriptor = pluginDescriptor; - - this.locale = locale; - - this.hasExtensionsToLoad = hasExtensionsToLoad; - } - - /** - * {@inheritDoc} - */ - @Override - public String getTitle() { - return getBundle(locale).getString("report.plugin.title"); - } - - /** - * {@inheritDoc} - */ - @Override - public void renderBody() { - startSection(getTitle()); - - if (!(pluginDescriptor.getMojos() != null - && pluginDescriptor.getMojos().size() > 0)) { - paragraph(getBundle(locale).getString("report.plugin.goals.nogoal")); - endSection(); - return; - } - - paragraph(getBundle(locale).getString("report.plugin.goals.intro")); - - boolean hasMavenReport = false; - for (Iterator<MojoDescriptor> i = pluginDescriptor.getMojos().iterator(); i.hasNext(); ) { - MojoDescriptor mojo = i.next(); - - if (GeneratorUtils.isMavenReport(mojo.getImplementation(), project)) { - hasMavenReport = true; - } - } - - startTable(); - - String goalColumnName = getBundle(locale).getString("report.plugin.goals.column.goal"); - String isMavenReport = getBundle(locale).getString("report.plugin.goals.column.isMavenReport"); - String descriptionColumnName = getBundle(locale).getString("report.plugin.goals.column.description"); - if (hasMavenReport) { - tableHeader(new String[] {goalColumnName, isMavenReport, descriptionColumnName}); - } else { - tableHeader(new String[] {goalColumnName, descriptionColumnName}); - } - - List<MojoDescriptor> mojos = new ArrayList<>(); - mojos.addAll(pluginDescriptor.getMojos()); - PluginUtils.sortMojos(mojos); - for (MojoDescriptor mojo : mojos) { - String goalName = mojo.getFullGoalName(); - - /* - * Added ./ to define a relative path - * @see AbstractMavenReportRenderer#getValidHref(java.lang.String) - */ - String goalDocumentationLink = "./" + mojo.getGoal() + "-mojo.html"; - - String description; - if (StringUtils.isNotEmpty(mojo.getDeprecated())) { - description = "<strong>" + getBundle(locale).getString("report.plugin.goal.deprecated") - + "</strong> " + mojo.getDeprecated(); - } else if (StringUtils.isNotEmpty(mojo.getDescription())) { - description = mojo.getDescription(); - } else { - description = getBundle(locale).getString("report.plugin.goal.nodescription"); - } - - sink.tableRow(); - tableCell(createLinkPatternedText(goalName, goalDocumentationLink)); - if (hasMavenReport) { - if (GeneratorUtils.isMavenReport(mojo.getImplementation(), project)) { - sink.tableCell(); - sink.text(getBundle(locale).getString("report.plugin.isReport")); - sink.tableCell_(); - } else { - sink.tableCell(); - sink.text(getBundle(locale).getString("report.plugin.isNotReport")); - sink.tableCell_(); - } - } - tableCell(description, true); - sink.tableRow_(); - } - - endTable(); - - startSection(getBundle(locale).getString("report.plugin.systemrequirements")); - - paragraph(getBundle(locale).getString("report.plugin.systemrequirements.intro")); - - startTable(); - - String maven = discoverMavenRequirement(project, requirements); - sink.tableRow(); - tableCell(getBundle(locale).getString("report.plugin.systemrequirements.maven")); - tableCell( - (maven != null - ? maven - : getBundle(locale).getString("report.plugin.systemrequirements.nominimum"))); - sink.tableRow_(); - - String jdk = discoverJdkRequirement(project, requirements); - sink.tableRow(); - tableCell(getBundle(locale).getString("report.plugin.systemrequirements.jdk")); - tableCell((jdk != null ? jdk : getBundle(locale).getString("report.plugin.systemrequirements.nominimum"))); - sink.tableRow_(); - - String memory = requirements.getMemory(); - if (memory != null && !memory.isEmpty()) { - sink.tableRow(); - tableCell(getBundle(locale).getString("report.plugin.systemrequirements.memory")); - tableCell(memory); - sink.tableRow_(); - } - - String diskSpace = requirements.getDiskSpace(); - if (diskSpace != null && !diskSpace.isEmpty()) { - sink.tableRow(); - tableCell(getBundle(locale).getString("report.plugin.systemrequirements.diskspace")); - tableCell(diskSpace); - sink.tableRow_(); - } - - if (requirements.getOthers() != null && requirements.getOthers().size() > 0) { - for (Iterator it = requirements.getOthers().keySet().iterator(); it.hasNext(); ) { - String key = it.next().toString(); - - sink.tableRow(); - tableCell(key); - tableCell( - (StringUtils.isNotEmpty(requirements.getOthers().getProperty(key)) - ? requirements.getOthers().getProperty(key) - : getBundle(locale).getString("report.plugin.systemrequirements.nominimum"))); - sink.tableRow_(); - } - } - endTable(); - - endSection(); - - renderRequirementsHistories(); - - renderUsageSection(hasMavenReport); - - endSection(); - } - - private void renderRequirementsHistories() { - if (requirementsHistories.isEmpty()) { - return; - } - - startSection(getBundle(locale).getString("report.plugin.systemrequirements.history")); - paragraph(getBundle(locale).getString("report.plugin.systemrequirements.history.intro")); - - startTable(); - tableHeader(new String[] { - getBundle(locale).getString("report.plugin.systemrequirements.history.version"), - getBundle(locale).getString("report.plugin.systemrequirements.history.maven"), - getBundle(locale).getString("report.plugin.systemrequirements.history.jdk") - }); - - requirementsHistories.forEach(requirementsHistory -> { - sink.tableRow(); - tableCell(requirementsHistory.getVersion()); - tableCell(requirementsHistory.getMaven()); - tableCell(requirementsHistory.getJdk()); - sink.tableRow_(); - }); - endTable(); - - endSection(); - } - - /** - * Render the section about the usage of the plugin. - * - * @param hasMavenReport If the plugin has a report or not - */ - private void renderUsageSection(boolean hasMavenReport) { - startSection(getBundle(locale).getString("report.plugin.usage")); - - // Configuration - sink.paragraph(); - text(getBundle(locale).getString("report.plugin.usage.intro")); - sink.paragraph_(); - - StringBuilder sb = new StringBuilder(); - sb.append("<project>").append('\n'); - sb.append(" ...").append('\n'); - sb.append(" <build>").append('\n'); - sb.append(" <!-- " + getBundle(locale).getString("report.plugin.usage.pluginManagement") + " -->") - .append('\n'); - sb.append(" <pluginManagement>").append('\n'); - sb.append(" <plugins>").append('\n'); - sb.append(" <plugin>").append('\n'); - sb.append(" <groupId>") - .append(pluginDescriptor.getGroupId()) - .append("</groupId>") - .append('\n'); - sb.append(" <artifactId>") - .append(pluginDescriptor.getArtifactId()) - .append("</artifactId>") - .append('\n'); - sb.append(" <version>") - .append(pluginDescriptor.getVersion()) - .append("</version>") - .append('\n'); - if (hasExtensionsToLoad) { - sb.append(" <extensions>true</extensions>").append('\n'); - } - sb.append(" </plugin>").append('\n'); - sb.append(" ...").append('\n'); - sb.append(" </plugins>").append('\n'); - sb.append(" </pluginManagement>").append('\n'); - sb.append(" <!-- " + getBundle(locale).getString("report.plugin.usage.plugins") + " -->") - .append('\n'); - sb.append(" <plugins>").append('\n'); - sb.append(" <plugin>").append('\n'); - sb.append(" <groupId>") - .append(pluginDescriptor.getGroupId()) - .append("</groupId>") - .append('\n'); - sb.append(" <artifactId>") - .append(pluginDescriptor.getArtifactId()) - .append("</artifactId>") - .append('\n'); - sb.append(" </plugin>").append('\n'); - sb.append(" ...").append('\n'); - sb.append(" </plugins>").append('\n'); - sb.append(" </build>").append('\n'); - - if (hasMavenReport) { - sb.append(" ...").append('\n'); - sb.append(" <!-- " + getBundle(locale).getString("report.plugin.usage.reporting") + " -->") - .append('\n'); - sb.append(" <reporting>").append('\n'); - sb.append(" <plugins>").append('\n'); - sb.append(" <plugin>").append('\n'); - sb.append(" <groupId>") - .append(pluginDescriptor.getGroupId()) - .append("</groupId>") - .append('\n'); - sb.append(" <artifactId>") - .append(pluginDescriptor.getArtifactId()) - .append("</artifactId>") - .append('\n'); - sb.append(" <version>") - .append(pluginDescriptor.getVersion()) - .append("</version>") - .append('\n'); - sb.append(" </plugin>").append('\n'); - sb.append(" ...").append('\n'); - sb.append(" </plugins>").append('\n'); - sb.append(" </reporting>").append('\n'); - } - - sb.append(" ...").append('\n'); - sb.append("</project>").append('\n'); - - verbatimText(sb.toString()); - - sink.paragraph(); - linkPatternedText(getBundle(locale).getString("report.plugin.configuration.end")); - sink.paragraph_(); - - endSection(); - } - - /** - * Try to lookup on the Maven prerequisites property. - * If not specified, uses the value defined by the user. - * - * @param project not null - * @param requirements not null - * @return the Maven version - */ - private static String discoverMavenRequirement(MavenProject project, Requirements requirements) { - String maven = requirements.getMaven(); - if (maven == null) { - maven = project.getPrerequisites() != null - ? project.getPrerequisites().getMaven() - : null; - } - if (maven == null) { - maven = "2.0"; - } - - return maven; - } - - /** - * <ol> - * <li>use configured jdk requirement</li> - * <li>use <code>target</code> configuration of <code>org.apache.maven.plugins:maven-compiler-plugin</code></li> - * <li>use <code>target</code> configuration of <code>org.apache.maven.plugins:maven-compiler-plugin</code> in - * <code>pluginManagement</code></li> - * <li>use <code>maven.compiler.target</code> property</li> - * </ol> - * - * @param project not null - * @param requirements not null - * @return the JDK version - */ - private static String discoverJdkRequirement(MavenProject project, Requirements requirements) { - String jdk = requirements.getJdk(); - - if (jdk != null) { - return jdk; - } - - Plugin compiler = getCompilerPlugin(project.getBuild().getPluginsAsMap()); - if (compiler == null) { - compiler = getCompilerPlugin(project.getPluginManagement().getPluginsAsMap()); - } - - jdk = getPluginParameter(compiler, "release"); - if (jdk != null) { - return jdk; - } - - jdk = project.getProperties().getProperty("maven.compiler.release"); - if (jdk != null) { - return jdk; - } - - jdk = getPluginParameter(compiler, "target"); - if (jdk != null) { - return jdk; - } - - // default value - jdk = project.getProperties().getProperty("maven.compiler.target"); - if (jdk != null) { - return jdk; - } - - // return "1.5" by default? - - String version = (compiler == null) ? null : compiler.getVersion(); - - if (version != null) { - return "Default target for maven-compiler-plugin version " + version; - } - - return "Unknown"; - } - - private static Plugin getCompilerPlugin(Map<String, Plugin> pluginsAsMap) { - return pluginsAsMap.get("org.apache.maven.plugins:maven-compiler-plugin"); - } - - private static String getPluginParameter(Plugin plugin, String parameter) { - if (plugin != null) { - Xpp3Dom pluginConf = (Xpp3Dom) plugin.getConfiguration(); - - if (pluginConf != null) { - Xpp3Dom target = pluginConf.getChild(parameter); - - if (target != null) { - return target.getValue(); - } - } - } - - return null; - } - } -} diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/Requirements.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/Requirements.java deleted file mode 100644 index c5302f42..00000000 --- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/Requirements.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ -package org.apache.maven.plugin.plugin.report_old; - -import java.util.Properties; - -/** - * Plugin requirements. - * - * @deprecated will be removed in the next major version - */ -@Deprecated -public class Requirements { - /** - * The minimum version of Maven to run this plugin. - */ - private String maven; - - /** - * The minimum version of the JDK to run this plugin. - */ - private String jdk; - - /** - * The minimum memory needed to run this plugin. - */ - private String memory; - - /** - * The minimum diskSpace needed to run this plugin. - */ - private String diskSpace; - - /** - * Field others. - */ - private java.util.Properties others; - - public String getMaven() { - return maven; - } - - public String getJdk() { - return jdk; - } - - public String getMemory() { - return memory; - } - - public String getDiskSpace() { - return diskSpace; - } - - public Properties getOthers() { - return others; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("Requirements{"); - sb.append("maven='").append(maven).append('\''); - sb.append(", jdk='").append(jdk).append('\''); - sb.append(", memory='").append(memory).append('\''); - sb.append(", diskSpace='").append(diskSpace).append('\''); - sb.append(", others=").append(others); - sb.append('}'); - return sb.toString(); - } -} diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/RequirementsHistory.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/RequirementsHistory.java deleted file mode 100644 index 974b3dfd..00000000 --- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/RequirementsHistory.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ -package org.apache.maven.plugin.plugin.report_old; - -/** - * Plugin requirements history. - * - * @author Slawomir Jaranowski - */ -@Deprecated -public class RequirementsHistory { - /** - * The plugin version. - */ - private String version; - - /** - * The minimum version of Maven to run this plugin. - */ - private String maven; - - /** - * The minimum version of the JDK to run this plugin. - */ - private String jdk; - - public String getVersion() { - return version; - } - - public String getMaven() { - return maven; - } - - public String getJdk() { - return jdk; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("RequirementsHistory{"); - sb.append("version='").append(version).append('\''); - sb.append(", maven='").append(maven).append('\''); - sb.append(", jdk='").append(jdk).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor_old/EnhancedPluginDescriptorBuilder.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor_old/EnhancedPluginDescriptorBuilder.java deleted file mode 100644 index c62b9e7c..00000000 --- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor_old/EnhancedPluginDescriptorBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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. - */ -package org.apache.maven.plugins.plugin.descriptor_old; - -import java.net.URI; - -import org.apache.maven.plugin.descriptor.MojoDescriptor; -import org.apache.maven.plugin.descriptor.Parameter; -import org.apache.maven.plugin.descriptor.PluginDescriptor; -import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder; -import org.apache.maven.plugin.plugin.report_old.PluginReport; -import org.apache.maven.rtinfo.RuntimeInformation; -import org.apache.maven.tools.plugin.EnhancedParameterWrapper; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -/** - * Reads enhanced plugin.xml files as generated by - * {@link org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator} and - * used by {@link PluginReport}. - * Populates the slightly extended {@link Parameter} object {@link EnhancedParameterWrapper}. - */ -@Deprecated -public class EnhancedPluginDescriptorBuilder extends PluginDescriptorBuilder { - private final boolean requireAddingMissingParameterSinceField; - - public EnhancedPluginDescriptorBuilder(RuntimeInformation rtInfo) { - this(rtInfo.isMavenVersion("[,3.3.9]")); - } - - EnhancedPluginDescriptorBuilder(boolean requireAddingMissingParameterSinceField) { - this.requireAddingMissingParameterSinceField = requireAddingMissingParameterSinceField; - } - - @Override - public MojoDescriptor buildComponentDescriptor(PlexusConfiguration c, PluginDescriptor pluginDescriptor) - throws PlexusConfigurationException { - MojoDescriptor mojoDescriptor = super.buildComponentDescriptor(c, pluginDescriptor); - - // ---------------------------------------------------------------------- - // Parameters - // ---------------------------------------------------------------------- - - PlexusConfiguration[] parameterConfigurations = c.getChild("parameters").getChildren("parameter"); - - for (PlexusConfiguration d : parameterConfigurations) { - String parameterName = d.getChild("name").getValue(); - // don't call getParameterMap() to not populate - Parameter pd = mojoDescriptor.getParameterMap().get(parameterName); - if (requireAddingMissingParameterSinceField) { - addMissingParameterSinceField(pd, d); - } - PlexusConfiguration configTypeJavadocUrl = d.getChild("typeJavadocUrl", false); - if (configTypeJavadocUrl != null) { - String parameterTypeJavadocUrl = configTypeJavadocUrl.getValue(); - EnhancedParameterWrapper enhancedParameter = new EnhancedParameterWrapper(pd); - enhancedParameter.setTypeJavadocUrl(URI.create(parameterTypeJavadocUrl)); - mojoDescriptor - .getParameters() - .set(mojoDescriptor.getParameters().indexOf(pd), enhancedParameter); - mojoDescriptor.getParameterMap().put(parameterName, enhancedParameter); - } - } - return mojoDescriptor; - } - - /** - * Reads the plugin descriptor and adds the fix for <a href="https://issues.apache.org/jira/browse/MNG-6109"> - * MNG-6109</a> when using Maven-3.3.9 and before. - * Method can be removed once Maven 3.5.0 is the prerequisite for this plugin. - * @throws PlexusConfigurationException - * - * @since 3.5.1 - * @see <a href="https://issues.apache.org/jira/browse/MNG-6109">MNG-6109</a> - * @see <a href="https://issues.apache.org/jira/browse/MPLUGIN-319">MPLUGIN-319</a> - */ - void addMissingParameterSinceField(Parameter pd, PlexusConfiguration d) throws PlexusConfigurationException { - String parameterSince = d.getChild("since").getValue(); - pd.setSince(parameterSince); - } -} diff --git a/maven-plugin-plugin/src/main/resources/plugin-report.properties b/maven-plugin-plugin/src/main/resources/plugin-report.properties deleted file mode 100644 index 7d9c45b5..00000000 --- a/maven-plugin-plugin/src/main/resources/plugin-report.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# 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. -# - -report.plugin.name=Plugin Documentation -report.plugin.description=This report provides goals and parameters documentation of a plugin. -report.plugin.title=Plugin Documentation - -report.plugin.goals.nogoal=No goals defined in this plugin. -report.plugin.goals.intro=Goals available for this plugin: -report.plugin.goals.column.goal=Goal -report.plugin.goals.column.isMavenReport=Report? -report.plugin.goals.column.description=Description -report.plugin.goal.nodescription=No description. -report.plugin.goal.deprecated=Deprecated. - -report.plugin.systemrequirements=System Requirements -report.plugin.systemrequirements.intro=The following specifies the minimum requirements to run this Maven plugin: -report.plugin.systemrequirements.nominimum= No minimum requirement. -report.plugin.systemrequirements.maven=Maven -report.plugin.systemrequirements.jdk=JDK -report.plugin.systemrequirements.memory=Memory -report.plugin.systemrequirements.diskspace=Disk Space - -report.plugin.systemrequirements.history=System Requirements History -report.plugin.systemrequirements.history.intro=The following specifies the minimum requirements to run this Maven plugin for historical versions: -report.plugin.systemrequirements.history.version=Plugin Version -report.plugin.systemrequirements.history.maven=Maven -report.plugin.systemrequirements.history.jdk=JDK - -report.plugin.usage=Usage -report.plugin.usage.intro=You should specify the version in your project's plugin configuration: -report.plugin.usage.pluginManagement=To define the plugin version in your parent POM -report.plugin.usage.plugins=To use the plugin goals in your POM or parent POM -report.plugin.usage.reporting=To use the report goals in your POM or parent POM -report.plugin.configuration.end=For more information, see {"Guide to Configuring Plug-ins", https://maven.apache.org/guides/mini/guide-configuring-plugins.html} - -report.plugin.isReport=Yes -report.plugin.isNotReport=No diff --git a/maven-plugin-plugin/src/main/resources/plugin-report_de.properties b/maven-plugin-plugin/src/main/resources/plugin-report_de.properties deleted file mode 100644 index e87e5c07..00000000 --- a/maven-plugin-plugin/src/main/resources/plugin-report_de.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# 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. -# - -report.plugin.name=Plugin-Dokumentation -report.plugin.description=Dieser Bericht dokumentiert die Goals des Plugins und deren Parameter. -report.plugin.title=Plugin-Dokumentation - -report.plugin.goals.nogoal=Keine Goals verf\u00FCgbar. -report.plugin.goals.intro=Verf\u00FCgbare Goals dieses Plugins: -report.plugin.goals.column.goal=Goal -report.plugin.goals.column.isMavenReport=Bericht? -report.plugin.goals.column.description=Beschreibung -report.plugin.goal.nodescription=Keine Beschreibung. -report.plugin.goal.deprecated=Missbilligt. - -report.plugin.systemrequirements=Systemvoraussetzungen -report.plugin.systemrequirements.intro=Die folgende Tabelle listet die Mindestanforderungen zum Ausf\u00FChren dieses Plugins auf: -report.plugin.systemrequirements.nominimum=Keine Mindestanforderung. -report.plugin.systemrequirements.maven=Maven -report.plugin.systemrequirements.jdk=JDK -report.plugin.systemrequirements.memory=Arbeitsspeicher -report.plugin.systemrequirements.diskspace=Festplatte - -report.plugin.systemrequirements.history=Historie der Systemvoraussetzungen -report.plugin.systemrequirements.history.intro=In der folgenden Tabelle sind die Mindestanforderungen zum Ausf\u00FChren dieses Plug-ins f\u00FCr historische Versionen aufgef\u00FChrt: -report.plugin.systemrequirements.history.version=Plugin Version -report.plugin.systemrequirements.history.maven=Maven -report.plugin.systemrequirements.history.jdk=JDK - -report.plugin.usage=Gebrauch -report.plugin.usage.intro=Geben Sie die gew\u00FCnschte Version einfach in der Plugin-Konfiguration Ihres Projekts an: -report.plugin.usage.pluginManagement=Zum Definieren der Plugin-Version in der Eltern-POM -report.plugin.usage.plugins=Zum Verwenden der Plugin-Goals w\u00E4hrend des Build-Vorgangs eines Projekts -report.plugin.usage.reporting=Zum Erzeugen der Berichte f\u00FCr die Projektdokumentation -report.plugin.configuration.end=F\u00FCr weitergehende Informationen lesen Sie bitte den Artikel {"Guide to Configuring Plug-ins", https://maven.apache.org/guides/mini/guide-configuring-plugins.html}. - -report.plugin.isReport=Ja -report.plugin.isNotReport=Nein diff --git a/maven-plugin-plugin/src/main/resources/plugin-report_en.properties b/maven-plugin-plugin/src/main/resources/plugin-report_en.properties deleted file mode 100644 index 96cf4075..00000000 --- a/maven-plugin-plugin/src/main/resources/plugin-report_en.properties +++ /dev/null @@ -1,23 +0,0 @@ -# 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. - -# NOTE: -# This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It -# must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the -# JVM's default locale (which need not be "en"). See the method javadoc about -# ResourceBundle.getBundle(String, Locale, ClassLoader) -# for a full description of the lookup strategy. diff --git a/maven-plugin-plugin/src/main/resources/plugin-report_fr.properties b/maven-plugin-plugin/src/main/resources/plugin-report_fr.properties deleted file mode 100644 index 2ac7b3fb..00000000 --- a/maven-plugin-plugin/src/main/resources/plugin-report_fr.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# 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. -# - -report.plugin.name=Documentation du plugin -report.plugin.description=Ce rapport fournit de la documentation sur les goals et les param\u00EAtres d'un plugin. -report.plugin.title=Documentation du plugin - -report.plugin.goals.nogoal=Aucun goal disponible. -report.plugin.goals.intro=Goals disponibles pour ce plugin : -report.plugin.goals.column.goal=Goal -report.plugin.goals.column.isMavenReport=Rapport? -report.plugin.goals.column.description=Description -report.plugin.goal.nodescription=Pas de description. -report.plugin.goal.deprecated=Obsol\u00E8te. - -report.plugin.systemrequirements=Exigences Syst\u00E8mes -report.plugin.systemrequirements.intro=Ce qui suit sp\u00E9cifie les exigences minimales pour ex\u00E9cuter ce plugin Maven : -report.plugin.systemrequirements.nominimum= Aucune exigence minimale. -report.plugin.systemrequirements.maven=Maven -report.plugin.systemrequirements.jdk=JDK -report.plugin.systemrequirements.memory=M\u00E9moire -report.plugin.systemrequirements.diskspace=Espace Disque - -report.plugin.systemrequirements.history=Historique des Exigences Syst\u00E8mes -report.plugin.systemrequirements.history.intro=Ce qui suit sp\u00E9cifie les exigences minimales pour ex\u00E9cuter ce plugin Maven pour les versions historiques: -report.plugin.systemrequirements.history.version=Version du Plugin -report.plugin.systemrequirements.history.maven=Maven -report.plugin.systemrequirements.history.jdk=JDK - -report.plugin.usage=Utilisation -report.plugin.usage.intro=Vous devez sp\u00E9cifier la version dans la configuration de votre projet : -report.plugin.usage.pluginManagement=Pour d\u00E9finir la version du plugin dans le POM parent -report.plugin.usage.plugins=Pour utiliser les goals du plugin dans votre POM ou POM parent -report.plugin.usage.reporting=Pour utiliser les goals de rapports dans votre POM ou POM parent -report.plugin.configuration.end=Pour plus d'informations, consultez {"Guide to Configuring Plug-ins", https://maven.apache.org/guides/mini/guide-configuring-plugins.html} - -report.plugin.isReport=Oui -report.plugin.isNotReport=Non diff --git a/maven-plugin-plugin/src/main/resources/plugin-report_sv.properties b/maven-plugin-plugin/src/main/resources/plugin-report_sv.properties deleted file mode 100644 index 0e806e49..00000000 --- a/maven-plugin-plugin/src/main/resources/plugin-report_sv.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# 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. -# - -report.plugin.name=Plugindokumentation -report.plugin.description=Denna rapport tillhandah\u00E5ller m\u00E5l- och parameterdokumentation f\u00F6r en plugin. -report.plugin.title=Plugindokumentation - -report.plugin.goals.nogoal=Inga m\u00E5l tillg\u00E4ngliga \u00E4nnu. -report.plugin.goals.intro=Tillg\u00E4ngliga m\u00E5l f\u00F6r denna plugin: -report.plugin.goals.column.goal=M\u00E5l -report.plugin.goals.column.isMavenReport=Rapport? -report.plugin.goals.column.description=Beskrivning -report.plugin.goal.nodescription=Ingen beskrivning. -report.plugin.goal.deprecated=F\u00F6r\u00E5ldrat. - -report.plugin.systemrequirements=Systemkrav -report.plugin.systemrequirements.intro=F\u00F6ljande minimikrav st\u00E4lls f\u00F6r att k\u00F6ra denna Maven plugin: -report.plugin.systemrequirements.nominimum= Inga minimikrav. -report.plugin.systemrequirements.maven=Maven -report.plugin.systemrequirements.jdk=JDK -report.plugin.systemrequirements.memory=Minne -report.plugin.systemrequirements.diskspace=Diskutrymme - -report.plugin.systemrequirements.history=Systemkravshistorik -report.plugin.systemrequirements.history.intro=F\u00F6ljande anger minimikraven f\u00F6r att k\u00F6ra detta Maven-plugin f\u00F6r historiska versioner: -report.plugin.systemrequirements.history.version=Plugin Version -report.plugin.systemrequirements.history.maven=Maven -report.plugin.systemrequirements.history.jdk=JDK - -report.plugin.usage=Anv\u00E4ndning -report.plugin.usage.intro=Du b\u00F6r specificera versionen i ditt projekts pluginkonfiguration: -report.plugin.usage.pluginManagement=F\u00F6r att definiera pluginversion i din f\u00F6r\u00E4ldra-POM -report.plugin.usage.plugins=F\u00F6r att anv\u00E4nda plugin-m\u00E5len i din POM eller f\u00F6r\u00E4ldra-POM -report.plugin.usage.reporting=F\u00F6r att anv\u00E4nda rapport-m\u00E5len i din POM eller f\u00F6r\u00E4ldra-POM -report.plugin.configuration.end=F\u00F6r mer information, l\u00E4s {"Guide to Configuring Plug-ins", https://maven.apache.org/guides/mini/guide-configuring-plugins.html} (p\u00E5 engelska). - -report.plugin.isReport=Ja -report.plugin.isNotReport=Nej diff --git a/maven-plugin-report-plugin/pom.xml b/maven-plugin-report-plugin/pom.xml index 4a7d3fae..7e87d5dd 100644 --- a/maven-plugin-report-plugin/pom.xml +++ b/maven-plugin-report-plugin/pom.xml @@ -56,8 +56,6 @@ <dependency> <groupId>org.apache.maven.reporting</groupId> <artifactId>maven-reporting-api</artifactId> - <version>${reportingApiVersion}</version> - <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> @@ -88,6 +86,7 @@ <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-sink-api</artifactId> + <version>1.11.1</version> </dependency> <!-- shared --> @@ -108,6 +107,11 @@ <artifactId>junit-jupiter-api</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <scope>test</scope> + </dependency> <!-- Depenency is listed here because it's used in ITs --> <dependency> <groupId>org.apache.maven.plugins</groupId> diff --git a/maven-plugin-plugin/src/it/mplugin-187/invoker.properties b/maven-plugin-report-plugin/src/it/mplugin-187/invoker.properties similarity index 94% rename from maven-plugin-plugin/src/it/mplugin-187/invoker.properties rename to maven-plugin-report-plugin/src/it/mplugin-187/invoker.properties index a16bae84..3b86dfb4 100644 --- a/maven-plugin-plugin/src/it/mplugin-187/invoker.properties +++ b/maven-plugin-report-plugin/src/it/mplugin-187/invoker.properties @@ -5,9 +5,9 @@ # 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 @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -invoker.goals = clean plugin:report +invoker.goals = clean plugin-report:report diff --git a/maven-plugin-plugin/src/it/mplugin-187/pom.xml b/maven-plugin-report-plugin/src/it/mplugin-187/pom.xml similarity index 91% rename from maven-plugin-plugin/src/it/mplugin-187/pom.xml rename to maven-plugin-report-plugin/src/it/mplugin-187/pom.xml index 541ee69a..b0b1de57 100644 --- a/maven-plugin-plugin/src/it/mplugin-187/pom.xml +++ b/maven-plugin-report-plugin/src/it/mplugin-187/pom.xml @@ -26,7 +26,7 @@ under the License. <artifactId>mplugin-187</artifactId> <version>1.0-SNAPSHOT</version> - <description>Verify that plugin:report succeeds</description> + <description>Verify that plugin-report:report succeeds</description> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -36,10 +36,10 @@ under the License. <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-plugin-plugin</artifactId> + <artifactId>maven-plugin-report-plugin</artifactId> <version>@project.version@</version> </plugin> </plugins> </build> -</project> \ No newline at end of file +</project> diff --git a/maven-plugin-tools-generators/pom.xml b/maven-plugin-tools-generators/pom.xml index 922784eb..b6338db4 100644 --- a/maven-plugin-tools-generators/pom.xml +++ b/maven-plugin-tools-generators/pom.xml @@ -47,7 +47,6 @@ <dependency> <groupId>org.apache.maven.reporting</groupId> <artifactId>maven-reporting-api</artifactId> - <version>${reportingApiVersion}</version> </dependency> <!-- plexus --> diff --git a/pom.xml b/pom.xml index c5302380..a7432391 100644 --- a/pom.xml +++ b/pom.xml @@ -101,8 +101,6 @@ maven-plugin-tools-annotations/src/main/java/o/a/m/tools/plugins/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor#CLASS_VERSION_TO_JAVA_STRING needs to be updated as well --> <asmVersion>9.5</asmVersion> - <doxiaVersion>1.11.1</doxiaVersion> - <doxia-sitetoolsVersion>1.11.1</doxia-sitetoolsVersion> <plexusUtilsVersion>3.5.0</plexusUtilsVersion> <reportingApiVersion>3.1.1</reportingApiVersion> <reportingImplVersion>3.2.0</reportingImplVersion> @@ -182,32 +180,11 @@ <artifactId>maven-settings</artifactId> <version>${mavenVersion}</version> </dependency> - <!-- doxia --> + <!-- shared --> <dependency> - <groupId>org.apache.maven.doxia</groupId> - <artifactId>doxia-sink-api</artifactId> - <version>${doxiaVersion}</version> - <exclusions> - <exclusion> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-container-default</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.maven.doxia</groupId> - <artifactId>doxia-site-renderer</artifactId> - <version>${doxia-sitetoolsVersion}</version> - <exclusions> - <exclusion> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-container-default</artifactId> - </exclusion> - <exclusion> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-component-api</artifactId> - </exclusion> - </exclusions> + <groupId>org.apache.maven.reporting</groupId> + <artifactId>maven-reporting-api</artifactId> + <version>${reportingApiVersion}</version> </dependency> <dependency> <groupId>org.apache.maven.reporting</groupId>