This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-artifact-plugin.git
The following commit(s) were added to refs/heads/master by this push: new c80c5be [MARTIFACT-63] rework plugin-issues.apt generation c80c5be is described below commit c80c5bee565c558c59720fbd8c2cc82eb93b805e Author: Hervé Boutemy <hbout...@apache.org> AuthorDate: Sun Apr 21 09:08:07 2024 +0200 [MARTIFACT-63] rework plugin-issues.apt generation --- .../buildinfo/not-reproducible-plugins.properties | 11 +-- src/site/apt/plugin-issues.apt | 92 ---------------------- .../NotReproduciblePluginsDocumentationTest.java | 29 +++++-- src/test/resources/plugin-issues.apt | 33 ++++++++ 4 files changed, 62 insertions(+), 103 deletions(-) diff --git a/src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties b/src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties index 98a1943..9bae912 100644 --- a/src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties +++ b/src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties @@ -66,14 +66,15 @@ org.apache.servicemix.tooling+depends-maven-plugin=1.5.0 org.codehaus.plexus+plexus-component-metadata=2.1.0 # https://github.com/codehaus-plexus/plexus-containers/issues/27 -# don't fail on one plugin for jaxb because plugin can be configured to avoid issue https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/doc/BUILDSPEC.md#avoiding-timestamps-in-jaxb-generated-content -# and other non-listed plugins using jaxb/xjc have same issues: failing at check-buildplan level just cause noise to users -#org.codehaus.mojo+jaxb2-maven-plugin=fail:https://github.com/mojohaus/jaxb2-maven-plugin +## don't fail on one plugin for jaxb because plugin can be configured to avoid issue https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/doc/BUILDSPEC.md#avoiding-timestamps-in-jaxb-generated-content +## and other non-listed plugins using jaxb/xjc have same issues: failing at check-buildplan level just cause noise to users +##org.codehaus.mojo+jaxb2-maven-plugin=fail:https://github.com/mojohaus/jaxb2-maven-plugin org.codehaus.mojo+properties-maven-plugin=1.1.0 # https://github.com/mojohaus/properties-maven-plugin/pull/75 -#org.codehaus.mojo+flatten-maven-plugin=fail:https://github.com/mojohaus/flatten-maven-plugin/issues/256 -# no issue in flatten-maven-plugin: t's a question of choice of Maven version: with 3.8.2+, it writes groupId then artifactId, with 3.8.1- it writes artifactId then groupId + +##org.codehaus.mojo+flatten-maven-plugin=fail:https://github.com/mojohaus/flatten-maven-plugin/issues/256 +## no issue in flatten-maven-plugin: t's a question of choice of Maven version: with 3.8.2+, it writes groupId then artifactId, with 3.8.1- it writes artifactId then groupId org.cyclonedx+cyclonedx-maven-plugin=2.7.9 # https://github.com/CycloneDX/cyclonedx-maven-plugin/pull/353 diff --git a/src/site/apt/plugin-issues.apt b/src/site/apt/plugin-issues.apt deleted file mode 100644 index a2d9339..0000000 --- a/src/site/apt/plugin-issues.apt +++ /dev/null @@ -1,92 +0,0 @@ - ------ - artifact:check-buildplan - ------ - Hervé Boutemy - ------ - 2022-04-02 - ------ - -~~ 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: For help with the syntax of this file, see: -~~ http://maven.apache.org/doxia/references/apt-format.html - -Usage - - <<<mvn artifact:check-buildplan>>> detects prerequisites or issues with following plugins: - -~~ content generated by NotReproduciblePluginsDocumentationTest -*---------+-------------------------------------------------------------------+-------+--------------+ -| | <<plugin>> | <<minimum version>> | <<comments>> -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-archetype-plugin/}maven-archetype-plugin}} | 3.2.0 | https://issues.apache.org/jira/browse/ARCHETYPE-590 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-assembly-plugin/}maven-assembly-plugin}} | 3.2.0 | https://issues.apache.org/jira/browse/MASSEMBLY-921 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-jar-plugin/}maven-jar-plugin}} | 3.2.0 | https://issues.apache.org/jira/browse/MJAR-263 https://issues.apache.org/jira/browse/MJAR-275 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-ejb-plugin/}maven-ejb-plugin}} | 3.1.0 | https://issues.apache.org/jira/browse/MEJB-128 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-plugin-plugin/}maven-plugin-plugin}} | 3.5.1 | https://issues.apache.org/jira/browse/MPLUGIN-326 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-remote-resources-plugin/}maven-remote-resources-plugin}} | 1.7.0 | https://issues.apache.org/jira/browse/MRRESOURCES-114 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-shade-plugin/}maven-shade-plugin}} | 3.5.2 | https://issues.apache.org/jira/browse/MSHADE-352 https://issues.apache.org/jira/browse/MSHADE-420 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-source-plugin/}maven-source-plugin}} | 3.2.1 | https://issues.apache.org/jira/browse/MSOURCES-123 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-war-plugin/}maven-war-plugin}} | 3.3.1 | https://issues.apache.org/jira/browse/MWAR-432 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-ear-plugin/}maven-ear-plugin}} | 3.1.0 | https://issues.apache.org/jira/browse/MEAR-280 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-rar-plugin/}maven-rar-plugin}} | 3.0.0 | https://issues.apache.org/jira/browse/MRAR-86 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.maven.plugins | {{{/plugins/maven-acr-plugin/}maven-acr-plugin}} | 3.2.0 | https://issues.apache.org/jira/browse/MACR-53 plugin-specific groupId -*--------+--------------------------------------------------------------------+-------+--------------+ -| io.quarkus | quarkus-extension-maven-plugin | 3.9.0 | https://github.com/quarkusio/quarkus/issues/38364 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.antlr | antlr3-maven-plugin | - | no fixed release available, see {{{https://github.com/antlr/antlr3/pull/209}reference}} -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.felix | maven-bundle-plugin | 5.1.9 | https://issues.apache.org/jira/browse/FELIX-6495 https://issues.apache.org/jira/browse/FELIX-6496 https://issues.apache.org/jira/browse/FELIX-6602 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.karaf.tooling | karaf-maven-plugin | 4.3.7 | https://issues.apache.org/jira/browse/KARAF-7367 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.nifi | nifi-nar-maven-plugin | 1.3.4 | https://issues.apache.org/jira/browse/NIFI-9857 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.apache.servicemix.tooling | depends-maven-plugin | 1.5.0 | https://issues.apache.org/jira/browse/SM-5021 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.codehaus.plexus | plexus-component-metadata | 2.1.0 | https://github.com/codehaus-plexus/plexus-containers/issues/27 don't fail on one plugin for jaxb because plugin can be configured to avoid issue https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/doc/BUILDSPEC.md#avoiding-timestamps-in-jaxb-generated-content and other non-listed plugins using jaxb/xjc have same issues: failing at check-buildplan level just cause noise to usersorg.codehaus.mojo+jaxb2-maven-plug [...] -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.codehaus.mojo | properties-maven-plugin | 1.1.0 | https://github.com/mojohaus/properties-maven-plugin/pull/75org.codehaus.mojo+flatten-maven-plugin=fail:https://github.com/mojohaus/flatten-maven-plugin/issues/256 no issue in flatten-maven-plugin: t's a question of choice of Maven version: with 3.8.2+, it writes groupId then artifactId, with 3.8.1- it writes artifactId then groupId -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.cyclonedx | cyclonedx-maven-plugin | 2.7.9 | https://github.com/CycloneDX/cyclonedx-maven-plugin/pull/353 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.eclipse.sisu | sisu-maven-plugin | 0.3.4 | https://github.com/eclipse/sisu.inject/pull/5 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.eclipse.jetty | jetty-jspc-maven-plugin | - | no fixed release available, see {{{https://github.com/eclipse/jetty.project/}reference}} -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.glassfish.hk2 | hk2-inhabitant-generator | 3.0.5 | https://github.com/eclipse-ee4j/glassfish-hk2/pull/821 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.jboss.jandex | jandex-maven-plugin | - | no fixed release available, see {{{https://github.com/wildfly/jandex-maven-plugin/pull/35}reference}} -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.moditect | moditect-maven-plugin | 1.2.0.Final | https://github.com/moditect/moditect/pull/211 https://github.com/moditect/moditect/pull/189 https://github.com/moditect/moditect/pull/222 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.springframework.boot | spring-boot-maven-plugin | 2.7.1 | https://github.com/spring-projects/spring-boot/issues/21005 -*--------+--------------------------------------------------------------------+-------+--------------+ -| org.vafer | jdeb | 1.10 | https://github.com/tcurdt/jdeb/pull/363 -*----------+------------------------------------------------------------------+-------+--------------+ diff --git a/src/test/java/org/apache/maven/plugins/artifact/buildinfo/NotReproduciblePluginsDocumentationTest.java b/src/test/java/org/apache/maven/plugins/artifact/buildinfo/NotReproduciblePluginsDocumentationTest.java index 62c5019..fad622b 100644 --- a/src/test/java/org/apache/maven/plugins/artifact/buildinfo/NotReproduciblePluginsDocumentationTest.java +++ b/src/test/java/org/apache/maven/plugins/artifact/buildinfo/NotReproduciblePluginsDocumentationTest.java @@ -26,18 +26,21 @@ import java.nio.file.Files; import org.junit.Test; /** - * Test class to update src/site/apt/plugin-issues.apt with content extracted from - * src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties + * Test class to generate {@code target/generated-site/apt/plugin-issues.apt} with content extracted from + * {@code src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties} + * adn generated from {@code src/test/resources/plugin-issues.apt}. */ public class NotReproduciblePluginsDocumentationTest { private static final String LS = System.lineSeparator(); - private static final String DELIMITER = "~~ content generated by NotReproduciblePluginsDocumentationTest"; @Test public void testBasic() throws IOException { - File pluginIssuesApt = new File("src/site/apt/plugin-issues.apt"); + File pluginIssuesApt = new File("src/test/resources/plugin-issues.apt"); String content = new String(Files.readAllBytes(pluginIssuesApt.toPath()), StandardCharsets.UTF_8); - content = content.substring(0, content.indexOf(DELIMITER) + DELIMITER.length()); + + File targetDirectory = new File("target/generated-site/apt"); + targetDirectory.mkdirs(); + pluginIssuesApt = new File(targetDirectory, pluginIssuesApt.getName()); StringBuilder sb = new StringBuilder(content); sb.append(LS); @@ -80,7 +83,21 @@ public class NotReproduciblePluginsDocumentationTest { if (groupId == null) { continue; } - sb.append(line.substring(1)); + if (!line.startsWith("##")) { + sb.append(' '); + line = line.substring(1).trim(); + if (line.startsWith("https://")) { + String url = line; + if (url.contains("/jira/browse/")) { + line = line.substring(url.indexOf("/jira/browse/") + 13); + } else if (url.startsWith("https://github.com/")) { + line = line.substring(19); + } + sb.append("{{{" + url + "}" + line + "}}"); + } else { + sb.append(line); + } + } } sb.append(LS + "*----------+------------------------------------------------------------------+-------+--------------+" diff --git a/src/test/resources/plugin-issues.apt b/src/test/resources/plugin-issues.apt new file mode 100644 index 0000000..8924a3a --- /dev/null +++ b/src/test/resources/plugin-issues.apt @@ -0,0 +1,33 @@ + ------ + artifact:check-buildplan + ------ + Hervé Boutemy + ------ + 2022-04-02 + ------ + +~~ 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: For help with the syntax of this file, see: +~~ http://maven.apache.org/doxia/references/apt-format.html + +Usage + + <<<mvn artifact:check-buildplan>>> detects prerequisites or issues with following plugins: + +~~ content generated by NotReproduciblePluginsDocumentationTest