From 0d94c0ac45e69e91cc7bd87d6ebe275b9e25fb40 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Wed, 15 Jan 2025 13:03:54 -0600 Subject: [PATCH] Import from Fedora --- .fmf/version | 1 + .gitignore | 14 + 0001-Disable-help-MOJO-generation.patch | 214 +++++++++++ 0002-Remove-dependency-on-jtidy.patch | 154 ++++++++ 0003-Disable-reporting.patch | 89 +++++ ci.fmf | 1 + gating.yaml | 7 + maven-plugin-tools.spec | 454 ++++++++++++++++++++++++ plans/javapackages.fmf | 7 + sources | 1 + 10 files changed, 942 insertions(+) create mode 100644 .fmf/version create mode 100644 .gitignore create mode 100644 0001-Disable-help-MOJO-generation.patch create mode 100644 0002-Remove-dependency-on-jtidy.patch create mode 100644 0003-Disable-reporting.patch create mode 100644 ci.fmf create mode 100644 gating.yaml create mode 100644 maven-plugin-tools.spec create mode 100644 plans/javapackages.fmf create mode 100644 sources diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c020996 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +/results_* +/*.src.rpm + +/maven-plugin-tools-2.1-src.tar.gz +/maven-plugin-tools-2.6.tar.xz +/maven-plugin-tools-2.7-source-release.zip +/maven-plugin-tools-3.1-source-release.zip +/maven-plugin-tools-3.3-source-release.zip +/maven-plugin-tools-3.4-source-release.zip +/maven-plugin-tools-3.5-source-release.zip +/maven-plugin-tools-3.5.1-source-release.zip +/maven-plugin-tools-3.6.0-source-release.zip +/maven-plugin-tools-3.6.4-source-release.zip +/maven-plugin-tools-3.9.0-source-release.zip diff --git a/0001-Disable-help-MOJO-generation.patch b/0001-Disable-help-MOJO-generation.patch new file mode 100644 index 0000000..b920c7d --- /dev/null +++ b/0001-Disable-help-MOJO-generation.patch @@ -0,0 +1,214 @@ +From bb0c2f36de5d9c85d00b3549ec9cef6074edd950 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 27 Apr 2020 12:52:15 +0200 +Subject: [PATCH 1/3] Disable help MOJO generation + +Forwarded: not-needed +--- + .../plugin/plugin/HelpGeneratorMojo.java | 59 ++++--------- + .../plugin/generator/PluginHelpGenerator.java | 87 +++++++------------ + 2 files changed, 48 insertions(+), 98 deletions(-) + +diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java +index c5f82ce..9f5c61d 100644 +--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java ++++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java +@@ -28,15 +28,13 @@ import org.apache.maven.plugin.MojoExecutionException; + import org.apache.maven.plugins.annotations.Component; + 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.annotations.ResolutionScope; +-import org.apache.maven.tools.plugin.generator.GeneratorException; +-import org.apache.maven.tools.plugin.generator.PluginHelpGenerator; +-import org.codehaus.plexus.util.StringUtils; +-import org.codehaus.plexus.velocity.VelocityComponent; +- +-/** +- * Generates a HelpMojo class. ++import org.apache.maven.plugins.annotations.Parameter; ++import org.apache.maven.plugins.annotations.ResolutionScope; ++import org.apache.maven.tools.plugin.generator.GeneratorException; ++import org.codehaus.plexus.util.StringUtils; ++ ++/** ++ * Generates a HelpMojo class. + * Relies at runtime on one output file from {@link DescriptorGeneratorMojo}. + * + * @author Vincent Siveton +@@ -65,18 +63,12 @@ public class HelpGeneratorMojo extends AbstractGeneratorMojo { + * + * @since 2.6 + */ +- @Parameter +- private String helpPackageName; +- +- /** +- * Velocity component. +- */ +- @Component +- private VelocityComponent velocity; +- +- String getHelpPackageName() { +- String packageName = null; +- if (StringUtils.isNotBlank(helpPackageName)) { ++ @Parameter ++ private String helpPackageName; ++ ++ String getHelpPackageName() { ++ String packageName = null; ++ if (StringUtils.isNotBlank(helpPackageName)) { + packageName = helpPackageName; + } + +@@ -98,23 +90,8 @@ public class HelpGeneratorMojo extends AbstractGeneratorMojo { + } + return name; + } +- +- @Override +- protected void generate() throws MojoExecutionException { +- PluginHelpGenerator pluginHelpGenerator = new PluginHelpGenerator() +- .setMavenProject(project) +- .setHelpPackageName(getHelpPackageName()) +- .setGoalPrefix(goalPrefix) +- .setVelocityComponent(velocity); +- +- try { +- pluginHelpGenerator.execute(outputDirectory); +- } catch (GeneratorException e) { +- throw new MojoExecutionException(e.getMessage(), e); +- } +- +- if (!project.getCompileSourceRoots().contains(outputDirectory.getAbsolutePath())) { +- project.addCompileSourceRoot(outputDirectory.getAbsolutePath()); +- } +- } +-} ++ ++ @Override ++ protected void generate() throws MojoExecutionException { ++ } ++} +diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java +index c3806af..9772df9 100644 +--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java ++++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java +@@ -24,18 +24,16 @@ import java.io.InputStream; + import java.io.InputStreamReader; + import java.io.OutputStreamWriter; + import java.io.StringWriter; +-import java.io.Writer; +- +-import org.apache.maven.project.MavenProject; +-import org.apache.velocity.VelocityContext; +-import org.codehaus.plexus.logging.AbstractLogEnabled; +-import org.codehaus.plexus.logging.Logger; +-import org.codehaus.plexus.logging.console.ConsoleLogger; +-import org.codehaus.plexus.util.io.CachingOutputStream; +-import org.codehaus.plexus.velocity.VelocityComponent; +- +-import static java.nio.charset.StandardCharsets.UTF_8; +- ++import java.io.Writer; ++ ++import org.apache.maven.project.MavenProject; ++import org.codehaus.plexus.logging.AbstractLogEnabled; ++import org.codehaus.plexus.logging.Logger; ++import org.codehaus.plexus.logging.console.ConsoleLogger; ++import org.codehaus.plexus.util.io.CachingOutputStream; ++ ++import static java.nio.charset.StandardCharsets.UTF_8; ++ + /** + * Generates an HelpMojo class from help-class-source.vm template. + * The generated mojo reads help content from META-INF/maven/${groupId}/${artifactId}/plugin-help.xml +@@ -51,13 +49,12 @@ public class PluginHelpGenerator extends AbstractLogEnabled { + private static final String HELP_MOJO_CLASS_NAME = "HelpMojo"; + + private String helpPackageName; +- private String goalPrefix; +- private MavenProject mavenProject; +- private boolean useMaven4Api; +- private VelocityComponent velocityComponent; +- +- /** +- * Default constructor ++ private String goalPrefix; ++ private MavenProject mavenProject; ++ private boolean useMaven4Api; ++ ++ /** ++ * Default constructor + */ + public PluginHelpGenerator() { + this.enableLogging(new ConsoleLogger(Logger.LEVEL_INFO, "PluginHelpGenerator")); +@@ -92,17 +89,12 @@ public class PluginHelpGenerator extends AbstractLogEnabled { + + public PluginHelpGenerator setHelpPackageName(String helpPackageName) { + this.helpPackageName = helpPackageName; +- return this; +- } +- +- public PluginHelpGenerator setVelocityComponent(VelocityComponent velocityComponent) { +- this.velocityComponent = velocityComponent; +- return this; +- } +- +- public PluginHelpGenerator setGoalPrefix(String goalPrefix) { +- this.goalPrefix = goalPrefix; +- return this; ++ return this; ++ } ++ ++ public PluginHelpGenerator setGoalPrefix(String goalPrefix) { ++ this.goalPrefix = goalPrefix; ++ return this; + } + + public PluginHelpGenerator setMavenProject(MavenProject mavenProject) { +@@ -112,33 +104,14 @@ public class PluginHelpGenerator extends AbstractLogEnabled { + + // ---------------------------------------------------------------------- + // Private methods +- // ---------------------------------------------------------------------- +- +- private String getHelpClassSources(String pluginHelpPath) throws IOException { +- VelocityContext context = new VelocityContext(); +- boolean useAnnotations = +- mavenProject.getArtifactMap().containsKey("org.apache.maven.plugin-tools:maven-plugin-annotations"); +- +- context.put("helpPackageName", helpPackageName); +- context.put("pluginHelpPath", pluginHelpPath); +- context.put("artifactId", mavenProject.getArtifactId()); +- // TODO: evaluate prefix from deserialized plugin +- context.put("goalPrefix", goalPrefix); +- context.put("useAnnotations", useAnnotations); +- +- StringWriter stringWriter = new StringWriter(); +- +- // plugin-tools sources are UTF-8 (and even ASCII in this case)) +- try (InputStream is = Thread.currentThread() +- .getContextClassLoader() +- .getResourceAsStream(useMaven4Api ? "help-class-source-v4.vm" : "help-class-source.vm"); // +- InputStreamReader isReader = new InputStreamReader(is, UTF_8)) { +- // isReader = +- velocityComponent.getEngine().evaluate(context, stringWriter, "", isReader); +- } +- // Apply OS lineSeparator instead of template's lineSeparator to have consistent separators for +- // all source files. +- return stringWriter.toString().replaceAll("(\r\n|\n|\r)", System.lineSeparator()); ++ // ---------------------------------------------------------------------- ++ ++ private String getHelpClassSources(String pluginHelpPath) throws IOException { ++ StringWriter stringWriter = new StringWriter(); ++ ++ // Apply OS lineSeparator instead of template's lineSeparator to have consistent separators for ++ // all source files. ++ return stringWriter.toString().replaceAll("(\r\n|\n|\r)", System.lineSeparator()); + } + + /** +-- +2.46.0 + diff --git a/0002-Remove-dependency-on-jtidy.patch b/0002-Remove-dependency-on-jtidy.patch new file mode 100644 index 0000000..cc8a8f7 --- /dev/null +++ b/0002-Remove-dependency-on-jtidy.patch @@ -0,0 +1,154 @@ +From fd02c57beb987437b4fb10066e22831a17119873 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 27 Apr 2020 12:56:04 +0200 +Subject: [PATCH 2/3] Remove dependency on jtidy + +Forwarded: not-needed +--- + .../plugin/generator/GeneratorUtils.java | 85 +++++-------------- + .../PluginDescriptorFilesGenerator.java | 19 ++--- + 2 files changed, 26 insertions(+), 78 deletions(-) + +diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java +index 8b04522..2621b9f 100644 +--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java ++++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java +@@ -48,13 +48,12 @@ import org.apache.maven.plugin.descriptor.MojoDescriptor; + import org.apache.maven.plugin.descriptor.PluginDescriptor; + import org.apache.maven.project.MavenProject; + import org.apache.maven.reporting.MavenReport; +-import org.codehaus.plexus.component.repository.ComponentDependency; +-import org.codehaus.plexus.util.StringUtils; +-import org.codehaus.plexus.util.xml.XMLWriter; +-import org.w3c.tidy.Tidy; +- +-/** +- * Convenience methods to play with Maven plugins. ++import org.codehaus.plexus.component.repository.ComponentDependency; ++import org.codehaus.plexus.util.StringUtils; ++import org.codehaus.plexus.util.xml.XMLWriter; ++ ++/** ++ * Convenience methods to play with Maven plugins. + * + * @author jdcasey + */ +@@ -222,58 +221,12 @@ public final class GeneratorUtils { + } + matcher.appendTail(decoded); + +- return decoded.toString(); +- } +- +- /** +- * Fixes some javadoc comment to become a valid XHTML snippet. +- * +- * @param description Javadoc description with HTML tags, may be null. +- * @return The description with valid XHTML tags, never null. +- * @deprecated Redundant for java extractor +- */ +- @Deprecated +- public static String makeHtmlValid(String description) { +- +- if (description == null || description.isEmpty()) { +- return ""; +- } +- +- String commentCleaned = decodeJavadocTags(description); +- +- // Using jTidy to clean comment +- Tidy tidy = new Tidy(); +- tidy.setDocType("loose"); +- tidy.setXHTML(true); +- tidy.setXmlOut(true); +- tidy.setInputEncoding("UTF-8"); +- tidy.setOutputEncoding("UTF-8"); +- tidy.setMakeClean(true); +- tidy.setNumEntities(true); +- tidy.setQuoteNbsp(false); +- tidy.setQuiet(true); +- tidy.setShowWarnings(true); +- +- ByteArrayOutputStream out = new ByteArrayOutputStream(commentCleaned.length() + 256); +- tidy.parse(new ByteArrayInputStream(commentCleaned.getBytes(StandardCharsets.UTF_8)), out); +- commentCleaned = new String(out.toByteArray(), StandardCharsets.UTF_8); +- +- if (commentCleaned == null || commentCleaned.isEmpty()) { +- return ""; +- } +- +- // strip the header/body stuff +- String ls = System.getProperty("line.separator"); +- int startPos = commentCleaned.indexOf("" + ls) + 6 + ls.length(); +- int endPos = commentCleaned.indexOf(ls + ""); +- commentCleaned = commentCleaned.substring(startPos, endPos); +- +- return commentCleaned; +- } +- +- /** +- * Converts a HTML fragment as extracted from a javadoc comment to a plain text string. This method tries to retain +- * as much of the text formatting as possible by means of the following transformations: ++ return decoded.toString(); ++ } ++ ++ /** ++ * Converts a HTML fragment as extracted from a javadoc comment to a plain text string. This method tries to retain ++ * as much of the text formatting as possible by means of the following transformations: + *
    + *
  • List items are converted to leading tabs (U+0009), followed by the item number/bullet, another tab and + * finally the item contents. Each tab denotes an increase of indentation.
  • +@@ -298,13 +251,13 @@ public final class GeneratorUtils { + final StringBuilder sb = new StringBuilder(); + + HTMLEditorKit.Parser parser = new ParserDelegator(); +- HTMLEditorKit.ParserCallback htmlCallback = new MojoParserCallback(sb); +- +- try { +- parser.parse(new StringReader(makeHtmlValid(html)), htmlCallback, true); +- } catch (IOException e) { +- throw new RuntimeException(e); +- } ++ HTMLEditorKit.ParserCallback htmlCallback = new MojoParserCallback(sb); ++ ++ try { ++ parser.parse(new StringReader(html), htmlCallback, true); ++ } catch (IOException e) { ++ throw new RuntimeException(e); ++ } + + return sb.toString().replace('\"', '\''); // for CDATA + } +diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorFilesGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorFilesGenerator.java +index f8c9820..9dd3179 100644 +--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorFilesGenerator.java ++++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorFilesGenerator.java +@@ -200,18 +200,13 @@ public class PluginDescriptorFilesGenerator implements Generator { + * @param containsXhtmlValue + * @param text + * @return the normalized text value (i.e. potentially converted to XHTML) +- */ +- private static String getTextValue(DescriptorType type, boolean containsXhtmlValue, String text) { +- final String xhtmlText; +- if (!containsXhtmlValue) // text comes from legacy extractor +- { +- xhtmlText = GeneratorUtils.makeHtmlValid(text); +- } else { +- xhtmlText = text; +- } +- if (type != DescriptorType.XHTML) { +- return new HtmlToPlainTextConverter().convert(text); +- } else { ++ */ ++ private static String getTextValue(DescriptorType type, boolean containsXhtmlValue, String text) { ++ final String xhtmlText; ++ xhtmlText = text; ++ if (type != DescriptorType.XHTML) { ++ return new HtmlToPlainTextConverter().convert(text); ++ } else { + return xhtmlText; + } + } +-- +2.46.0 + diff --git a/0003-Disable-reporting.patch b/0003-Disable-reporting.patch new file mode 100644 index 0000000..0d6bec4 --- /dev/null +++ b/0003-Disable-reporting.patch @@ -0,0 +1,89 @@ +From 24dcb6a3b37bc82826c7846ea69e1c42f5351f2d Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 27 Apr 2020 12:57:13 +0200 +Subject: [PATCH 3/3] Disable reporting + +Forwarded: not-needed +--- + .../plugin/generator/GeneratorUtils.java | 61 +++---------------- + 1 file changed, 7 insertions(+), 54 deletions(-) + +diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java +index 2621b9f..c24ccdb 100644 +--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java ++++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java +@@ -44,10 +44,9 @@ import java.util.regex.Pattern; + + import org.apache.maven.artifact.Artifact; + import org.apache.maven.artifact.DependencyResolutionRequiredException; +-import org.apache.maven.plugin.descriptor.MojoDescriptor; +-import org.apache.maven.plugin.descriptor.PluginDescriptor; +-import org.apache.maven.project.MavenProject; +-import org.apache.maven.reporting.MavenReport; ++import org.apache.maven.plugin.descriptor.MojoDescriptor; ++import org.apache.maven.plugin.descriptor.PluginDescriptor; ++import org.apache.maven.project.MavenProject; + import org.codehaus.plexus.component.repository.ComponentDependency; + import org.codehaus.plexus.util.StringUtils; + import org.codehaus.plexus.util.xml.XMLWriter; +@@ -500,53 +499,7 @@ public final class GeneratorUtils { + packageName = entry.getKey(); + } + } +- +- return packageName; +- } +- +- /** +- * @param impl a Mojo implementation, not null +- * @param project a MavenProject instance, could be null +- * @return true is the Mojo implementation implements MavenReport, +- * false otherwise. +- * @throws IllegalArgumentException if any +- */ +- @SuppressWarnings("unchecked") +- public static boolean isMavenReport(String impl, MavenProject project) throws IllegalArgumentException { +- if (impl == null) { +- throw new IllegalArgumentException("mojo implementation should be declared"); +- } +- +- ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); +- if (project != null) { +- List classPathStrings; +- try { +- classPathStrings = project.getCompileClasspathElements(); +- if (project.getExecutionProject() != null) { +- classPathStrings.addAll(project.getExecutionProject().getCompileClasspathElements()); +- } +- } catch (DependencyResolutionRequiredException e) { +- throw new IllegalArgumentException(e); +- } +- +- List urls = new ArrayList<>(classPathStrings.size()); +- for (String classPathString : classPathStrings) { +- try { +- urls.add(new File(classPathString).toURL()); +- } catch (MalformedURLException e) { +- throw new IllegalArgumentException(e); +- } +- } +- +- classLoader = new URLClassLoader(urls.toArray(new URL[urls.size()]), classLoader); +- } +- +- try { +- Class clazz = Class.forName(impl, false, classLoader); +- +- return MavenReport.class.isAssignableFrom(clazz); +- } catch (ClassNotFoundException e) { +- return false; +- } +- } +-} ++ ++ return packageName; ++ } ++} +-- +2.46.0 + diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..df26947 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-9 +decision_contexts: + - osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/javapackages.functional} diff --git a/maven-plugin-tools.spec b/maven-plugin-tools.spec new file mode 100644 index 0000000..baafea7 --- /dev/null +++ b/maven-plugin-tools.spec @@ -0,0 +1,454 @@ +%bcond_with bootstrap + +Name: maven-plugin-tools +Version: 3.9.0 +Release: 19%{?dist} +Summary: Maven Plugin Tools +License: Apache-2.0 +URL: https://maven.apache.org/plugin-tools/ +BuildArch: noarch +ExclusiveArch: %{java_arches} noarch + +Source0: https://repo1.maven.org/maven2/org/apache/maven/plugin-tools/%{name}/%{version}/%{name}-%{version}-source-release.zip + +Patch: 0001-Disable-help-MOJO-generation.patch +Patch: 0002-Remove-dependency-on-jtidy.patch +Patch: 0003-Disable-reporting.patch + +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else +BuildRequires: maven-local +BuildRequires: mvn(com.thoughtworks.qdox:qdox) +BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) +BuildRequires: mvn(org.apache.maven:maven-artifact) +BuildRequires: mvn(org.apache.maven:maven-core) +BuildRequires: mvn(org.apache.maven:maven-model) +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +BuildRequires: mvn(org.apache.maven:maven-plugin-api) +BuildRequires: mvn(org.apache.maven:maven-repository-metadata) +BuildRequires: mvn(org.apache.maven:maven-settings) +BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin) +BuildRequires: mvn(org.codehaus.plexus:plexus-archiver) +BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations) +BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata) +BuildRequires: mvn(org.codehaus.plexus:plexus-utils) +BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus) +BuildRequires: mvn(org.eclipse.sisu:sisu-maven-plugin) +BuildRequires: mvn(org.jsoup:jsoup) +BuildRequires: mvn(org.ow2.asm:asm) +BuildRequires: mvn(org.ow2.asm:asm-commons) +BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) +%endif + +%description +The Maven Plugin Tools contains the necessary tools to be able to produce Maven +Plugins in a variety of languages. + +%package -n maven-plugin-annotations +Summary: Maven Plugin Java 5 Annotations + +%description -n maven-plugin-annotations +This package contains Java 5 annotations to use in Mojos. + +%package -n maven-plugin-plugin +Summary: Maven Plugin Plugin + +%description -n maven-plugin-plugin +The Plugin Plugin is used to create a Maven plugin descriptor for any Mojo's +found in the source tree, to include in the JAR. It is also used to generate +Xdoc files for the Mojos as well as for updating the plugin registry, the +artifact metadata and a generic help goal. + +%package annotations +Summary: Maven Plugin Tool for Annotations + +%description annotations +This package provides Java 5 annotation tools for use with Apache Maven. + +%package api +Summary: Maven Plugin Tools APIs +Provides: maven-shared-plugin-tools-api = 0:%{version}-%{release} + +%description api +The Maven Plugin Tools API provides an API to extract information from +and generate documentation for Maven Plugins. + +%package generators +Summary: Maven Plugin Tools Generators + +%description generators +The Maven Plugin Tools Generators provides content generation +(documentation, help) from plugin descriptor. + +%package java +Summary: Maven Plugin Tool for Java +Provides: maven-shared-plugin-tools-java = 0:%{version}-%{release} + +%description java +Descriptor extractor for plugins written in Java. + +%package javadoc +Summary: API documentation for %{name} + +%description javadoc +API documentation for %{name}. + +%prep +%autosetup -p1 +find -name '*.java' -exec sed -i 's/\r//' {} + + +rm -r maven-plugin-tools-api/src/test/resources/javadoc + +%pom_xpath_inject "pom:project/pom:properties" " + UTF-8 + UTF-8" + +%pom_xpath_remove "pom:execution[pom:id='generated-helpmojo']" maven-plugin-plugin + +%pom_disable_module maven-script +%pom_disable_module maven-plugin-report-plugin + +%pom_remove_dep -r :maven-reporting-impl +%pom_remove_dep -r :maven-reporting-api +%pom_remove_dep -r :plexus-velocity +%pom_remove_dep -r :velocity +%pom_remove_dep -r :jtidy +%pom_remove_plugin -r :spotless-maven-plugin + +%pom_remove_dep org.junit:junit-bom +%pom_remove_dep :maven-plugin-tools-ant maven-plugin-plugin +%pom_remove_dep :maven-plugin-tools-beanshell maven-plugin-plugin + +rm maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java + +%build +%mvn_build -s -f + +%install +%mvn_install + +%files -f .mfiles-maven-plugin-tools +%license LICENSE NOTICE + +%files -n maven-plugin-annotations -f .mfiles-maven-plugin-annotations +%license LICENSE NOTICE + +%files -n maven-plugin-plugin -f .mfiles-maven-plugin-plugin + +%files annotations -f .mfiles-maven-plugin-tools-annotations +%license LICENSE NOTICE + +%files api -f .mfiles-maven-plugin-tools-api +%license LICENSE NOTICE + +%files generators -f .mfiles-maven-plugin-tools-generators + +%files java -f .mfiles-maven-plugin-tools-java + +%files javadoc -f .mfiles-javadoc +%license LICENSE NOTICE + +%changelog +* Mon Dec 30 2024 Mikolaj Izdebski - 3.9.0-17 +- Use %%autosetup -C + +* Fri Nov 29 2024 Mikolaj Izdebski - 3.9.0-16 +- Update javapackages test plan to f42 + +* Tue Jul 30 2024 Mikolaj Izdebski - 3.9.0-8 +- Drop unneeded Obsoletes + +* Thu Jul 18 2024 Fedora Release Engineering - 3.9.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Feb 27 2024 Jiri Vanek - 3.9.0-6 +- Rebuilt for java-21-openjdk as system jdk + +* Fri Feb 23 2024 Jiri Vanek - 3.9.0-5 +- bump of release for for java-21-openjdk as system jdk + +* Thu Jan 25 2024 Fedora Release Engineering - 3.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 3.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Sep 01 2023 Mikolaj Izdebski - 3.9.0-2 +- Rebuild + +* Wed Aug 16 2023 Marian Koncek - 3.9.0-1 +- Update to upstream version 3.9.0 + +* Thu Jul 20 2023 Fedora Release Engineering - 3.6.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 3.6.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Aug 22 2022 Mikolaj Izdebski - 3.6.4-3 +- Rename javadocs subpackage to javadoc + +* Thu Jul 21 2022 Fedora Release Engineering - 3.6.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Apr 28 2022 Mikolaj Izdebski - 3.6.4-1 +- Update to upstream version 3.6.4 + +* Sat Feb 05 2022 Jiri Vanek - 3.6.0-12 +- Rebuilt for java-17-openjdk as system jdk + +* Thu Jan 20 2022 Fedora Release Engineering - 3.6.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 3.6.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon May 17 2021 Mikolaj Izdebski - 3.6.0-9 +- Bootstrap build +- Non-bootstrap build + +* Tue Jan 26 2021 Fedora Release Engineering - 0:3.6.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Aug 22 2020 Fabio Valentini - 0:3.6.0-7 +- Disable unused ant scripting support. + +* Tue Jul 28 2020 Fedora Release Engineering - 0:3.6.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Jiri Vanek - 0:3.6.0-5 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Thu May 14 2020 Fabio Valentini - 0:3.6.0-4 +- Ignore jTidy crashes when generating maven plugin descriptors. + +* Mon Apr 20 2020 Mikolaj Izdebski - 3.6.0-4 +- Disable beanshell modules + +* Sun Mar 29 2020 Fabio Valentini - 0:3.6.0-3 +- Disable unused beanshell support. + +* Fri Mar 27 2020 Fabio Valentini - 0:3.6.0-2 +- Rebuild for fixed maven-parent. + +* Thu Feb 27 2020 Jayashree Huttanagoudar - 0:3.6.0-1 +- Update to upstream version 3.6.0. +- Section related to javadoc is removed because in the latest upstream source javadoc module is removed. + +* Wed Jan 29 2020 Fedora Release Engineering - 0:3.5.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Nov 05 2019 Mikolaj Izdebski - 3.6.0-3 +- Mass rebuild for javapackages-tools 201902 + +* Thu Jul 25 2019 Fedora Release Engineering - 0:3.5.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri May 24 2019 Mikolaj Izdebski - 3.6.0-2 +- Mass rebuild for javapackages-tools 201901 + +* Fri Feb 01 2019 Fedora Release Engineering - 0:3.5.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 02 2019 Marian Koncek - 0:3.6.0-1 +- Update to upstream version 3.6.0 + +* Tue Jul 31 2018 Michael Simacek - 0:3.5.1-4 +- Install license files for all subpackage combinations + +* Fri Jul 13 2018 Fedora Release Engineering - 0:3.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 0:3.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Jan 26 2018 Mikolaj Izdebski - 0:3.5.1-1 +- Update to upstream version 3.5.1 + +* Fri Sep 15 2017 Michael Simacek - 0:3.5-4 +- Add missing dependency + +* Wed Jul 26 2017 Fedora Release Engineering - 0:3.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0:3.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Nov 18 2016 Michael Simacek - 0:3.5-1 +- Update to upstream version 3.5 + +* Thu May 12 2016 Mikolaj Izdebski - 0:3.4-5 +- Port to plexus-utils 3.0.24 + +* Thu Feb 04 2016 Fedora Release Engineering - 0:3.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0:3.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Mar 16 2015 Michael Simacek - 0:3.4-2 +- Prevent NPE when setting description element + +* Mon Mar 16 2015 Michael Simacek - 0:3.4-1 +- Update to upstream version 3.4 + +* Tue Oct 28 2014 Mikolaj Izdebski - 0:3.3-4 +- Port to QDox 2.0 + +* Tue Oct 14 2014 Mikolaj Izdebski - 0:3.3-3 +- Remove legacy Obsoletes/Provides for maven2 plugin + +* Mon Oct 13 2014 Mikolaj Izdebski - 0:3.3-2 +- Port to maven-reporting-impl 2.3 + +* Thu Jun 19 2014 Michal Srb - 0:3.3-1 +- Update to upstream version 3.3 + +* Sat Jun 07 2014 Fedora Release Engineering - 0:3.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Mar 04 2014 Stanislav Ochotnicky - 0:3.1-19 +- Use Requires: java-headless rebuild (#1067528) + +* Mon Jan 27 2014 Mikolaj Izdebski - 0:3.1-18 +- Use Maven 3.x APIs + +* Fri Jan 10 2014 Mikolaj Izdebski - 0:3.1-17 +- Remove explicit requires +- Resolves: rhbz#1051527 + +* Fri Sep 20 2013 Mikolaj Izdebski - 0:3.1-16 +- Disable test dependencies + +* Fri Sep 20 2013 Mikolaj Izdebski - 0:3.1-15 +- Fix com.sun:tools dependency + +* Thu Aug 29 2013 Michal Srb - 0:3.1-14 +- Adapt to current guidelines (Resolves: #960526) + +* Sat Aug 03 2013 Fedora Release Engineering - 0:3.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue May 7 2013 Mikolaj Izdebski - 0:3.1-12 +- Disable resolution of test artifacts + +* Thu Apr 18 2013 Mikolaj Izdebski - 0:3.1-11 +- Remove test dependencies + +* Mon Mar 11 2013 Mikolaj Izdebski - 0:3.1-10 +- Add patch for MPLUGIN-242 +- Resolves: rhbz#920042 + +* Thu Feb 14 2013 Fedora Release Engineering - 0:3.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Feb 06 2013 Java SIG - 0:3.1-8 +- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild +- Replace maven BuildRequires with maven-local + +* Fri Dec 21 2012 Michal Srb - 0:3.1-7 +- Migrated from maven-doxia to doxia subpackage (Resolves: #889147) + +* Wed Nov 14 2012 Mikolaj Izdebski - 0:3.1-6 +- Skip running tests because they are failing + +* Tue Sep 11 2012 Mikolaj Izdebski - 0:3.1-5 +- Add missing requires + +* Tue Sep 11 2012 Mikolaj Izdebski - 0:3.1-4 +- Rebuild without bootstrap + +* Tue Sep 11 2012 Mikolaj Izdebski - 0:3.1-3 +- Add obsoletes for maven-plugin-annotations + +* Mon Sep 10 2012 Mikolaj Izdebski - 0:3.1-2 +- Bump release + +* Fri Sep 7 2012 Mikolaj Izdebski - 0:3.1-1 +- Update to upstream version 3.1 +- Bootstrap using prebuilt upstream binaries + +* Thu Sep 6 2012 Mikolaj Izdebski - 0:2.7-7 +- Remove rpm bug workaround + +* Tue Aug 28 2012 Mikolaj Izdebski - 0:2.7-6 +- Wrap descriptions at column 80 +- Install LICENSE and NOTICE files + +* Thu Jul 19 2012 Fedora Release Engineering - 0:2.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0:2.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Nov 16 2011 Jaromir Capik - 0:2.7-3 +- Missing com.sun.javadoc / com.sun.tools.doclet forced in the POM + +* Tue Aug 16 2011 Jaromir Capik - 0:2.7-2 +- Removal of plexus-maven-plugin (not needed) +- Migration to maven3 +- Removal of unwanted file duplicates +- Minor spec file changes according to the latest guidelines + +* Sat Feb 12 2011 Alexander Kurtakov 0:2.7-1 +- Update to new upstream release. +- Adapt to current guidelines. + +* Tue Feb 08 2011 Fedora Release Engineering - 0:2.6-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Sep 30 2010 Stanislav Ochotnicky - 0:2.6-8 +- Remove jtidy depmap (not needed anymore) + +* Wed Sep 29 2010 Stanislav Ochotnicky - 0:2.6-7 +- Add patch for new jtidy +- Add jtidy depmap + +* Wed Sep 8 2010 Alexander Kurtakov 0:2.6-6 +- BR maven-site-plugin. +- Use javadoc:aggregate for multimodule projects. + +* Thu May 27 2010 Alexander Kurtakov 0:2.6-5 +- Add missing requires. +- Drop modello patches not needed anymore. + +* Wed May 19 2010 Alexander Kurtakov 0:2.6-4 +- Fix plugin-tools-java obsoletes. + +* Tue May 18 2010 Alexander Kurtakov 0:2.6-3 +- More BRs. + +* Tue May 18 2010 Alexander Kurtakov 0:2.6-2 +- Fix BRs. + +* Tue May 18 2010 Alexander Kurtakov 2.6-0 +- Update to 2.6. +- Separate modules as subpackages. + +* Mon Nov 23 2009 Alexander Kurtakov 0:2.1-6 +- BR maven-plugin-tools. + +* Mon Aug 31 2009 Alexander Kurtakov 0:2.1-5 +- Set minimum version for plexus-utils BR. +- BR java-devel. +- Fix javadoc subpackage description. + +* Mon Aug 31 2009 Alexander Kurtakov 0:2.1-4 +- Adapt for Fedora. + +* Wed May 20 2009 Fernando Nasser - 0:2.1-3 +- Fix license +- Fix URL + +* Mon Apr 27 2009 Yong Yang - 0:2.1-2 +- Add BRs for maven-doxia* +- Rebuild with maven2-2.0.8 built in non-bootstrap mode + +* Mon Mar 09 2009 Yong Yang - 0:2.1-1 +- Import from dbhole's maven2 2.0.8 packages + +* Mon Apr 07 2008 Deepak Bhole - 0:2.1-0jpp.1 +- Initial build diff --git a/plans/javapackages.fmf b/plans/javapackages.fmf new file mode 100644 index 0000000..8ba3510 --- /dev/null +++ b/plans/javapackages.fmf @@ -0,0 +1,7 @@ +summary: Run javapackages-specific tests +discover: + how: fmf + url: https://src.fedoraproject.org/tests/javapackages + ref: c9s +execute: + how: tmt diff --git a/sources b/sources new file mode 100644 index 0000000..929c742 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (maven-plugin-tools-3.9.0-source-release.zip) = b4cc3345875c80f74fee4a854b80792880719dfbd733fc150c1875d16953a31875e3cec5cde81e196fb13105dd77a770ace720cd2c982dcc8d6c6b99ac12c196