Update to upstream version 4.1.0
This commit is contained in:
parent
19ef8f7b27
commit
bfb7404cd2
1
.gitignore
vendored
1
.gitignore
vendored
@ -56,3 +56,4 @@
|
||||
/43c7e67.tar.gz
|
||||
/3b84c99.tar.gz
|
||||
/xmvn-4.0.0.tar.xz
|
||||
/xmvn-4.1.0.tar.xz
|
||||
|
@ -1,39 +0,0 @@
|
||||
From e1f17fa910dcd18716c612070067f79cdd4fa716 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Wed, 2 Mar 2022 06:58:32 +0100
|
||||
Subject: [PATCH] Port to Modello 2.0.0
|
||||
|
||||
---
|
||||
xmvn-api/pom.xml | 2 +-
|
||||
xmvn-parent/pom.xml | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xmvn-api/pom.xml b/xmvn-api/pom.xml
|
||||
index 74b961d8..18539a4a 100644
|
||||
--- a/xmvn-api/pom.xml
|
||||
+++ b/xmvn-api/pom.xml
|
||||
@@ -38,7 +38,7 @@
|
||||
<artifactId>modello-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<version>3.2.0</version>
|
||||
- <useJava5>true</useJava5>
|
||||
+ <javaSource>11</javaSource>
|
||||
<domAsXpp3>false</domAsXpp3>
|
||||
<models>
|
||||
<model>src/main/mdo/config.mdo</model>
|
||||
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
|
||||
index 2dafffbe..a563eb7c 100644
|
||||
--- a/xmvn-parent/pom.xml
|
||||
+++ b/xmvn-parent/pom.xml
|
||||
@@ -107,7 +107,7 @@
|
||||
<junitVersion>5.7.2</junitVersion>
|
||||
<jxrPluginVersion>2.3</jxrPluginVersion>
|
||||
<mavenWagonVersion>1.0</mavenWagonVersion>
|
||||
- <modelloVersion>1.11</modelloVersion>
|
||||
+ <modelloVersion>2.0.0</modelloVersion>
|
||||
<nexusStagingPluginVersion>1.6.8</nexusStagingPluginVersion>
|
||||
<pmdPluginVersion>3.0.1</pmdPluginVersion>
|
||||
<projectInfoReportsPluginVersion>3.0.0</projectInfoReportsPluginVersion>
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,174 +0,0 @@
|
||||
From c2f74691a71509c3671d3bc612be285a511c53f1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Wed, 4 May 2022 13:26:00 +0200
|
||||
Subject: [PATCH 1/2] Mimic maven-javadoc-plugin for -source and --release
|
||||
|
||||
Consider the maven.compiler.source and maven.compiler.release
|
||||
properties. Skip module-info.java if source level is specified
|
||||
and it is < 9 or if non-modular Java is used
|
||||
---
|
||||
.../fedoraproject/xmvn/mojo/JavadocMojo.java | 38 +++++++++++++++++--
|
||||
1 file changed, 34 insertions(+), 4 deletions(-)
|
||||
|
||||
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 b2cd41fd..68d097f5 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
|
||||
@@ -84,9 +84,12 @@
|
||||
@Parameter( defaultValue = "${project.build.directory}", required = true )
|
||||
private File buildDirectory;
|
||||
|
||||
- @Parameter( property = "source" )
|
||||
+ @Parameter( property = "source", defaultValue = "${maven.compiler.source}" )
|
||||
private String source;
|
||||
|
||||
+ @Parameter( defaultValue = "${maven.compiler.release}" )
|
||||
+ private String release;
|
||||
+
|
||||
private static String quoted( Object obj )
|
||||
{
|
||||
String arg = obj.toString();
|
||||
@@ -222,8 +225,9 @@ public void execute()
|
||||
List<Path> reactorClassPath = new ArrayList<>();
|
||||
List<Path> fullClassPath = new ArrayList<>();
|
||||
populateClasspath( reactorClassPath, fullClassPath );
|
||||
+ boolean isModular = !findFiles( reactorClassPath, "module-info\\.class" ).isEmpty();
|
||||
|
||||
- if ( findFiles( reactorClassPath, "module-info\\.class" ).isEmpty() )
|
||||
+ if ( !isModular )
|
||||
{
|
||||
opts.add( "-classpath" );
|
||||
}
|
||||
@@ -244,15 +248,41 @@ public void execute()
|
||||
opts.add( quoted( docencoding ) );
|
||||
opts.add( "-doctitle" );
|
||||
opts.add( quoted( "Javadoc for package XXX" ) );
|
||||
- if ( source != null )
|
||||
+
|
||||
+ String sourceLevel = null;
|
||||
+ if ( release != null && isModular )
|
||||
+ {
|
||||
+ opts.add( "--release" );
|
||||
+ opts.add( quoted( release ) );
|
||||
+ sourceLevel = release;
|
||||
+
|
||||
+ }
|
||||
+ else if ( source != null )
|
||||
{
|
||||
opts.add( "-source" );
|
||||
opts.add( quoted( source ) );
|
||||
+ sourceLevel = source;
|
||||
+ }
|
||||
+
|
||||
+ boolean skipModuleInfo = !isModular;
|
||||
+ if ( sourceLevel != null && !skipModuleInfo )
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ float f = Float.parseFloat( sourceLevel );
|
||||
+ if ( f < 9 )
|
||||
+ skipModuleInfo = true;
|
||||
+ }
|
||||
+ catch ( Exception e )
|
||||
+ {
|
||||
+ // pass, we assume that we use modular Java
|
||||
+ }
|
||||
}
|
||||
|
||||
for ( Path file : sourceFiles )
|
||||
{
|
||||
- opts.add( quoted( file ) );
|
||||
+ if ( !skipModuleInfo || !file.endsWith( "module-info.java" ) )
|
||||
+ opts.add( quoted( file ) );
|
||||
}
|
||||
|
||||
Files.write( outputDir.resolve( "args" ), opts, StandardOpenOption.CREATE );
|
||||
|
||||
From 34ee4dad896f9f82131a090293c3a9ccaa77b729 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Sun, 8 May 2022 15:19:45 +0200
|
||||
Subject: [PATCH 2/2] --module-path not allowed with release=8
|
||||
|
||||
---
|
||||
.../fedoraproject/xmvn/mojo/JavadocMojo.java | 49 +++++++++----------
|
||||
1 file changed, 24 insertions(+), 25 deletions(-)
|
||||
|
||||
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 68d097f5..480b0f0a 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
|
||||
@@ -227,35 +227,12 @@ public void execute()
|
||||
populateClasspath( reactorClassPath, fullClassPath );
|
||||
boolean isModular = !findFiles( reactorClassPath, "module-info\\.class" ).isEmpty();
|
||||
|
||||
- if ( !isModular )
|
||||
- {
|
||||
- opts.add( "-classpath" );
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- opts.add( "--module-path" );
|
||||
- }
|
||||
- opts.add( quoted( StringUtils.join( fullClassPath.iterator(), ":" ) ) );
|
||||
- opts.add( "-encoding" );
|
||||
- opts.add( quoted( encoding ) );
|
||||
- opts.add( "-sourcepath" );
|
||||
- opts.add( quoted( StringUtils.join( sourcePaths.iterator(), ":" ) ) );
|
||||
- opts.add( "-charset" );
|
||||
- opts.add( quoted( docencoding ) );
|
||||
- opts.add( "-d" );
|
||||
- opts.add( quoted( outputDir ) );
|
||||
- opts.add( "-docencoding" );
|
||||
- opts.add( quoted( docencoding ) );
|
||||
- opts.add( "-doctitle" );
|
||||
- opts.add( quoted( "Javadoc for package XXX" ) );
|
||||
-
|
||||
String sourceLevel = null;
|
||||
- if ( release != null && isModular )
|
||||
+ if ( release != null )
|
||||
{
|
||||
opts.add( "--release" );
|
||||
opts.add( quoted( release ) );
|
||||
sourceLevel = release;
|
||||
-
|
||||
}
|
||||
else if ( source != null )
|
||||
{
|
||||
@@ -265,7 +242,7 @@ else if ( source != null )
|
||||
}
|
||||
|
||||
boolean skipModuleInfo = !isModular;
|
||||
- if ( sourceLevel != null && !skipModuleInfo )
|
||||
+ if ( sourceLevel != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -279,6 +256,28 @@ else if ( source != null )
|
||||
}
|
||||
}
|
||||
|
||||
+ if ( !isModular || skipModuleInfo )
|
||||
+ {
|
||||
+ opts.add( "-classpath" );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ opts.add( "--module-path" );
|
||||
+ }
|
||||
+ opts.add( quoted( StringUtils.join( fullClassPath.iterator(), ":" ) ) );
|
||||
+ opts.add( "-encoding" );
|
||||
+ opts.add( quoted( encoding ) );
|
||||
+ opts.add( "-sourcepath" );
|
||||
+ opts.add( quoted( StringUtils.join( sourcePaths.iterator(), ":" ) ) );
|
||||
+ opts.add( "-charset" );
|
||||
+ opts.add( quoted( docencoding ) );
|
||||
+ opts.add( "-d" );
|
||||
+ opts.add( quoted( outputDir ) );
|
||||
+ opts.add( "-docencoding" );
|
||||
+ opts.add( quoted( docencoding ) );
|
||||
+ opts.add( "-doctitle" );
|
||||
+ opts.add( quoted( "Javadoc for package XXX" ) );
|
||||
+
|
||||
for ( Path file : sourceFiles )
|
||||
{
|
||||
if ( !skipModuleInfo || !file.endsWith( "module-info.java" ) )
|
@ -1,76 +0,0 @@
|
||||
From acb236f878b020722512b1ce0ba20329500083c2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Sat, 7 May 2022 18:13:02 +0200
|
||||
Subject: [PATCH 1/2] Simple implementation of toolchains
|
||||
https://github.com/fedora-java/xmvn/issues/142
|
||||
|
||||
---
|
||||
.../fedoraproject/xmvn/mojo/JavadocMojo.java | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
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 b2cd41fd..2b06e702 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
|
||||
@@ -45,6 +45,8 @@
|
||||
import org.apache.maven.project.DependencyResolutionResult;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.project.ProjectDependenciesResolver;
|
||||
+import org.apache.maven.toolchain.Toolchain;
|
||||
+import org.apache.maven.toolchain.ToolchainManager;
|
||||
import org.codehaus.plexus.logging.Logger;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.eclipse.aether.util.filter.AndDependencyFilter;
|
||||
@@ -69,6 +71,9 @@
|
||||
@Component
|
||||
private Configurator confugurator;
|
||||
|
||||
+ @Component
|
||||
+ private ToolchainManager toolchainManager;
|
||||
+
|
||||
@Parameter( defaultValue = "${session}", readonly = true )
|
||||
private MavenSession session;
|
||||
|
||||
@@ -161,8 +166,18 @@ private void populateClasspath( Collection<Path> reactorClassPath, Collection<Pa
|
||||
public void execute()
|
||||
throws MojoExecutionException, MojoFailureException
|
||||
{
|
||||
+ String javadocTool = null;
|
||||
+ Toolchain tc = toolchainManager.getToolchainFromBuildContext( "jdk", session );
|
||||
+ if ( tc != null )
|
||||
+ {
|
||||
+ javadocTool = tc.findTool( "javadoc" );
|
||||
+ }
|
||||
Path javadocExecutable;
|
||||
- if ( System.getenv().containsKey( "JAVA_HOME" ) )
|
||||
+ if ( javadocTool != null && !javadocTool.isEmpty() )
|
||||
+ {
|
||||
+ javadocExecutable = Paths.get( javadocTool );
|
||||
+ }
|
||||
+ else if ( System.getenv().containsKey( "JAVA_HOME" ) )
|
||||
{
|
||||
javadocExecutable = Paths.get( System.getenv( "JAVA_HOME" ) ) //
|
||||
.resolve( "bin" ) //
|
||||
|
||||
From 110da12905adb020630c540e2a8937a71a0b2dc6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Sat, 7 May 2022 21:29:24 +0200
|
||||
Subject: [PATCH 2/2] Fix typo
|
||||
|
||||
---
|
||||
.../src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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 2b06e702..a83e8acf 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
|
||||
@@ -69,7 +69,7 @@
|
||||
private ProjectDependenciesResolver resolver;
|
||||
|
||||
@Component
|
||||
- private Configurator confugurator;
|
||||
+ private Configurator configurator;
|
||||
|
||||
@Component
|
||||
private ToolchainManager toolchainManager;
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (xmvn-4.0.0.tar.xz) = a276ab8f932ac6c65bf433ab4e28b17d4724983b5ae0ed360c718311324c013d970de1c67fcb27ac95b1472eac7b17c5197a4812626f5ae82af9905621935be8
|
||||
SHA512 (xmvn-4.1.0.tar.xz) = f71961375da3d987a1204245e6225f117e8ebb8fc3af1a27c248624d8351b2965bacfc3a5d4671062edc3a29576f4e54e791e6984f67f2dfa0c635dc9bc55012
|
||||
|
28
xmvn.spec
28
xmvn.spec
@ -5,8 +5,8 @@
|
||||
%endif
|
||||
|
||||
Name: xmvn
|
||||
Version: 4.0.0
|
||||
Release: 12%{?dist}
|
||||
Version: 4.1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Local Extensions for Apache Maven
|
||||
License: ASL 2.0
|
||||
URL: https://fedora-java.github.io/xmvn/
|
||||
@ -15,15 +15,12 @@ ExclusiveArch: %{java_arches} noarch
|
||||
|
||||
Source0: https://github.com/fedora-java/xmvn/releases/download/%{version}/xmvn-%{version}.tar.xz
|
||||
|
||||
Patch0: 0001-Port-to-Modello-2.0.0.patch
|
||||
Patch1: 0002-Mimic-maven-javadoc-plugin-for--source-and---release.patch
|
||||
Patch2: 0003-Simple-implementation-of-toolchains.patch
|
||||
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: javapackages-bootstrap
|
||||
%else
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(com.beust:jcommander)
|
||||
BuildRequires: mvn(javax.inject:javax.inject)
|
||||
BuildRequires: mvn(org.apache.commons:commons-compress)
|
||||
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
|
||||
@ -35,14 +32,13 @@ BuildRequires: mvn(org.apache.maven:maven-core)
|
||||
BuildRequires: mvn(org.apache.maven:maven-model)
|
||||
BuildRequires: mvn(org.apache.maven:maven-model-builder)
|
||||
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
|
||||
BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin) >= 2.0.0
|
||||
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||
BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-classworlds)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-container-default)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
|
||||
BuildRequires: mvn(org.easymock:easymock)
|
||||
BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.inject)
|
||||
BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus)
|
||||
BuildRequires: mvn(org.eclipse.sisu:sisu-maven-plugin)
|
||||
BuildRequires: mvn(org.junit.jupiter:junit-jupiter)
|
||||
BuildRequires: mvn(org.ow2.asm:asm)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-api)
|
||||
@ -132,9 +128,6 @@ This package provides %{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%mvn_package ::tar.gz: __noinstall
|
||||
%mvn_package ":{xmvn,xmvn-connector}" xmvn
|
||||
@ -164,7 +157,7 @@ cp -a "${maven_home}" target/dependency/apache-maven-$mver
|
||||
%build
|
||||
%mvn_build -j -- -P\\!quality
|
||||
|
||||
version=4.0.0
|
||||
version=4.1.0
|
||||
tar --delay-directory-restore -xvf target/xmvn-*-bin.tar.gz
|
||||
chmod -R +rwX %{name}-${version}*
|
||||
# These are installed as doc
|
||||
@ -178,7 +171,7 @@ rm -f %{name}-${version}*/bin/*
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
version=4.0.0
|
||||
version=4.1.0
|
||||
maven_home=$(realpath $(dirname $(realpath $(%{?jpb_env} which mvn)))/..)
|
||||
|
||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||
@ -271,6 +264,9 @@ end
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
* Fri Mar 17 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1.0-1
|
||||
- Update to upstream version 4.1.0
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user