Sync from SUSE:ALP:Source:Standard:1.0 xmvn revision 08cb5f6b44bcf7cf947c11ffd015f79b

This commit is contained in:
Adrian Schröter 2024-02-21 14:22:56 +01:00
commit 8e4c358f11
16 changed files with 1792 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

View File

@ -0,0 +1,26 @@
From f75806e845cc26725a0aaf8de0ad6808a98c0f60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Wed, 13 Sep 2023 18:30:26 +0200
Subject: [PATCH] Do not leave a stray options file in the generated javadoc
tree
---
.../src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java
index f90b6b99..644c3930 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java
@@ -435,6 +435,8 @@ public class JavadocMojo
StandardOpenOption.TRUNCATE_EXISTING );
invokeJavadoc( outputDir );
+
+ Files.deleteIfExists( outputDir.resolve( "args" ) );
}
catch ( IOException | InterruptedException e )
{
--
2.42.0

50
UUID.patch Normal file
View File

@ -0,0 +1,50 @@
--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java
+++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java
@@ -185,7 +185,12 @@ class DefaultArtifactInstaller
am.setNamespace( repo.getNamespace() );
// UUID
- am.setUuid( UUID.randomUUID().toString() );
+ UUID guid = UUID.randomUUID();
+ if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null )
+ {
+ guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + repo.getNamespace() + artifact.toString() ).getBytes() );
+ }
+ am.setUuid( guid.toString() );
// Compat version
for ( String version : rule.getVersions() )
--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JavaPackage.java
+++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JavaPackage.java
@@ -58,7 +58,12 @@ public class JavaPackage
super( id );
this.basePackageName = basePackageName;
this.metadataDir = metadataDir;
- metadata.setUuid( UUID.randomUUID().toString() );
+ UUID guid = UUID.randomUUID();
+ if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null )
+ {
+ guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + id + basePackageName + metadataDir.toString() ).getBytes() );
+ }
+ metadata.setUuid( guid.toString() );
}
/**
@@ -71,11 +76,16 @@ public class JavaPackage
private PackageMetadata getSplitMetadata( String namespace )
{
PackageMetadata splitMetadata = new PackageMetadata();
- splitMetadata.setUuid( UUID.randomUUID().toString() );
splitMetadata.setProperties( metadata.getProperties() );
List<ArtifactMetadata> allArtifacts = metadata.getArtifacts();
List<ArtifactMetadata> splitArtifacts =
allArtifacts.stream().filter( a -> namespace.equals( a.getNamespace() ) ).collect( Collectors.toList() );
+ UUID guid = UUID.randomUUID();
+ if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null )
+ {
+ guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + splitArtifacts.toString() ).getBytes() );
+ }
+ splitMetadata.setUuid( guid.toString() );
splitMetadata.setArtifacts( splitArtifacts );
splitMetadata.setSkippedArtifacts( metadata.getSkippedArtifacts() );
return splitMetadata;

6
_multibuild Normal file
View File

@ -0,0 +1,6 @@
<multibuild>
<package>xmvn-connector</package>
<package>xmvn-mojo</package>
<package>xmvn-parent</package>
<package>xmvn-tools</package>
</multibuild>

BIN
xmvn-4.2.0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
xmvn-build.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

210
xmvn-connector.changes Normal file
View File

@ -0,0 +1,210 @@
-------------------------------------------------------------------
Tue Jan 30 09:25:00 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* UUID.patch
+ sync with the version in our official upstream pull request
-------------------------------------------------------------------
Wed Sep 13 16:55:35 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch
+ Remove generated temporary file from the tree after use, make
thus the generated javadoc more reproducible
-------------------------------------------------------------------
Wed Aug 2 09:46:49 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* UUID.patch
+ try to assure unique UUID for each of the split packages.
-------------------------------------------------------------------
Mon Jul 24 19:21:09 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* UUID.patch
+ avoid generating random UUIDs, which makes reproducible build
impossible (bsc#1162112)
-------------------------------------------------------------------
Wed May 3 09:26:56 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.2.0
* Changes:
+ Make XMvn Resolver log to XMvn Logger
+ Make XMvn Subst log to XMvn Logger
+ Depend on junit-jupiter-api instead of junit-jupiter
+ Suppress deprecation warnings in MavenExtensionTest
+ Remove XMvn Connector dependency on Plexus Utils
+ Remove XMvn MOJO dependency on Plexus Utils
+ Port XMvn MOJO from Xpp3Dom to StAX
+ Update Maven to version 3.9.1
+ Don't pass duplicate --patch-module to javadoc
+ Make Javadoc MOJO respect ignoreJPMS configuration flag
+ Propagate javadoc output througt Logger
+ Remove dependency on Plexus Classworlds
+ Remove unneeded managed dependency on maven-invoker
+ Use ServiceLocator to find Logger
+ Use parametrized logging feature
+ Use XMvn Logger instead of Plexus Logger
+ Get rid of Slf4jLoggerAdapter
+ Drop support for Gossip logger
+ Move XMvn Logger to API module
+ Ignore JPMS when all modules are automatic
+ Refactor Javadoc MOJO
+ Make Javadoc not fail when no sources are found
+ Add an integration test for javadoc generation with
module-info.java but no sources
+ Add an integration test for javadoc generation with
Automatic-Module-Name
+ Make Javadoc MOJO work in case one of JPMS modules has no
sources
+ Prioritize certain XMvn components over Maven components
+ Port XMvn MOJO to JSR-330
+ Refactor XMvnMojoExecutionConfigurator
+ Make builddep MOJO compatible with Maven 4
+ Port to JSR-330
+ Get rid of ModelProcessor
+ Refactor XMvnModelValidator
+ Refactor XMvnToolchainManager
+ Convert lambda to method reference
+ Improve Javadoc MOJO JPMS support
+ Add a test case for JPMS javadoc generation with remote
dependencies
+ Add a test case for JPMS multimodule javadoc generation
+ Exclude src/test/resources-filtered/** from RAT
+ Fix scope of xmvn-mojo dependency on plexus-utils
+ --module-path not allowed with release=8
+ Mimic maven-javadoc-plugin for -source and --release
+ testJavadocJPMS needs a modular java
+ Let modello generate source 8
+ Add a jdk9+ profile to assure that we are jdk8 compatible
+ Revert "Use new Collection methods added in Java 9"
+ Revert "Update compiler source/target to JDK 11"
+ Restore possibility to build with Java 8
+ Simple implementation of toolchains
https://github.com/fedora-java/xmvn/issues/142
+ Port to Modello 2.0.0
- Removed patches
* 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
* 0001-Port-to-Maven-3.8.5.patch
* 0001-Restore-possibility-to-build-with-Java-8.patch
* 0001-Simple-implementation-of-toolchains-https-github.com.patch
* 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
* 0002-module-path-not-allowed-with-release-8.patch
* 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
* 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
+ Integrated upstream in this version
-------------------------------------------------------------------
Mon May 16 15:56:00 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0001-Port-to-Maven-3.8.5.patch
+ Allow buiding against unpatched maven 3.8.5
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
* Changes:
+ Bump codecov/codecov-action from 2.0.1 to 2.0.2
+ Bump codecov/codecov-action from 1 to 2.0.1
+ Bump commons-compress from 1.20 to 1.21 in /xmvn-parent
+ Change logic for JPMS detection by Javadoc MOJO
+ Fix Javadoc generation for non-JPMS project with JDK 11
+ Remove superflous JARs from assembly
+ Create a backup file when injecting Manifest
+ Attach site artifacts only in site lifecycle
+ Rename xmvn-connector-aether to xmvn-connector
+ Use try-with-resources to avoid resource leaks
+ Remove unused AtomicFileCounter class
+ Update Eclipse project settings
+ Add separate build profile for code quality tools
+ Remove prerequisites on Maven version
+ Drop bisect tool
+ Move release plugins to pluginManagement
+ Move prerequisites on Maven version to xmvn-mojo
+ Fix javadoc warning
+ Bump junit from 4.12 to 4.13.1 in /xmvn-it/src/test/resources/testBisect
+ Bump slf4jVersion from 1.8.0-beta4 to 2.0.0-alpha2 in /xmvn-parent
+ Compile everything whith --release 11
+ Fix assembly building with Maven Checkstyle Plugin 3.1.0+
+ Update to latest Checkstyle
+ Format code to conform to Checkstyle 8.44
+ Untabify Maven build files
+ Update Maven plugin versions
+ Drop Ivy
+ Drop Gradle
+ Add support for compiler release setting
+ Fix Javadoc generation for modular projects
+ Add JPMS check to Javadoc MOJO
+ Add missing license headers
+ Disable I/O write test if the build is running as root
+ Switch to SHA-256 in CacheManager
+ Update dependency xmlunit.assertj to xmlunit.assertj3
+ Fixes #56 - Honour source parameter in javadoc mojo
+ Implement XMvn toolchain manager
+ Fix requires generation for self-depending packages
+ Remove redundant parentheses
+ Remove redudnant use of this
+ Relay on implicit access modifiers of interfaces
+ Rely on implicit boxing
+ Make use of diamond operator
+ [test] Use use lambda expressions for creation of DeploymentResult
+ Remove use of deprecated StringUtils methods
+ [test] Port tests to JUnit 5
+ Update to latest dependencies
+ [test] Add missing assertions about XML output
+ Use new Collection methods added in Java 9
+ Remove uses of deprecated Class.newInstance() method
+ Drop artifact resolution from JAVA_HOME
+ Update to latest Maven plugin versions
+ Update compiler source/target to JDK 11
+ Update Eclipse project settings
+ Make xmvn-subst honor settings for ignoring duplicate metadata
+ Allow removing plugins during model validation
+ Prefer namespaced metadata when duplicates are found
- Rename package xmvn-connector-aether -> xmvn-connector
- Removed patches:
* xmvn-gradle_4_4_1.patch
* 0001-Fix-resolution-of-aliases-registered-by-add_maven_de.patch
+ Patches the inexisting xmvn-connector-gradle module
* 0001-Prefer-namespaced-metadata-when-duplicates-are-found.patch
* 0002-Make-xmvn-subst-honor-settings-for-ignoring-duplicat.patch
* 0003-Fix-requires-generation-for-self-depending-packages.patch
+ Integrated upstream
- Added patches:
* 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
* 0002-module-path-not-allowed-with-release-8.patch
+ make Xmvn Javadoc Mojo respect release and source arguments
* 0001-Simple-implementation-of-toolchains-https-github.com.patch
+ consider toolchains if specifies in Xmvn Javadoc Mojo
* 0001-Restore-possibility-to-build-with-Java-8.patch
* 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
* 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
* 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
+ different fixes to be able to build with JDK8
-------------------------------------------------------------------
Thu Nov 21 14:23:27 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 3.1.0
- Removed patches:
* 0001-Fix-installer-plugin-loading.patch
* 0001-Port-to-Gradle-4.2.patch
* 0001-Port-to-Gradle-4.3.1.patch
* 0001-Support-setting-Xdoclint-none-in-m-javadoc-p-3.0.0.patch
* 0001-Fix-configuration-of-aliased-plugins.patch
* 0001-Don-t-use-JAXB-for-converting-bytes-to-hex-string.patch
* 0001-Use-apache-commons-compress-for-manifest-injection-a.patch
* 0001-port-to-gradle-4.4.1.patch
* 0001-Replace-JAXB-parser.patch
+ Integrated in this version
-------------------------------------------------------------------
Wed Mar 27 06:27:36 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of xmvn-connector-aether 3.0.0

131
xmvn-connector.spec Normal file
View File

@ -0,0 +1,131 @@
#
# spec file for package xmvn-connector
#
# Copyright (c) 2024 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 parent xmvn
%global subname connector
%bcond_with tests
Name: %{parent}-%{subname}
Version: 4.2.0
Release: 0
Summary: XMvn Connector for Maven Resolver
License: Apache-2.0
Group: Development/Tools/Building
URL: https://fedora-java.github.io/xmvn/
Source0: https://github.com/fedora-java/%{parent}/releases/download/%{version}/%{parent}-%{version}.tar.xz
Source1: %{parent}-build.tar.xz
Patch0: UUID.patch
Patch1: 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch
BuildRequires: %{parent}-api = %{version}
BuildRequires: %{parent}-core = %{version}
BuildRequires: ant
BuildRequires: atinject
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: maven-lib
BuildRequires: maven-resolver-api
BuildRequires: sisu-inject
BuildRequires: sisu-plexus
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
Provides: %{name}-aether = %{version}
Obsoletes: %{name}-aether < %{version}
BuildArch: noarch
%description
This package provides XMvn Connector for Maven Resolver, which
provides integration of Maven Resolver with XMvn. It provides an
adapter which allows XMvn resolver to be used as Maven workspace
reader.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package provides %{summary}.
%prep
%setup -q -n %{parent}-%{version} -a1
%autopatch -p1
# Resolver IT won't work either - it tries to execute JAR file, which
# relies on Class-Path in manifest, which is forbidden in Fedora...
find -name ResolverIntegrationTest.java -delete
%pom_remove_plugin -r :maven-site-plugin
%{mvn_package} ":xmvn{,-it}" __noinstall
# Upstream code quality checks, not relevant when building RPMs
%pom_remove_plugin -r :apache-rat-plugin
%pom_remove_plugin -r :maven-checkstyle-plugin
%pom_remove_plugin -r :jacoco-maven-plugin
# FIXME pom macros don't seem to support submodules in profile
%pom_remove_plugin :jacoco-maven-plugin xmvn-it
# remove dependency plugin maven-binaries execution
# we provide apache-maven by symlink
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
# Don't put Class-Path attributes in manifests
%pom_remove_plugin :maven-jar-plugin xmvn-tools
pushd %{name}
%{mvn_file} :{*} %{parent}/@1
popd
%build
mkdir -p lib
build-jar-repository -s lib \
atinject \
maven/maven-artifact \
maven/maven-core \
maven/maven-model \
maven/maven-model-builder \
maven/maven-plugin-api \
maven-resolver/maven-resolver-api \
org.eclipse.sisu.inject \
org.eclipse.sisu.plexus \
%{parent}/%{parent}-api
pushd %{name}
%{ant} \
%if %{without tests}
-Dtest.skip=true \
%endif
package javadoc
%{mvn_artifact} pom.xml target/%{name}-%{version}.jar
popd
%install
pushd %{name}
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
popd
%files -f %{name}/.mfiles
%license LICENSE NOTICE
%doc AUTHORS README.md
%files javadoc -f %{name}/.mfiles-javadoc
%license LICENSE NOTICE
%changelog

214
xmvn-mojo.changes Normal file
View File

@ -0,0 +1,214 @@
-------------------------------------------------------------------
Tue Jan 30 09:25:00 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* UUID.patch
+ sync with the version in our official upstream pull request
-------------------------------------------------------------------
Wed Sep 13 16:55:35 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch
+ Remove generated temporary file from the tree after use, make
thus the generated javadoc more reproducible
-------------------------------------------------------------------
Wed Aug 2 09:46:49 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* UUID.patch
+ try to assure unique UUID for each of the split packages.
-------------------------------------------------------------------
Mon Jul 24 19:21:09 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* UUID.patch
+ avoid generating random UUIDs, which makes reproducible build
impossible (bsc#1162112)
-------------------------------------------------------------------
Wed May 3 09:26:56 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.2.0
* Changes:
+ Make XMvn Resolver log to XMvn Logger
+ Make XMvn Subst log to XMvn Logger
+ Depend on junit-jupiter-api instead of junit-jupiter
+ Suppress deprecation warnings in MavenExtensionTest
+ Remove XMvn Connector dependency on Plexus Utils
+ Remove XMvn MOJO dependency on Plexus Utils
+ Port XMvn MOJO from Xpp3Dom to StAX
+ Update Maven to version 3.9.1
+ Don't pass duplicate --patch-module to javadoc
+ Make Javadoc MOJO respect ignoreJPMS configuration flag
+ Propagate javadoc output througt Logger
+ Remove dependency on Plexus Classworlds
+ Remove unneeded managed dependency on maven-invoker
+ Use ServiceLocator to find Logger
+ Use parametrized logging feature
+ Use XMvn Logger instead of Plexus Logger
+ Get rid of Slf4jLoggerAdapter
+ Drop support for Gossip logger
+ Move XMvn Logger to API module
+ Ignore JPMS when all modules are automatic
+ Refactor Javadoc MOJO
+ Make Javadoc not fail when no sources are found
+ Add an integration test for javadoc generation with
module-info.java but no sources
+ Add an integration test for javadoc generation with
Automatic-Module-Name
+ Make Javadoc MOJO work in case one of JPMS modules has no
sources
+ Prioritize certain XMvn components over Maven components
+ Port XMvn MOJO to JSR-330
+ Refactor XMvnMojoExecutionConfigurator
+ Make builddep MOJO compatible with Maven 4
+ Port to JSR-330
+ Get rid of ModelProcessor
+ Refactor XMvnModelValidator
+ Refactor XMvnToolchainManager
+ Convert lambda to method reference
+ Improve Javadoc MOJO JPMS support
+ Add a test case for JPMS javadoc generation with remote
dependencies
+ Add a test case for JPMS multimodule javadoc generation
+ Exclude src/test/resources-filtered/** from RAT
+ Fix scope of xmvn-mojo dependency on plexus-utils
+ --module-path not allowed with release=8
+ Mimic maven-javadoc-plugin for -source and --release
+ testJavadocJPMS needs a modular java
+ Let modello generate source 8
+ Add a jdk9+ profile to assure that we are jdk8 compatible
+ Revert "Use new Collection methods added in Java 9"
+ Revert "Update compiler source/target to JDK 11"
+ Restore possibility to build with Java 8
+ Simple implementation of toolchains
https://github.com/fedora-java/xmvn/issues/142
+ Port to Modello 2.0.0
- Removed patches
* 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
* 0001-Port-to-Maven-3.8.5.patch
* 0001-Restore-possibility-to-build-with-Java-8.patch
* 0001-Simple-implementation-of-toolchains-https-github.com.patch
* 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
* 0002-module-path-not-allowed-with-release-8.patch
* 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
* 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
+ Integrated upstream in this version
-------------------------------------------------------------------
Fri Jun 24 08:47:41 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- The build does not depend on easymock
-------------------------------------------------------------------
Mon May 16 15:56:00 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0001-Port-to-Maven-3.8.5.patch
+ Allow buiding against unpatched maven 3.8.5
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
* Changes:
+ Bump codecov/codecov-action from 2.0.1 to 2.0.2
+ Bump codecov/codecov-action from 1 to 2.0.1
+ Bump commons-compress from 1.20 to 1.21 in /xmvn-parent
+ Change logic for JPMS detection by Javadoc MOJO
+ Fix Javadoc generation for non-JPMS project with JDK 11
+ Remove superflous JARs from assembly
+ Create a backup file when injecting Manifest
+ Attach site artifacts only in site lifecycle
+ Rename xmvn-connector-aether to xmvn-connector
+ Use try-with-resources to avoid resource leaks
+ Remove unused AtomicFileCounter class
+ Update Eclipse project settings
+ Add separate build profile for code quality tools
+ Remove prerequisites on Maven version
+ Drop bisect tool
+ Move release plugins to pluginManagement
+ Move prerequisites on Maven version to xmvn-mojo
+ Fix javadoc warning
+ Bump junit from 4.12 to 4.13.1 in /xmvn-it/src/test/resources/testBisect
+ Bump slf4jVersion from 1.8.0-beta4 to 2.0.0-alpha2 in /xmvn-parent
+ Compile everything whith --release 11
+ Fix assembly building with Maven Checkstyle Plugin 3.1.0+
+ Update to latest Checkstyle
+ Format code to conform to Checkstyle 8.44
+ Untabify Maven build files
+ Update Maven plugin versions
+ Drop Ivy
+ Drop Gradle
+ Add support for compiler release setting
+ Fix Javadoc generation for modular projects
+ Add JPMS check to Javadoc MOJO
+ Add missing license headers
+ Disable I/O write test if the build is running as root
+ Switch to SHA-256 in CacheManager
+ Update dependency xmlunit.assertj to xmlunit.assertj3
+ Fixes #56 - Honour source parameter in javadoc mojo
+ Implement XMvn toolchain manager
+ Fix requires generation for self-depending packages
+ Remove redundant parentheses
+ Remove redudnant use of this
+ Relay on implicit access modifiers of interfaces
+ Rely on implicit boxing
+ Make use of diamond operator
+ [test] Use use lambda expressions for creation of DeploymentResult
+ Remove use of deprecated StringUtils methods
+ [test] Port tests to JUnit 5
+ Update to latest dependencies
+ [test] Add missing assertions about XML output
+ Use new Collection methods added in Java 9
+ Remove uses of deprecated Class.newInstance() method
+ Drop artifact resolution from JAVA_HOME
+ Update to latest Maven plugin versions
+ Update compiler source/target to JDK 11
+ Update Eclipse project settings
+ Make xmvn-subst honor settings for ignoring duplicate metadata
+ Allow removing plugins during model validation
+ Prefer namespaced metadata when duplicates are found
- Removed patches:
* xmvn-gradle_4_4_1.patch
* 0001-Fix-resolution-of-aliases-registered-by-add_maven_de.patch
+ Patches the inexisting xmvn-connector-gradle module
* 0001-Prefer-namespaced-metadata-when-duplicates-are-found.patch
* 0002-Make-xmvn-subst-honor-settings-for-ignoring-duplicat.patch
* 0003-Fix-requires-generation-for-self-depending-packages.patch
+ Integrated upstream
- Added patches:
* 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
* 0002-module-path-not-allowed-with-release-8.patch
+ make Xmvn Javadoc Mojo respect release and source arguments
* 0001-Simple-implementation-of-toolchains-https-github.com.patch
+ consider toolchains if specifies in Xmvn Javadoc Mojo
* 0001-Restore-possibility-to-build-with-Java-8.patch
* 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
* 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
* 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
+ different fixes to be able to build with JDK8
-------------------------------------------------------------------
Thu Nov 21 14:21:16 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 3.1.0
- Removed patches:
* 0001-Fix-installer-plugin-loading.patch
* 0001-Port-to-Gradle-4.2.patch
* 0001-Port-to-Gradle-4.3.1.patch
* 0001-Support-setting-Xdoclint-none-in-m-javadoc-p-3.0.0.patch
* 0001-Fix-configuration-of-aliased-plugins.patch
* 0001-Don-t-use-JAXB-for-converting-bytes-to-hex-string.patch
* 0001-Use-apache-commons-compress-for-manifest-injection-a.patch
* 0001-port-to-gradle-4.4.1.patch
* 0001-Replace-JAXB-parser.patch
+ Integrated in this version
-------------------------------------------------------------------
Wed Mar 27 06:28:35 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of xmvn-mojo 3.0.0

130
xmvn-mojo.spec Normal file
View File

@ -0,0 +1,130 @@
#
# spec file for package xmvn-mojo
#
# Copyright (c) 2024 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 parent xmvn
%global subname mojo
Name: %{parent}-%{subname}
Version: 4.2.0
Release: 0
Summary: XMvn MOJO
License: Apache-2.0
Group: Development/Tools/Building
URL: https://fedora-java.github.io/xmvn/
Source0: https://github.com/fedora-java/%{parent}/releases/download/%{version}/%{parent}-%{version}.tar.xz
Patch0: UUID.patch
Patch1: 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch
BuildRequires: %{parent}-api = %{version}
BuildRequires: %{parent}-core = %{version}
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: xmvn
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
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)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-util)
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-plugin-api)
BuildRequires: mvn(org.ow2.asm:asm)
#!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
BuildArch: noarch
%description
This package provides XMvn MOJO, which is a Maven plugin that consists
of several MOJOs. Some goals of these MOJOs are intended to be
attached to default Maven lifecycle when building packages, others can
be called directly from Maven command line.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package provides %{summary}.
%prep
%setup -q -n %{parent}-%{version}
%autopatch -p1
# Resolver IT won't work either - it tries to execute JAR file, which
# relies on Class-Path in manifest, which is forbidden in Fedora...
find -name ResolverIntegrationTest.java -delete
%pom_remove_plugin -r :maven-site-plugin
%{mvn_package} ":xmvn{,-it}" __noinstall
# Upstream code quality checks, not relevant when building RPMs
%pom_remove_plugin -r :apache-rat-plugin
%pom_remove_plugin -r :maven-checkstyle-plugin
%pom_remove_plugin -r :jacoco-maven-plugin
# FIXME pom macros don't seem to support submodules in profile
%pom_remove_plugin :jacoco-maven-plugin xmvn-it
# remove dependency plugin maven-binaries execution
# we provide apache-maven by symlink
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
# Don't put Class-Path attributes in manifests
%pom_remove_plugin :maven-jar-plugin xmvn-tools
# Remove all dependencies with scope test, since a raw xmvn does not hide them
%pom_remove_dep -r :::test:
pushd %{name}
%{mvn_file} :{*} %{parent}/@1
popd
%build
pushd %{name}
xmvn \
--batch-mode --offline \
-Dmaven.test.skip=true -Dsource=8 \
package org.apache.maven.plugins:maven-javadoc-plugin:aggregate
%{mvn_artifact} pom.xml target/%{name}-%{version}.jar
popd
%install
pushd %{name}
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
popd
%files -f %{name}/.mfiles
%license LICENSE NOTICE
%doc AUTHORS README.md
%files javadoc -f %{name}/.mfiles-javadoc
%license LICENSE NOTICE
%changelog

179
xmvn-parent.changes Normal file
View File

@ -0,0 +1,179 @@
-------------------------------------------------------------------
Tue Jan 30 09:25:00 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* UUID.patch
+ sync with the version in our official upstream pull request
-------------------------------------------------------------------
Wed Sep 13 16:55:35 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch
+ Remove generated temporary file from the tree after use, make
thus the generated javadoc more reproducible
-------------------------------------------------------------------
Wed Aug 2 09:46:49 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* UUID.patch
+ try to assure unique UUID for each of the split packages.
-------------------------------------------------------------------
Mon Jul 24 19:21:09 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* UUID.patch
+ avoid generating random UUIDs, which makes reproducible build
impossible (bsc#1162112)
-------------------------------------------------------------------
Wed May 3 09:26:56 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.2.0
* Changes:
+ Make XMvn Resolver log to XMvn Logger
+ Make XMvn Subst log to XMvn Logger
+ Depend on junit-jupiter-api instead of junit-jupiter
+ Suppress deprecation warnings in MavenExtensionTest
+ Remove XMvn Connector dependency on Plexus Utils
+ Remove XMvn MOJO dependency on Plexus Utils
+ Port XMvn MOJO from Xpp3Dom to StAX
+ Update Maven to version 3.9.1
+ Don't pass duplicate --patch-module to javadoc
+ Make Javadoc MOJO respect ignoreJPMS configuration flag
+ Propagate javadoc output througt Logger
+ Remove dependency on Plexus Classworlds
+ Remove unneeded managed dependency on maven-invoker
+ Use ServiceLocator to find Logger
+ Use parametrized logging feature
+ Use XMvn Logger instead of Plexus Logger
+ Get rid of Slf4jLoggerAdapter
+ Drop support for Gossip logger
+ Move XMvn Logger to API module
+ Ignore JPMS when all modules are automatic
+ Refactor Javadoc MOJO
+ Make Javadoc not fail when no sources are found
+ Add an integration test for javadoc generation with
module-info.java but no sources
+ Add an integration test for javadoc generation with
Automatic-Module-Name
+ Make Javadoc MOJO work in case one of JPMS modules has no
sources
+ Prioritize certain XMvn components over Maven components
+ Port XMvn MOJO to JSR-330
+ Refactor XMvnMojoExecutionConfigurator
+ Make builddep MOJO compatible with Maven 4
+ Port to JSR-330
+ Get rid of ModelProcessor
+ Refactor XMvnModelValidator
+ Refactor XMvnToolchainManager
+ Convert lambda to method reference
+ Improve Javadoc MOJO JPMS support
+ Add a test case for JPMS javadoc generation with remote
dependencies
+ Add a test case for JPMS multimodule javadoc generation
+ Exclude src/test/resources-filtered/** from RAT
+ Fix scope of xmvn-mojo dependency on plexus-utils
+ --module-path not allowed with release=8
+ Mimic maven-javadoc-plugin for -source and --release
+ testJavadocJPMS needs a modular java
+ Let modello generate source 8
+ Add a jdk9+ profile to assure that we are jdk8 compatible
+ Revert "Use new Collection methods added in Java 9"
+ Revert "Update compiler source/target to JDK 11"
+ Restore possibility to build with Java 8
+ Simple implementation of toolchains
https://github.com/fedora-java/xmvn/issues/142
+ Port to Modello 2.0.0
- Removed patches
* 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
* 0001-Port-to-Maven-3.8.5.patch
* 0001-Restore-possibility-to-build-with-Java-8.patch
* 0001-Simple-implementation-of-toolchains-https-github.com.patch
* 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
* 0002-module-path-not-allowed-with-release-8.patch
* 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
* 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
+ Integrated upstream in this version
-------------------------------------------------------------------
Mon May 16 15:56:00 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0001-Port-to-Maven-3.8.5.patch
+ Allow buiding against unpatched maven 3.8.5
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
* Changes:
+ Bump codecov/codecov-action from 2.0.1 to 2.0.2
+ Bump codecov/codecov-action from 1 to 2.0.1
+ Bump commons-compress from 1.20 to 1.21 in /xmvn-parent
+ Change logic for JPMS detection by Javadoc MOJO
+ Fix Javadoc generation for non-JPMS project with JDK 11
+ Remove superflous JARs from assembly
+ Create a backup file when injecting Manifest
+ Attach site artifacts only in site lifecycle
+ Rename xmvn-connector-aether to xmvn-connector
+ Use try-with-resources to avoid resource leaks
+ Remove unused AtomicFileCounter class
+ Update Eclipse project settings
+ Add separate build profile for code quality tools
+ Remove prerequisites on Maven version
+ Drop bisect tool
+ Move release plugins to pluginManagement
+ Move prerequisites on Maven version to xmvn-mojo
+ Fix javadoc warning
+ Bump junit from 4.12 to 4.13.1 in /xmvn-it/src/test/resources/testBisect
+ Bump slf4jVersion from 1.8.0-beta4 to 2.0.0-alpha2 in /xmvn-parent
+ Compile everything whith --release 11
+ Fix assembly building with Maven Checkstyle Plugin 3.1.0+
+ Update to latest Checkstyle
+ Format code to conform to Checkstyle 8.44
+ Untabify Maven build files
+ Update Maven plugin versions
+ Drop Ivy
+ Drop Gradle
+ Add support for compiler release setting
+ Fix Javadoc generation for modular projects
+ Add JPMS check to Javadoc MOJO
+ Add missing license headers
+ Disable I/O write test if the build is running as root
+ Switch to SHA-256 in CacheManager
+ Update dependency xmlunit.assertj to xmlunit.assertj3
+ Fixes #56 - Honour source parameter in javadoc mojo
+ Implement XMvn toolchain manager
+ Fix requires generation for self-depending packages
+ Remove redundant parentheses
+ Remove redudnant use of this
+ Relay on implicit access modifiers of interfaces
+ Rely on implicit boxing
+ Make use of diamond operator
+ [test] Use use lambda expressions for creation of DeploymentResult
+ Remove use of deprecated StringUtils methods
+ [test] Port tests to JUnit 5
+ Update to latest dependencies
+ [test] Add missing assertions about XML output
+ Use new Collection methods added in Java 9
+ Remove uses of deprecated Class.newInstance() method
+ Drop artifact resolution from JAVA_HOME
+ Update to latest Maven plugin versions
+ Update compiler source/target to JDK 11
+ Update Eclipse project settings
+ Make xmvn-subst honor settings for ignoring duplicate metadata
+ Allow removing plugins during model validation
+ Prefer namespaced metadata when duplicates are found
-------------------------------------------------------------------
Thu Nov 21 14:19:39 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 3.1.0
-------------------------------------------------------------------
Wed Apr 3 09:38:08 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of xmvn-parent pom version 3.0.0

69
xmvn-parent.spec Normal file
View File

@ -0,0 +1,69 @@
#
# spec file for package xmvn-parent
#
# Copyright (c) 2024 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 parent xmvn
%global subname parent
Name: %{parent}-%{subname}
Version: 4.2.0
Release: 0
Summary: XMvn Parent POM
License: Apache-2.0
Group: Development/Tools/Building
URL: https://fedora-java.github.io/xmvn/
Source0: https://github.com/fedora-java/%{parent}/releases/download/%{version}/%{parent}-%{version}.tar.xz
Patch0: UUID.patch
Patch1: 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch
BuildRequires: javapackages-local
BuildRequires: xmvn-resolve
BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin)
Provides: %{name}-pom
Obsoletes: %{name}-pom
BuildArch: noarch
%description
This package provides XMvn parent POM.
%prep
%setup -q -n %{parent}-%{version}
%autopatch -p1
%pom_remove_plugin -r :maven-site-plugin
# Upstream code quality checks, not relevant when building RPMs
%pom_remove_plugin -r :apache-rat-plugin
%pom_remove_plugin -r :maven-checkstyle-plugin
%pom_remove_plugin -r :jacoco-maven-plugin
# remove dependency plugin maven-binaries execution
# we provide apache-maven by symlink
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
%build
%install
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{parent}
install -pm 0644 xmvn-parent/pom.xml %{buildroot}%{_mavenpomdir}/%{parent}/%{name}.pom
%add_maven_depmap %{parent}/%{name}.pom
%files -f .mfiles
%license LICENSE NOTICE
%doc AUTHORS README.md
%changelog

231
xmvn-tools.changes Normal file
View File

@ -0,0 +1,231 @@
-------------------------------------------------------------------
Mon Feb 19 13:09:53 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Modify the xmvn-install script to work with new
apache-commons-compress
-------------------------------------------------------------------
Tue Jan 30 09:25:00 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* UUID.patch
+ sync with the version in our official upstream pull request
-------------------------------------------------------------------
Wed Sep 13 16:55:35 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch
+ Remove generated temporary file from the tree after use, make
thus the generated javadoc more reproducible
-------------------------------------------------------------------
Wed Aug 2 09:46:49 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* UUID.patch
+ try to assure unique UUID for each of the split packages.
-------------------------------------------------------------------
Mon Jul 24 19:21:09 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* UUID.patch
+ avoid generating random UUIDs, which makes reproducible build
impossible (bsc#1162112)
-------------------------------------------------------------------
Wed May 3 09:26:56 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.2.0
* Changes:
+ Make XMvn Resolver log to XMvn Logger
+ Make XMvn Subst log to XMvn Logger
+ Depend on junit-jupiter-api instead of junit-jupiter
+ Suppress deprecation warnings in MavenExtensionTest
+ Remove XMvn Connector dependency on Plexus Utils
+ Remove XMvn MOJO dependency on Plexus Utils
+ Port XMvn MOJO from Xpp3Dom to StAX
+ Update Maven to version 3.9.1
+ Don't pass duplicate --patch-module to javadoc
+ Make Javadoc MOJO respect ignoreJPMS configuration flag
+ Propagate javadoc output througt Logger
+ Remove dependency on Plexus Classworlds
+ Remove unneeded managed dependency on maven-invoker
+ Use ServiceLocator to find Logger
+ Use parametrized logging feature
+ Use XMvn Logger instead of Plexus Logger
+ Get rid of Slf4jLoggerAdapter
+ Drop support for Gossip logger
+ Move XMvn Logger to API module
+ Ignore JPMS when all modules are automatic
+ Refactor Javadoc MOJO
+ Make Javadoc not fail when no sources are found
+ Add an integration test for javadoc generation with
module-info.java but no sources
+ Add an integration test for javadoc generation with
Automatic-Module-Name
+ Make Javadoc MOJO work in case one of JPMS modules has no
sources
+ Prioritize certain XMvn components over Maven components
+ Port XMvn MOJO to JSR-330
+ Refactor XMvnMojoExecutionConfigurator
+ Make builddep MOJO compatible with Maven 4
+ Port to JSR-330
+ Get rid of ModelProcessor
+ Refactor XMvnModelValidator
+ Refactor XMvnToolchainManager
+ Convert lambda to method reference
+ Improve Javadoc MOJO JPMS support
+ Add a test case for JPMS javadoc generation with remote
dependencies
+ Add a test case for JPMS multimodule javadoc generation
+ Exclude src/test/resources-filtered/** from RAT
+ Fix scope of xmvn-mojo dependency on plexus-utils
+ --module-path not allowed with release=8
+ Mimic maven-javadoc-plugin for -source and --release
+ testJavadocJPMS needs a modular java
+ Let modello generate source 8
+ Add a jdk9+ profile to assure that we are jdk8 compatible
+ Revert "Use new Collection methods added in Java 9"
+ Revert "Update compiler source/target to JDK 11"
+ Restore possibility to build with Java 8
+ Simple implementation of toolchains
https://github.com/fedora-java/xmvn/issues/142
+ Port to Modello 2.0.0
- Removed patches
* 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
* 0001-Port-to-Maven-3.8.5.patch
* 0001-Restore-possibility-to-build-with-Java-8.patch
* 0001-Simple-implementation-of-toolchains-https-github.com.patch
* 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
* 0002-module-path-not-allowed-with-release-8.patch
* 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
* 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
+ Integrated upstream in this version
-------------------------------------------------------------------
Mon May 16 15:56:00 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0001-Port-to-Maven-3.8.5.patch
+ Allow buiding against unpatched maven 3.8.5
-------------------------------------------------------------------
Fri May 13 08:59:24 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Fix build with modello 2.0.0
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
* Changes:
+ Bump codecov/codecov-action from 2.0.1 to 2.0.2
+ Bump codecov/codecov-action from 1 to 2.0.1
+ Bump commons-compress from 1.20 to 1.21 in /xmvn-parent
+ Change logic for JPMS detection by Javadoc MOJO
+ Fix Javadoc generation for non-JPMS project with JDK 11
+ Remove superflous JARs from assembly
+ Create a backup file when injecting Manifest
+ Attach site artifacts only in site lifecycle
+ Rename xmvn-connector-aether to xmvn-connector
+ Use try-with-resources to avoid resource leaks
+ Remove unused AtomicFileCounter class
+ Update Eclipse project settings
+ Add separate build profile for code quality tools
+ Remove prerequisites on Maven version
+ Drop bisect tool
+ Move release plugins to pluginManagement
+ Move prerequisites on Maven version to xmvn-mojo
+ Fix javadoc warning
+ Bump junit from 4.12 to 4.13.1 in /xmvn-it/src/test/resources/testBisect
+ Bump slf4jVersion from 1.8.0-beta4 to 2.0.0-alpha2 in /xmvn-parent
+ Compile everything whith --release 11
+ Fix assembly building with Maven Checkstyle Plugin 3.1.0+
+ Update to latest Checkstyle
+ Format code to conform to Checkstyle 8.44
+ Untabify Maven build files
+ Update Maven plugin versions
+ Drop Ivy
+ Drop Gradle
+ Add support for compiler release setting
+ Fix Javadoc generation for modular projects
+ Add JPMS check to Javadoc MOJO
+ Add missing license headers
+ Disable I/O write test if the build is running as root
+ Switch to SHA-256 in CacheManager
+ Update dependency xmlunit.assertj to xmlunit.assertj3
+ Fixes #56 - Honour source parameter in javadoc mojo
+ Implement XMvn toolchain manager
+ Fix requires generation for self-depending packages
+ Remove redundant parentheses
+ Remove redudnant use of this
+ Relay on implicit access modifiers of interfaces
+ Rely on implicit boxing
+ Make use of diamond operator
+ [test] Use use lambda expressions for creation of DeploymentResult
+ Remove use of deprecated StringUtils methods
+ [test] Port tests to JUnit 5
+ Update to latest dependencies
+ [test] Add missing assertions about XML output
+ Use new Collection methods added in Java 9
+ Remove uses of deprecated Class.newInstance() method
+ Drop artifact resolution from JAVA_HOME
+ Update to latest Maven plugin versions
+ Update compiler source/target to JDK 11
+ Update Eclipse project settings
+ Make xmvn-subst honor settings for ignoring duplicate metadata
+ Allow removing plugins during model validation
+ Prefer namespaced metadata when duplicates are found
- Removed patches:
* xmvn-gradle_4_4_1.patch
* 0001-Fix-resolution-of-aliases-registered-by-add_maven_de.patch
+ Patches the inexisting xmvn-connector-gradle module
* 0001-Prefer-namespaced-metadata-when-duplicates-are-found.patch
* 0002-Make-xmvn-subst-honor-settings-for-ignoring-duplicat.patch
* 0003-Fix-requires-generation-for-self-depending-packages.patch
+ Integrated upstream
- Added patches:
* 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
* 0002-module-path-not-allowed-with-release-8.patch
+ make Xmvn Javadoc Mojo respect release and source arguments
* 0001-Simple-implementation-of-toolchains-https-github.com.patch
+ consider toolchains if specifies in Xmvn Javadoc Mojo
* 0001-Restore-possibility-to-build-with-Java-8.patch
* 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
* 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
* 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
+ different fixes to be able to build with JDK8
-------------------------------------------------------------------
Thu Nov 21 14:13:46 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 3.1.0
* Requires maven-invoker >= 3.0
- Removed patches:
* 0001-Fix-installer-plugin-loading.patch
* 0001-Port-to-Gradle-4.2.patch
* 0001-Port-to-Gradle-4.3.1.patch
* 0001-Support-setting-Xdoclint-none-in-m-javadoc-p-3.0.0.patch
* 0001-Fix-configuration-of-aliased-plugins.patch
* 0001-Don-t-use-JAXB-for-converting-bytes-to-hex-string.patch
* 0001-Use-apache-commons-compress-for-manifest-injection-a.patch
* 0001-port-to-gradle-4.4.1.patch
* 0001-Replace-JAXB-parser.patch
+ Integrated in this version
- Added patches:
* 0001-Prefer-namespaced-metadata-when-duplicates-are-found.patch
* 0002-Make-xmvn-subst-honor-settings-for-ignoring-duplicat.patch
+ upstream fixes to ignore duplicate metadata
* 0003-Fix-requires-generation-for-self-depending-packages.patch
+ Downstream bug-fix with generation of metadata for
self-depending packages
-------------------------------------------------------------------
Fri Mar 15 16:33:40 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of xmvn-tools 3.0.0 and their dependencies from
xmvn project
- Generate and customize ant build files in order to be able to
build without maven

242
xmvn-tools.spec Normal file
View File

@ -0,0 +1,242 @@
#
# spec file for package xmvn-tools
#
# Copyright (c) 2024 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 parent xmvn
%global subname tools
Name: %{parent}-%{subname}
Version: 4.2.0
Release: 0
Summary: Local Extensions for Apache Maven
License: Apache-2.0
Group: Development/Tools/Building
URL: https://fedora-java.github.io/xmvn/
Source0: https://github.com/fedora-java/xmvn/releases/download/%{version}/%{parent}-%{version}.tar.xz
Source1: %{parent}-build.tar.xz
Patch0: UUID.patch
Patch1: 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch
BuildRequires: ant
BuildRequires: apache-commons-compress
BuildRequires: apache-commons-io
BuildRequires: atinject
BuildRequires: beust-jcommander >= 1.82
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: modello >= 2.0.0
BuildRequires: objectweb-asm
BuildRequires: sisu-inject
BuildRequires: sisu-plexus
BuildRequires: slf4j
BuildArch: noarch
%description
This package provides extensions for Apache Maven that can be used to
manage system artifact repository and use it to resolve Maven
artifacts in offline mode, as well as Maven plugins to help with
creating RPM packages containing Maven artifacts.
%package -n %{parent}-api
Summary: XMvn API
Group: Development/Tools/Building
%description -n %{parent}-api
This package provides XMvn API module which contains public interface
for functionality implemented by XMvn Core.
%package -n %{parent}-core
Summary: XMvn Core
Group: Development/Tools/Building
%description -n %{parent}-core
This package provides XMvn Core module, which implements the essential
functionality of XMvn such as resolution of artifacts from system
repository.
%package -n %{parent}-resolve
Summary: XMvn Resolver
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Group: Development/Tools/Building
Requires: %{parent}-api = %{version}
Requires: %{parent}-core = %{version}
Requires: beust-jcommander >= 1.82
Requires: javapackages-tools
%description -n %{parent}-resolve
This package provides XMvn Resolver, which is a very simple
command-line tool to resolve Maven artifacts from system repositories.
Basically it's just an interface to artifact resolution mechanism
implemented by XMvn Core. The primary intended use case of XMvn
Resolver is debugging local artifact repositories.
%package -n %{parent}-subst
Summary: XMvn Subst
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Group: Development/Tools/Building
Requires: %{parent}-api = %{version}
Requires: %{parent}-core = %{version}
Requires: beust-jcommander
Requires: javapackages-tools
%description -n %{parent}-subst
This package provides XMvn Subst, which is a tool that can substitute
Maven artifact files with symbolic links to corresponding files in
artifact repository.
%package -n %{parent}-install
Summary: XMvn Install
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Group: Development/Tools/Building
Requires: %{parent}-api = %{version}
Requires: %{parent}-core = %{version}
Requires: apache-commons-compress
Requires: apache-commons-io
Requires: beust-jcommander
Requires: javapackages-tools
Requires: objectweb-asm
Requires: slf4j
%description -n %{parent}-install
This package provides XMvn Install, which is a command-line interface
to XMvn installer. The installer reads reactor metadata and performs
artifact installation according to specified configuration.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
Obsoletes: javadoc
%description javadoc
This package provides %{summary}.
%prep
%setup -q -n %{parent}-%{version} -a1
%autopatch -p1
# Resolver IT won't work either - it tries to execute JAR file, which
# relies on Class-Path in manifest, which is forbidden in Fedora...
find -name ResolverIntegrationTest.java -delete
%pom_remove_plugin -r :maven-site-plugin
# Upstream code quality checks, not relevant when building RPMs
%pom_remove_plugin -r :apache-rat-plugin
%pom_remove_plugin -r :maven-checkstyle-plugin
%pom_remove_plugin -r :jacoco-maven-plugin
# FIXME pom macros don't seem to support submodules in profile
%pom_remove_plugin :jacoco-maven-plugin xmvn-it
# remove dependency plugin maven-binaries execution
# we provide apache-maven by symlink
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
# Don't put Class-Path attributes in manifests
%pom_remove_plugin :maven-jar-plugin xmvn-tools
# This test depends on OpenJDK directory layout that changed since version 9
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
rm -f xmvn-core/src/test/java/org/fedoraproject/xmvn/resolver/JavaHomeResolverTest.java
%endif
for i in api core; do
%pom_xpath_inject "pom:project" "
<groupId>org.fedoraproject.xmvn</groupId>
<version>%{version}</version>" %{parent}-${i}
%pom_remove_parent %{parent}-${i}
done
for i in install resolve subst; do
%pom_xpath_inject "pom:project" "
<groupId>org.fedoraproject.xmvn</groupId>
<version>%{version}</version>" %{parent}-tools/%{parent}-${i}
%pom_remove_parent %{parent}-tools/%{parent}-${i}
done
%build
mkdir -p lib
build-jar-repository -s lib \
atinject \
beust-jcommander \
commons-compress \
objectweb-asm/asm \
org.eclipse.sisu.inject \
org.eclipse.sisu.plexus \
slf4j/api
%{ant} -Dtest.skip=true package javadoc
%install
# jars
install -dm 0755 %{buildroot}%{_javadir}/%{parent}
for i in api core; do
install -pm 0644 %{parent}-${i}/target/%{parent}-${i}-%{version}.jar %{buildroot}%{_javadir}/%{parent}/%{parent}-${i}.jar
done
for i in install resolve subst; do
install -pm 0644 %{parent}-tools/%{parent}-${i}/target/%{parent}-${i}-%{version}.jar %{buildroot}%{_javadir}/%{parent}/%{parent}-${i}.jar
done
# poms
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{parent}
for i in api core; do
install -pm 0644 %{parent}-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{parent}/%{parent}-${i}.pom
%add_maven_depmap %{parent}/%{parent}-${i}.pom %{parent}/%{parent}-${i}.jar -f ${i}
done
for i in install resolve subst; do
install -pm 0644 %{parent}-tools/%{parent}-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{parent}/%{parent}-${i}.pom
%add_maven_depmap %{parent}/%{parent}-${i}.pom %{parent}/%{parent}-${i}.jar -f ${i}
done
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{parent}
for i in api core; do
install -dm 0755 %{buildroot}%{_javadocdir}/%{parent}/${i}
cp -pr %{parent}-${i}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{parent}/${i}/
done
for i in install resolve subst; do
install -dm 0755 %{buildroot}%{_javadocdir}/%{parent}/${i}
cp -pr %{parent}-tools/%{parent}-${i}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{parent}/${i}/
done
%fdupes -s %{buildroot}%{_javadocdir}
# helper scripts
%jpackage_script org.fedoraproject.xmvn.tools.install.cli.InstallerCli "" "" %{parent}/%{parent}-install:%{parent}/%{parent}-api:%{parent}/%{parent}-core:beust-jcommander:slf4j/api:slf4j/simple:objectweb-asm/asm:commons-compress:commons-io %{parent}-install
%jpackage_script org.fedoraproject.xmvn.tools.resolve.ResolverCli "" "" %{parent}/%{parent}-resolve:%{parent}/%{parent}-api:%{parent}/%{parent}-core:beust-jcommander %{parent}-resolve
%jpackage_script org.fedoraproject.xmvn.tools.subst.SubstCli "" "" %{parent}/%{parent}-subst:%{parent}/%{parent}-api:%{parent}/%{parent}-core:beust-jcommander %{parent}-subst
%files -n %{parent}-core -f .mfiles-core
%files -n %{parent}-api -f .mfiles-api
%license LICENSE NOTICE
%doc AUTHORS README.md
%files -n %{parent}-resolve -f .mfiles-resolve
%{_bindir}/%{parent}-resolve
%files -n %{parent}-subst -f .mfiles-subst
%{_bindir}/%{parent}-subst
%files -n %{parent}-install -f .mfiles-install
%{_bindir}/%{parent}-install
%files javadoc
%license LICENSE NOTICE
%{_javadocdir}/%{parent}
%changelog

156
xmvn.changes Normal file
View File

@ -0,0 +1,156 @@
-------------------------------------------------------------------
Thu May 4 17:05:12 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Add _multibuild to define 2nd spec file as additional flavor.
Eliminates the need for source package links in OBS.
-------------------------------------------------------------------
Wed May 3 09:26:56 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.2.0
* Changes:
+ Make XMvn Resolver log to XMvn Logger
+ Make XMvn Subst log to XMvn Logger
+ Depend on junit-jupiter-api instead of junit-jupiter
+ Suppress deprecation warnings in MavenExtensionTest
+ Remove XMvn Connector dependency on Plexus Utils
+ Remove XMvn MOJO dependency on Plexus Utils
+ Port XMvn MOJO from Xpp3Dom to StAX
+ Update Maven to version 3.9.1
+ Don't pass duplicate --patch-module to javadoc
+ Make Javadoc MOJO respect ignoreJPMS configuration flag
+ Propagate javadoc output througt Logger
+ Remove dependency on Plexus Classworlds
+ Remove unneeded managed dependency on maven-invoker
+ Use ServiceLocator to find Logger
+ Use parametrized logging feature
+ Use XMvn Logger instead of Plexus Logger
+ Get rid of Slf4jLoggerAdapter
+ Drop support for Gossip logger
+ Move XMvn Logger to API module
+ Ignore JPMS when all modules are automatic
+ Refactor Javadoc MOJO
+ Make Javadoc not fail when no sources are found
+ Add an integration test for javadoc generation with
module-info.java but no sources
+ Add an integration test for javadoc generation with
Automatic-Module-Name
+ Make Javadoc MOJO work in case one of JPMS modules has no
sources
+ Prioritize certain XMvn components over Maven components
+ Port XMvn MOJO to JSR-330
+ Refactor XMvnMojoExecutionConfigurator
+ Make builddep MOJO compatible with Maven 4
+ Port to JSR-330
+ Get rid of ModelProcessor
+ Refactor XMvnModelValidator
+ Refactor XMvnToolchainManager
+ Convert lambda to method reference
+ Improve Javadoc MOJO JPMS support
+ Add a test case for JPMS javadoc generation with remote
dependencies
+ Add a test case for JPMS multimodule javadoc generation
+ Exclude src/test/resources-filtered/** from RAT
+ Fix scope of xmvn-mojo dependency on plexus-utils
+ --module-path not allowed with release=8
+ Mimic maven-javadoc-plugin for -source and --release
+ testJavadocJPMS needs a modular java
+ Let modello generate source 8
+ Add a jdk9+ profile to assure that we are jdk8 compatible
+ Revert "Use new Collection methods added in Java 9"
+ Revert "Update compiler source/target to JDK 11"
+ Restore possibility to build with Java 8
+ Simple implementation of toolchains
https://github.com/fedora-java/xmvn/issues/142
+ Port to Modello 2.0.0
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
* Changes:
+ Bump codecov/codecov-action from 2.0.1 to 2.0.2
+ Bump codecov/codecov-action from 1 to 2.0.1
+ Bump commons-compress from 1.20 to 1.21 in /xmvn-parent
+ Change logic for JPMS detection by Javadoc MOJO
+ Fix Javadoc generation for non-JPMS project with JDK 11
+ Remove superflous JARs from assembly
+ Create a backup file when injecting Manifest
+ Attach site artifacts only in site lifecycle
+ Rename xmvn-connector-aether to xmvn-connector
+ Use try-with-resources to avoid resource leaks
+ Remove unused AtomicFileCounter class
+ Update Eclipse project settings
+ Add separate build profile for code quality tools
+ Remove prerequisites on Maven version
+ Drop bisect tool
+ Move release plugins to pluginManagement
+ Move prerequisites on Maven version to xmvn-mojo
+ Fix javadoc warning
+ Bump junit from 4.12 to 4.13.1 in /xmvn-it/src/test/resources/testBisect
+ Bump slf4jVersion from 1.8.0-beta4 to 2.0.0-alpha2 in /xmvn-parent
+ Compile everything whith --release 11
+ Fix assembly building with Maven Checkstyle Plugin 3.1.0+
+ Update to latest Checkstyle
+ Format code to conform to Checkstyle 8.44
+ Untabify Maven build files
+ Update Maven plugin versions
+ Drop Ivy
+ Drop Gradle
+ Add support for compiler release setting
+ Fix Javadoc generation for modular projects
+ Add JPMS check to Javadoc MOJO
+ Add missing license headers
+ Disable I/O write test if the build is running as root
+ Switch to SHA-256 in CacheManager
+ Update dependency xmlunit.assertj to xmlunit.assertj3
+ Fixes #56 - Honour source parameter in javadoc mojo
+ Implement XMvn toolchain manager
+ Fix requires generation for self-depending packages
+ Remove redundant parentheses
+ Remove redudnant use of this
+ Relay on implicit access modifiers of interfaces
+ Rely on implicit boxing
+ Make use of diamond operator
+ [test] Use use lambda expressions for creation of DeploymentResult
+ Remove use of deprecated StringUtils methods
+ [test] Port tests to JUnit 5
+ Update to latest dependencies
+ [test] Add missing assertions about XML output
+ Use new Collection methods added in Java 9
+ Remove uses of deprecated Class.newInstance() method
+ Drop artifact resolution from JAVA_HOME
+ Update to latest Maven plugin versions
+ Update compiler source/target to JDK 11
+ Update Eclipse project settings
+ Make xmvn-subst honor settings for ignoring duplicate metadata
+ Allow removing plugins during model validation
+ Prefer namespaced metadata when duplicates are found
-------------------------------------------------------------------
Fri Oct 22 09:15:52 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Specify maven_home manually since the diversity of alternatives
in different distro versions makes it tedious to detect this
automatically
-------------------------------------------------------------------
Thu May 13 10:07:24 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Require the maven-libs we built against in order to avoid hanging
symlinks
-------------------------------------------------------------------
Mon May 11 08:02:12 UTC 2020 - Fridrich Strba <fstrba@suse.com>
- Do not use %%pretrans
-------------------------------------------------------------------
Thu Nov 21 14:12:45 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 3.1.0
-------------------------------------------------------------------
Wed Mar 27 06:26:59 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of xmvn 3.0.0

119
xmvn.spec Normal file
View File

@ -0,0 +1,119 @@
#
# spec file for package xmvn
#
# Copyright (c) 2024 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/
#
Name: xmvn
Version: 4.2.0
Release: 0
Summary: Local Extensions for Apache Maven
License: Apache-2.0
Group: Development/Tools/Building
URL: https://fedora-java.github.io/xmvn/
BuildRequires: %{name}-api = %{version}
BuildRequires: %{name}-connector = %{version}
BuildRequires: %{name}-core = %{version}
BuildRequires: %{name}-subst
BuildRequires: javapackages-tools
BuildRequires: maven
BuildRequires: maven-lib
Requires: %{name}-minimal = %{version}-%{release}
%description
This package provides extensions for Apache Maven that can be used to
manage system artifact repository and use it to resolve Maven
artifacts in offline mode, as well as Maven plugins to help with
creating RPM packages containing Maven artifacts.
%package minimal
Summary: Dependency-reduced version of XMvn
Group: Development/Tools/Building
Requires: %{name}-api = %{version}
Requires: %{name}-connector = %{version}
Requires: %{name}-core = %{version}
%requires_eq maven-lib
%description minimal
This package provides minimal version of XMvn, incapable of using
remote repositories.
%prep
%build
%install
# Please, keep in sync with maven package, since the use
# of libalternatives in some distro versions makes it
# more tedious to detect automatically
maven_home=%{_datadir}/maven
install -d -m 755 %{buildroot}%{_datadir}/%{name}
cp -aL ${maven_home}/* %{buildroot}%{_datadir}/%{name}/
for i in api core connector; do
ln -s $(build-classpath %{name}/%{name}-${i}) %{buildroot}%{_datadir}/%{name}/lib/ext/
done
# Irrelevant Maven launcher scripts
rm -f %{buildroot}%{_datadir}/%{name}/bin/*
for cmd in mvn mvnDebug; do
cat <<EOF >%{buildroot}%{_datadir}/%{name}/bin/$cmd
#!/bin/sh -e
export _FEDORA_MAVEN_HOME="%{_datadir}/%{name}"
exec ${maven_home}/bin/$cmd "\${@}"
EOF
chmod 755 %{buildroot}%{_datadir}/%{name}/bin/$cmd
done
# possibly recreate symlinks that can be automated with xmvn-subst
%{name}-subst -s -R %{buildroot} %{buildroot}%{_datadir}/%{name}/
# /usr/bin/xmvn
install -dm 0755 %{buildroot}%{_bindir}
ln -sf %{_datadir}/%{name}/bin/mvn %{buildroot}%{_bindir}/%{name}
# mvn-local symlink
ln -s %{name} %{buildroot}%{_bindir}/mvn-local
# make sure our conf is identical to maven so yum won't freak out
install -d -m 755 %{buildroot}%{_datadir}/%{name}/conf/
cp -P ${maven_home}/conf/settings.xml %{buildroot}%{_datadir}/%{name}/conf/
cp -P ${maven_home}/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
%pre minimal
if [ -L %{_datadir}/%{name}/conf/logging ]; then
rm -f %{_datadir}/%{name}/conf/logging
fi
%files
%{_bindir}/mvn-local
%files minimal
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/bin
%dir %{_datadir}/%{name}/lib
%{_datadir}/%{name}/lib/*.jar
%{_datadir}/%{name}/lib/ext
%{_datadir}/%{name}/lib/jansi-native
%{_datadir}/%{name}/bin/m2.conf
%{_datadir}/%{name}/bin/mvn
%{_datadir}/%{name}/bin/mvnDebug
%{_datadir}/%{name}/boot
%{_datadir}/%{name}/conf
%changelog