commit 50d769e73fce3d7cf39e7302aa44104d1b498e4d Author: Adrian Schröter Date: Mon Feb 19 15:44:57 2024 +0100 Sync from SUSE:ALP:Source:Standard:1.0 maven-jar-plugin revision 60220cab73b4cad1accfe1f1ebdb3c3d diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/01-allow-replacing-artifacts.patch b/01-allow-replacing-artifacts.patch new file mode 100644 index 0000000..520d9a1 --- /dev/null +++ b/01-allow-replacing-artifacts.patch @@ -0,0 +1,11 @@ +--- maven-jar-plugin-3.3.0/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java 2023-09-14 08:41:53.495070762 +0200 ++++ maven-jar-plugin-3.3.0/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java 2023-09-14 08:46:56.323819346 +0200 +@@ -312,7 +312,7 @@ + { + if ( projectHasAlreadySetAnArtifact() ) + { +- throw new MojoExecutionException( "You have to use a classifier " ++ getLog().warn( "You have to use a classifier " + + "to attach supplemental artifacts to the project instead of replacing them." ); + } + getProject().getArtifact().setFile( jarFile ); diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..2eb4fda --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + bootstrap + diff --git a/maven-jar-plugin-3.3.0-source-release.zip b/maven-jar-plugin-3.3.0-source-release.zip new file mode 100644 index 0000000..38e6511 --- /dev/null +++ b/maven-jar-plugin-3.3.0-source-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87d77c76b594d5ebb6d719d5ea5ccd1249411183ff243e50d6c315c358307b4f +size 204961 diff --git a/maven-jar-plugin-bootstrap-resources.patch b/maven-jar-plugin-bootstrap-resources.patch new file mode 100644 index 0000000..48cf634 --- /dev/null +++ b/maven-jar-plugin-bootstrap-resources.patch @@ -0,0 +1,836 @@ +--- maven-jar-plugin-3.3.0//src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-jar-plugin/plugin-help.xml 1970-01-01 01:00:00.000000000 +0100 ++++ maven-jar-plugin-3.3.0/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-jar-plugin/plugin-help.xml 2023-09-14 14:04:13.990051552 +0200 +@@ -0,0 +1,274 @@ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ jar ++ ++ ++ help ++ Display help information on maven-jar-plugin. ++Call mvn jar:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.jar.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ Display help information on maven-jar-plugin. ++Call mvn jar:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ Display help information on maven-jar-plugin. ++Call mvn jar:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ ++ ++ indentSize ++ int ++ false ++ true ++ Display help information on maven-jar-plugin. ++Call mvn jar:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ ++ ++ lineLength ++ int ++ false ++ true ++ Display help information on maven-jar-plugin. ++Call mvn jar:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ jar ++ Build a JAR from the current project. ++ runtime ++ false ++ true ++ false ++ false ++ false ++ true ++ package ++ org.apache.maven.plugins.jar.JarMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ archive ++ org.apache.maven.archiver.MavenArchiveConfiguration ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ classesDirectory ++ java.io.File ++ true ++ true ++ Build a JAR from the current project. ++ ++ ++ classifier ++ java.lang.String ++ false ++ true ++ Build a JAR from the current project. ++ ++ ++ excludes ++ java.lang.String[] ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ forceCreation ++ boolean ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ includes ++ java.lang.String[] ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ outputTimestamp ++ java.lang.String ++ 3.2.0 ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ skipIfEmpty ++ boolean ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ useDefaultManifestFile ++ boolean ++ For version 3.0.0 this parameter is only defined here to break the build if you use it! ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ ++ ++ ${maven.jar.forceCreation} ++ ++ ++ ++ ${jar.useDefaultManifestFile} ++ ++ ++ ++ test-jar ++ Build a JAR of the test classes for the current project. ++ test ++ false ++ true ++ false ++ false ++ false ++ true ++ package ++ org.apache.maven.plugins.jar.TestJarMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ archive ++ org.apache.maven.archiver.MavenArchiveConfiguration ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ classifier ++ java.lang.String ++ false ++ true ++ Build a JAR of the test classes for the current project. ++ ++ ++ excludes ++ java.lang.String[] ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ forceCreation ++ boolean ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ includes ++ java.lang.String[] ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ outputTimestamp ++ java.lang.String ++ 3.2.0 ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ skip ++ boolean ++ false ++ true ++ Build a JAR of the test classes for the current project. ++ ++ ++ skipIfEmpty ++ boolean ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ testClassesDirectory ++ java.io.File ++ true ++ true ++ Build a JAR of the test classes for the current project. ++ ++ ++ useDefaultManifestFile ++ boolean ++ For version 3.0.0 this parameter is only defined here to break the build if you use it! ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ ++ ++ ${maven.jar.forceCreation} ++ ++ ++ ${maven.test.skip} ++ ++ ++ ${jar.useDefaultManifestFile} ++ ++ ++ ++ +--- maven-jar-plugin-3.3.0//src/main/filtered-resources/META-INF/maven/plugin.xml 1970-01-01 01:00:00.000000000 +0100 ++++ maven-jar-plugin-3.3.0/src/main/filtered-resources/META-INF/maven/plugin.xml 2023-09-14 14:03:04.266238892 +0200 +@@ -0,0 +1,556 @@ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ jar ++ false ++ true ++ ++ ++ help ++ Display help information on maven-jar-plugin.<br> ++Call <code>mvn jar:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.jar.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ Display help information on maven-jar-plugin.<br> ++Call <code>mvn jar:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ Display help information on maven-jar-plugin.<br> ++Call <code>mvn jar:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ ++ ++ indentSize ++ int ++ false ++ true ++ Display help information on maven-jar-plugin.<br> ++Call <code>mvn jar:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ ++ ++ lineLength ++ int ++ false ++ true ++ Display help information on maven-jar-plugin.<br> ++Call <code>mvn jar:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ jar ++ Build a JAR from the current project. ++ runtime ++ false ++ true ++ false ++ false ++ false ++ true ++ package ++ org.apache.maven.plugins.jar.JarMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ archive ++ org.apache.maven.archiver.MavenArchiveConfiguration ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ classesDirectory ++ java.io.File ++ true ++ true ++ Build a JAR from the current project. ++ ++ ++ classifier ++ java.lang.String ++ false ++ true ++ Build a JAR from the current project. ++ ++ ++ excludes ++ java.lang.String[] ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ finalName ++ java.lang.String ++ false ++ false ++ Base class for creating a jar from project classes. ++ ++ ++ forceCreation ++ boolean ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ includes ++ java.lang.String[] ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ outputTimestamp ++ java.lang.String ++ 3.2.0 ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ true ++ false ++ Base class for creating a jar from project classes. ++ ++ ++ session ++ org.apache.maven.execution.MavenSession ++ true ++ false ++ Base class for creating a jar from project classes. ++ ++ ++ skipIfEmpty ++ boolean ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ useDefaultManifestFile ++ boolean ++ For version 3.0.0 this parameter is only defined here to break the build if you use it! ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ ++ ++ ++ ${maven.jar.forceCreation} ++ ++ ++ ++ ++ ++ ${jar.useDefaultManifestFile} ++ ++ ++ ++ java.util.Map ++ archivers ++ ++ ++ org.apache.maven.project.MavenProjectHelper ++ projectHelper ++ ++ ++ ++ ++ test-jar ++ Build a JAR of the test classes for the current project. ++ test ++ false ++ true ++ false ++ false ++ false ++ true ++ package ++ org.apache.maven.plugins.jar.TestJarMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ archive ++ org.apache.maven.archiver.MavenArchiveConfiguration ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ classifier ++ java.lang.String ++ false ++ true ++ Build a JAR of the test classes for the current project. ++ ++ ++ excludes ++ java.lang.String[] ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ finalName ++ java.lang.String ++ false ++ false ++ Base class for creating a jar from project classes. ++ ++ ++ forceCreation ++ boolean ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ includes ++ java.lang.String[] ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ outputTimestamp ++ java.lang.String ++ 3.2.0 ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ true ++ false ++ Base class for creating a jar from project classes. ++ ++ ++ session ++ org.apache.maven.execution.MavenSession ++ true ++ false ++ Base class for creating a jar from project classes. ++ ++ ++ skip ++ boolean ++ false ++ true ++ Build a JAR of the test classes for the current project. ++ ++ ++ skipIfEmpty ++ boolean ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ testClassesDirectory ++ java.io.File ++ true ++ true ++ Build a JAR of the test classes for the current project. ++ ++ ++ useDefaultManifestFile ++ boolean ++ For version 3.0.0 this parameter is only defined here to break the build if you use it! ++ false ++ true ++ Base class for creating a jar from project classes. ++ ++ ++ ++ ++ ++ ${maven.jar.forceCreation} ++ ++ ++ ++ ++ ${maven.test.skip} ++ ++ ++ ${jar.useDefaultManifestFile} ++ ++ ++ ++ java.util.Map ++ archivers ++ ++ ++ org.apache.maven.project.MavenProjectHelper ++ projectHelper ++ ++ ++ ++ ++ ++ ++ org.eclipse.sisu ++ org.eclipse.sisu.plexus ++ jar ++ 0.9.0.M2 ++ ++ ++ org.codehaus.plexus ++ plexus-classworlds ++ jar ++ 2.7.0 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-spi ++ jar ++ 1.9.10 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-util ++ jar ++ 1.9.10 ++ ++ ++ org.apache.maven ++ maven-settings ++ jar ++ 3.9.2 ++ ++ ++ org.slf4j ++ slf4j-api ++ jar ++ 1.7.36 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-api ++ jar ++ 1.9.10 ++ ++ ++ org.apache.maven ++ maven-model-builder ++ jar ++ 3.9.2 ++ ++ ++ org.codehaus.plexus ++ plexus-component-annotations ++ jar ++ 2.1.0 ++ ++ ++ org.apache.maven ++ maven-resolver-provider ++ jar ++ 3.9.2 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ jar ++ 3.3.4 ++ ++ ++ org.eclipse.sisu ++ org.eclipse.sisu.inject ++ jar ++ 0.9.0.M2 ++ ++ ++ javax.enterprise ++ cdi-api ++ jar ++ 1.1 ++ ++ ++ jakarta.inject ++ jakarta.inject-api ++ jar ++ 1.0 ++ ++ ++ org.jboss.spec.javax.interceptor ++ jboss-interceptors-api_1.2_spec ++ jar ++ any ++ ++ ++ org.apache.maven ++ maven-builder-support ++ jar ++ 3.9.2 ++ ++ ++ org.apache.maven ++ maven-repository-metadata ++ jar ++ 3.9.2 ++ ++ ++ org.codehaus.plexus ++ plexus-interpolation ++ jar ++ 1.26 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-impl ++ jar ++ 1.9.10 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-named-locks ++ jar ++ 1.9.12 ++ ++ ++ org.apache.maven ++ maven-settings-builder ++ jar ++ 3.9.2 ++ ++ ++ org.codehaus.plexus ++ plexus-sec-dispatcher ++ jar ++ 2.0 ++ ++ ++ org.codehaus.plexus ++ plexus-cipher ++ jar ++ 2.0 ++ ++ ++ javax.inject ++ javax.inject ++ jar ++ 1 ++ ++ ++ org.apache.maven.shared ++ file-management ++ jar ++ 3.1.0 ++ ++ ++ org.apache.maven.shared ++ maven-shared-io ++ jar ++ 3.0.0 ++ ++ ++ org.apache.maven.wagon ++ wagon-provider-api ++ jar ++ 2.10 ++ ++ ++ org.apache.maven ++ maven-compat ++ jar ++ 3.0 ++ ++ ++ org.apache.maven ++ maven-archiver ++ jar ++ 3.6.0 ++ ++ ++ org.codehaus.plexus ++ plexus-archiver ++ jar ++ 4.8.0 ++ ++ ++ org.codehaus.plexus ++ plexus-io ++ jar ++ 3.4.1 ++ ++ ++ commons-io ++ commons-io ++ jar ++ 2.13.0 ++ ++ ++ org.tukaani ++ xz ++ jar ++ 1.9 ++ ++ ++ org.apache.commons ++ commons-compress ++ jar ++ 1.23.0 ++ ++ ++ org.codehaus.plexus ++ plexus-utils ++ jar ++ 3.4.2 ++ ++ ++ diff --git a/maven-jar-plugin-build.xml b/maven-jar-plugin-build.xml new file mode 100644 index 0000000..3272f7f --- /dev/null +++ b/maven-jar-plugin-build.xml @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================== WARNING =================================== + JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed. + =============================================================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven-jar-plugin.changes b/maven-jar-plugin.changes new file mode 100644 index 0000000..4a96f0b --- /dev/null +++ b/maven-jar-plugin.changes @@ -0,0 +1,103 @@ +------------------------------------------------------------------- +Wed Sep 20 05:32:35 UTC 2023 - Fridrich Strba + +- Update to upstream version 3.3.0 + * Bug + + MJAR-275: outputTimestamp not applied to module-info; breaks + reproducible builds + * Task + + MJAR-278: Update plugin (requires Maven 3.2.5+) + + MJAR-280: Java 8 as minimum + * Dependency upgrade + + MJAR-283: Upgrade Plexus Utils to 3.3.1 + + MJAR-284: Remove override for Plexus Archiver to fix order of + META-INF/ and META-INF/MANIFEST.MF entries + + MJAR-288: Upgrade Parent to 36 + + MJAR-290: Update Plexus Utils to 3.4.2 + + MJAR-291: Upgrade Parent to 37 +- Modified patches: + * 01-allow-replacing-artifacts.patch + + rediff to changed context + * maven-jar-plugin-bootstrap-resources.patch + + regenerate in cycle + +------------------------------------------------------------------- +Fri Jun 24 09:46:54 UTC 2022 - Fridrich Strba + +- Remove all dependencies with scope test, since a raw xmvn does + not hide them from maven. + +------------------------------------------------------------------- +Tue Mar 29 13:53:45 UTC 2022 - Fridrich Strba + +- Update to upstream version 3.2.2 + * Bugs: + + MJAR-276 - Don't log a warning when jar will be empty and + creation is forced + + MJAR-281 - Wrong order of META-INF/ and + META-INF/MANIFEST.MF entries + * Improvement: + + MJAR-270 - make build Reproducible + * Dependency upgrades: + + MJAR-282 - Upgrade Maven Archiver to 3.5.2 + + MJAR-283 - Upgrade Plexus Utils to 3.3.1 + + MJAR-284 - Remove override for Plexus Archiver to fix order + of META-INF/ and META-INF/MANIFEST.MF entries +- Modified patch: + * 01-allow-replacing-artifacts.patch + + rediff to different line endings + +------------------------------------------------------------------- +Tue Mar 22 13:18:12 UTC 2022 - Fridrich Strba + +- Build with java source and target levels 8 + +------------------------------------------------------------------- +Mon Nov 25 17:28:29 UTC 2019 - Fridrich Strba + +- Update to version 3.2.0 + * Bugs: + + MJAR-259 – Archiving to jar is very slow + + MJAR-241 – Jar package does not have a size in ZipEntry + * Improvements: + + MJAR-260 – Upgrade to Archiver 3.3.0 and add ITs + + MJAR-238 – Allow setting of module main class + * New Feature: + + MJAR-263 – Reproducible Builds: make entries in output jar + files reproducible (order + timestamp) + * Task: + + MJAR-251 – Add documentation information for GitHub + * Dependency upgrades: + + MJAR-261 – Upgrade plexus-archiver 3.7.0 + + MJAR-256 – Upgrade JUnit to 4.12 + + MJAR-255 – Upgrade maven-plugins parent to version 32 + + MJAR-252 – Upgrade plexus-archiver to 3.6.0 +- Modified patch: + * maven-jar-plugin-bootstrap-resources.patch + + regenerate from non-bootstrap build + +------------------------------------------------------------------- +Sun Nov 24 17:46:08 UTC 2019 - Fridrich Strba + +- Specify maven.compiler.release to fix build with jdk9+ and newer + maven-javadoc-plugin + +------------------------------------------------------------------- +Tue Oct 8 05:35:17 UTC 2019 - Fridrich Strba + +- Added patch: + * 01-allow-replacing-artifacts.patch + + Warn but do not fail with misconfigured plugin + +------------------------------------------------------------------- +Mon Apr 1 05:41:53 UTC 2019 - Fridrich Strba + +- Initial packaging of maven-jar-plugin 3.1.0 as a multibuild + package in order to be able to bootstrap a repository +- Generate and customize maven build.xml file for the bootstrap + variant +- Added patch: + * maven-jar-plugin-bootstrap-resources.patch + + For the bootstrap variant, add the pre-generated resources + in order to be able to build even without + maven-plugin-plugin diff --git a/maven-jar-plugin.spec b/maven-jar-plugin.spec new file mode 100644 index 0000000..47b949f --- /dev/null +++ b/maven-jar-plugin.spec @@ -0,0 +1,135 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "bootstrap" +%bcond_without bootstrap +%else +%bcond_with bootstrap +%endif +%global base_name maven-jar-plugin +Version: 3.3.0 +Release: 0 +Summary: Maven JAR Plugin +License: Apache-2.0 +Group: Development/Libraries/Java +URL: https://maven.apache.org/plugins/maven-jar-plugin/ +Source0: https://repo1.maven.org/maven2/org/apache/maven/plugins/%{base_name}/%{version}/%{base_name}-%{version}-source-release.zip +Source1: %{base_name}-build.xml +Patch0: %{base_name}-bootstrap-resources.patch +Patch1: 01-allow-replacing-artifacts.patch +BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 +BuildRequires: javapackages-local +BuildRequires: maven-archiver >= 3.5.0 +BuildRequires: maven-file-management +BuildRequires: maven-lib +BuildRequires: maven-plugin-annotations +BuildRequires: plexus-archiver >= 4.2.0 +BuildRequires: plexus-utils >= 3.3.0 +BuildRequires: unzip +BuildRequires: xmvn-install +BuildRequires: xmvn-resolve +BuildRequires: mvn(org.apache.maven.plugins:maven-plugins:pom:) +BuildArch: noarch +%if %{with bootstrap} +Name: %{base_name}-bootstrap +BuildRequires: ant +%else +Name: %{base_name} +BuildRequires: xmvn +BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-resources-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-surefire-plugin) +Obsoletes: %{base_name}-bootstrap +#!BuildRequires: maven-compiler-plugin-bootstrap +#!BuildRequires: maven-jar-plugin-bootstrap +#!BuildRequires: maven-javadoc-plugin-bootstrap +#!BuildRequires: maven-plugin-plugin-bootstrap +#!BuildRequires: maven-resources-plugin-bootstrap +#!BuildRequires: maven-surefire-plugin-bootstrap +%endif + +%description +Builds a Java Archive (JAR) file from the compiled +project classes and resources. + +%if %{without bootstrap} +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +API documentation for %{name}. +%endif + +%prep +%setup -q -n %{base_name}-%{version} +%if %{with bootstrap} +cp %{SOURCE1} build.xml +%patch0 -p1 +%endif +%patch1 -p1 + +# Remove all dependencies with scope test, since a raw xmvn does not hide them +%pom_remove_dep -r :::test: + +%build +# Test class MockArtifact doesn't override method getMetadata +%if %{with bootstrap} +mkdir -p lib +build-jar-repository -s lib \ + maven-file-management/file-management \ + maven-archiver/maven-archiver \ + maven/maven-artifact \ + maven/maven-core \ + maven/maven-plugin-api \ + maven-plugin-tools/maven-plugin-annotations \ + plexus/archiver \ + plexus/utils +%{ant} -Dtest.skip=true jar +%else +xmvn --batch-mode --offline \ + -Dmaven.test.skip=true -DmavenVersion=3.1.1 \ +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} + -Dmaven.compiler.release=8 \ +%endif + package org.apache.maven.plugins:maven-javadoc-plugin:aggregate +%endif + +%{mvn_artifact} pom.xml target/%{base_name}-%{version}.jar + +%install +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%dir %{_javadir}/%{name} +%license LICENSE +%doc NOTICE + +%if %{without bootstrap} +%files javadoc -f .mfiles-javadoc +%license LICENSE +%doc NOTICE +%endif + +%changelog