Accepting request 976065 from Java:packages

4.0.0 + a complicated package layout change

OBS-URL: https://build.opensuse.org/request/show/976065
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xmvn?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2022-05-11 07:20:13 +00:00 committed by Git OBS Bridge
commit dae3fd1793
30 changed files with 1006 additions and 712 deletions

View File

@ -1,27 +0,0 @@
From 2f1be92ecb3cc227dd4a6957165b4c6c9268400c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Sun, 6 Oct 2019 16:31:51 +0200
Subject: [PATCH] Fix resolution of aliases registered by %add_maven_depmap
---
.../fedoraproject/xmvn/connector/gradle/GradleResolver.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
index 90b07eb1..7f292e00 100644
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
@@ -175,8 +175,8 @@ public class GradleResolver
{
ModuleVersionIdentifier moduleId =
( (DefaultModuleComponentArtifactMetadata) artifact ).toArtifactIdentifier().getModuleVersionIdentifier();
- String groupId = moduleId.getGroup();
- String artifactId = artifact.getName().getName();
+ String groupId = ( (DefaultModuleComponentArtifactMetadata) artifact ).getId().getComponentIdentifier().getGroup();
+ String artifactId =( (DefaultModuleComponentArtifactMetadata) artifact ).getId().getComponentIdentifier().getModule();
String extension = artifact.getName().getExtension();
String classifier = artifact.getName().getClassifier();
String version = moduleId.getVersion();
--
2.23.0

View File

@ -0,0 +1,88 @@
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 @@ public class JavadocMojo
@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 class JavadocMojo
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 class JavadocMojo
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 );
--
2.36.0

View File

@ -1,59 +0,0 @@
From 1474fd57e606bdb00417524a7b648f7841b014c8 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 28 Jun 2019 12:15:23 +0200
Subject: [PATCH 1/3] Prefer namespaced metadata when duplicates are found
---
.../metadata/impl/DefaultMetadataResult.java | 33 +++++++++++--------
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/xmvn-core/src/main/java/org/fedoraproject/xmvn/metadata/impl/DefaultMetadataResult.java b/xmvn-core/src/main/java/org/fedoraproject/xmvn/metadata/impl/DefaultMetadataResult.java
index c8b63214..67bafef5 100644
--- a/xmvn-core/src/main/java/org/fedoraproject/xmvn/metadata/impl/DefaultMetadataResult.java
+++ b/xmvn-core/src/main/java/org/fedoraproject/xmvn/metadata/impl/DefaultMetadataResult.java
@@ -94,23 +94,28 @@ class DefaultMetadataResult
}
ArtifactMetadata otherMetadata = artifactMap.get( artifact );
- if ( otherMetadata != null )
+
+ if ( otherMetadata == null )
+ {
+ artifactMap.put( artifact, metadata );
+ continue;
+ }
+
+ duplicateArtifacts.add( artifact );
+
+ if ( ignoreDuplicates )
{
- duplicateArtifacts.add( artifact );
-
- if ( ignoreDuplicates )
- {
- artifactMap.remove( artifact );
- logger.warn( "Ignoring metadata for artifact {} as it has duplicate metadata", artifact );
- continue;
- }
- else
- {
- logger.warn( "Duplicate metadata for artifact {}", artifact );
- }
+ artifactMap.remove( artifact );
+ logger.warn( "Ignoring metadata for artifact {} as it has duplicate metadata", artifact );
+ continue;
}
- artifactMap.put( artifact, metadata );
+ logger.warn( "Duplicate metadata for artifact {}", artifact );
+
+ if ( otherMetadata.getNamespace().isEmpty() || !metadata.getNamespace().isEmpty() )
+ {
+ artifactMap.put( artifact, metadata );
+ }
}
}
--
2.21.0

View File

@ -0,0 +1,85 @@
From 25029d2fc4db56e9f9a451505c8c76aaf0e8be9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Fri, 6 May 2022 18:40:49 +0200
Subject: [PATCH 1/4] Restore possibility to build with Java 8
---
.../xmvn/connector/maven/XMvnToolchainManager.java | 5 +++--
.../org/fedoraproject/xmvn/deployer/BasicDeployerTest.java | 3 ++-
.../org/fedoraproject/xmvn/tools/install/JarUtilsTest.java | 6 +++---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnToolchainManager.java b/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnToolchainManager.java
index 53f1020d..1fb59cb3 100644
--- a/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnToolchainManager.java
+++ b/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnToolchainManager.java
@@ -22,6 +22,7 @@ import org.apache.maven.execution.MavenSession;
import org.apache.maven.project.MavenProject;
import org.apache.maven.toolchain.DefaultToolchainManagerPrivate;
import org.apache.maven.toolchain.MisconfiguredToolchainException;
+import org.apache.maven.toolchain.ToolchainPrivate;
import org.codehaus.plexus.component.annotations.Component;
/**
@@ -38,11 +39,11 @@ public class XMvnToolchainManager
try
{
- for ( var toolchain : getToolchainsForType( "jdk", session ) )
+ for ( ToolchainPrivate toolchain : getToolchainsForType( "jdk", session ) )
{
if ( toolchain.matchesRequirements( Collections.singletonMap( "xmvn", "xmvn" ) ) )
{
- for ( var project : session.getAllProjects() )
+ for ( MavenProject project : session.getAllProjects() )
{
session.setCurrentProject( project );
storeToolchainToBuildContext( toolchain, session );
diff --git a/xmvn-core/src/test/java/org/fedoraproject/xmvn/deployer/BasicDeployerTest.java b/xmvn-core/src/test/java/org/fedoraproject/xmvn/deployer/BasicDeployerTest.java
index f79e5b64..0028f4f1 100644
--- a/xmvn-core/src/test/java/org/fedoraproject/xmvn/deployer/BasicDeployerTest.java
+++ b/xmvn-core/src/test/java/org/fedoraproject/xmvn/deployer/BasicDeployerTest.java
@@ -28,6 +28,7 @@ import java.nio.file.Paths;
import java.nio.file.attribute.PosixFilePermission;
import java.util.Arrays;
import java.util.Collections;
+import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.junit.jupiter.api.Test;
@@ -149,7 +150,7 @@ public class BasicDeployerTest
{
return Files.lines( Paths.get( "/proc/self/status" ) ).map( s ->
{
- var matcher = PROCESS_UID_PATTERN.matcher( s );
+ Matcher matcher = PROCESS_UID_PATTERN.matcher( s );
if ( matcher.matches() )
{
diff --git a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JarUtilsTest.java b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JarUtilsTest.java
index 8866752d..d2ef084e 100644
--- a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JarUtilsTest.java
+++ b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JarUtilsTest.java
@@ -411,8 +411,8 @@ public class JarUtilsTest
byte[] content = Files.readAllBytes( testJar );
- var previousSecurity = System.getSecurityManager();
- var fobiddingSecurity = new ForbiddingSecurityManager( testJar.toString() );
+ SecurityManager previousSecurity = System.getSecurityManager();
+ SecurityManager fobiddingSecurity = new ForbiddingSecurityManager( testJar.toString() );
System.setSecurityManager( fobiddingSecurity );
@@ -430,7 +430,7 @@ public class JarUtilsTest
"Content of the backup file is different from the content of the original file" );
System.setSecurityManager( previousSecurity );
- try ( var os = new FileOutputStream( testJar.toFile(), true ) )
+ try ( FileOutputStream os = new FileOutputStream( testJar.toFile(), true ) )
{
/// Append garbage to the original file to check if the content of the backup will be retained
os.write( 0 );
--
2.36.0

View File

@ -0,0 +1,56 @@
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.DependencyResolutionRequest;
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 @@ public class JavadocMojo
@Component
private Configurator confugurator;
+ @Component
+ private ToolchainManager toolchainManager;
+
@Parameter( defaultValue = "${session}", readonly = true )
private MavenSession session;
@@ -161,8 +166,18 @@ public class JavadocMojo
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" ) //
--
2.36.0

View File

@ -1,81 +0,0 @@
From 4957492864d6a88a814bfd6f21798b52a4e70515 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Sat, 29 Jun 2019 14:00:13 +0200
Subject: [PATCH 2/3] Make xmvn-subst honor settings for ignoring duplicate
metadata
---
.../xmvn/tools/subst/SubstCli.java | 25 +++++++++++++------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/xmvn-tools/xmvn-subst/src/main/java/org/fedoraproject/xmvn/tools/subst/SubstCli.java b/xmvn-tools/xmvn-subst/src/main/java/org/fedoraproject/xmvn/tools/subst/SubstCli.java
index 423b5e61..30b1ac63 100644
--- a/xmvn-tools/xmvn-subst/src/main/java/org/fedoraproject/xmvn/tools/subst/SubstCli.java
+++ b/xmvn-tools/xmvn-subst/src/main/java/org/fedoraproject/xmvn/tools/subst/SubstCli.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.List;
import org.fedoraproject.xmvn.config.Configurator;
+import org.fedoraproject.xmvn.config.ResolverSettings;
import org.fedoraproject.xmvn.locator.ServiceLocator;
import org.fedoraproject.xmvn.locator.ServiceLocatorFactory;
import org.fedoraproject.xmvn.metadata.MetadataRequest;
@@ -34,26 +35,34 @@ import org.fedoraproject.xmvn.metadata.MetadataResult;
*/
public class SubstCli
{
- private final List<String> configuredMetadataRepos;
-
private MetadataResolver metadataResolver;
+ private ResolverSettings resolverSettings;
+
public SubstCli( Configurator configurator, MetadataResolver metadataResolver )
{
this.metadataResolver = metadataResolver;
- configuredMetadataRepos = configurator.getConfiguration().getResolverSettings().getMetadataRepositories();
+ resolverSettings = configurator.getConfiguration().getResolverSettings();
+ }
+
+ private MetadataResult resolveMetadata( List<String> repos )
+ {
+ MetadataRequest request = new MetadataRequest( repos );
+ request.setIgnoreDuplicates( resolverSettings.isIgnoreDuplicateMetadata() );
+ MetadataResult result = metadataResolver.resolveMetadata( request );
+ return result;
}
private void run( SubstCliRequest cliRequest )
{
- List<MetadataResult> metadataResolvers = new ArrayList<>();
+ List<MetadataResult> metadataResults = new ArrayList<>();
if ( cliRequest.getRoot() != null )
{
List<String> metadataRepos = new ArrayList<>();
Path root = Paths.get( cliRequest.getRoot() );
- for ( String configuredRepo : configuredMetadataRepos )
+ for ( String configuredRepo : resolverSettings.getMetadataRepositories() )
{
Path repoPath = Paths.get( configuredRepo );
if ( repoPath.isAbsolute() )
@@ -62,12 +71,12 @@ public class SubstCli
}
}
- metadataResolvers.add( metadataResolver.resolveMetadata( new MetadataRequest( metadataRepos ) ) );
+ metadataResults.add( resolveMetadata( metadataRepos ) );
}
- metadataResolvers.add( metadataResolver.resolveMetadata( new MetadataRequest( configuredMetadataRepos ) ) );
+ metadataResults.add( resolveMetadata( resolverSettings.getMetadataRepositories() ) );
- ArtifactVisitor visitor = new ArtifactVisitor( cliRequest.isDebug(), metadataResolvers );
+ ArtifactVisitor visitor = new ArtifactVisitor( cliRequest.isDebug(), metadataResults );
visitor.setTypes( cliRequest.getTypes() );
visitor.setFollowSymlinks( cliRequest.isFollowSymlinks() );
--
2.21.0

View File

@ -0,0 +1,370 @@
From cd83d67f9138ef1cada913b539c0eb90c35de585 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Sat, 7 May 2022 09:01:27 +0200
Subject: [PATCH 2/4] Revert "Update compiler source/target to JDK 11"
This reverts commit 5ac46f5864c5a7c7d16c51405aa572b6dc5bd6f5.
---
xmvn-api/.classpath | 2 +-
xmvn-api/.settings/org.eclipse.jdt.core.prefs | 8 ++++----
xmvn-connector/.classpath | 2 +-
xmvn-connector/.settings/org.eclipse.jdt.core.prefs | 8 ++++----
xmvn-core/.classpath | 2 +-
xmvn-core/.settings/org.eclipse.jdt.core.prefs | 8 ++++----
xmvn-it/.classpath | 2 +-
xmvn-it/.settings/org.eclipse.jdt.core.prefs | 8 ++++----
xmvn-it/src/test/resources/testJavadocJPMS/pom.xml | 3 ++-
xmvn-mojo/.classpath | 2 +-
xmvn-mojo/.settings/org.eclipse.jdt.core.prefs | 8 ++++----
xmvn-parent/pom.xml | 3 ++-
xmvn-tools/xmvn-install/.classpath | 2 +-
.../xmvn-install/.settings/org.eclipse.jdt.core.prefs | 8 ++++----
xmvn-tools/xmvn-resolve/.classpath | 2 +-
.../xmvn-resolve/.settings/org.eclipse.jdt.core.prefs | 8 ++++----
xmvn-tools/xmvn-subst/.classpath | 2 +-
.../xmvn-subst/.settings/org.eclipse.jdt.core.prefs | 8 ++++----
18 files changed, 44 insertions(+), 42 deletions(-)
diff --git a/xmvn-api/.classpath b/xmvn-api/.classpath
index 6c61e620..12aa8aee 100644
--- a/xmvn-api/.classpath
+++ b/xmvn-api/.classpath
@@ -13,7 +13,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
diff --git a/xmvn-api/.settings/org.eclipse.jdt.core.prefs b/xmvn-api/.settings/org.eclipse.jdt.core.prefs
index 2d67d3f3..2f39a66b 100644
--- a/xmvn-api/.settings/org.eclipse.jdt.core.prefs
+++ b/xmvn-api/.settings/org.eclipse.jdt.core.prefs
@@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
@@ -97,8 +97,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/xmvn-connector/.classpath b/xmvn-connector/.classpath
index 97c81cef..4f8e155a 100644
--- a/xmvn-connector/.classpath
+++ b/xmvn-connector/.classpath
@@ -13,7 +13,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
diff --git a/xmvn-connector/.settings/org.eclipse.jdt.core.prefs b/xmvn-connector/.settings/org.eclipse.jdt.core.prefs
index 2d67d3f3..2f39a66b 100644
--- a/xmvn-connector/.settings/org.eclipse.jdt.core.prefs
+++ b/xmvn-connector/.settings/org.eclipse.jdt.core.prefs
@@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
@@ -97,8 +97,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/xmvn-core/.classpath b/xmvn-core/.classpath
index 0fb79cfe..002ad570 100644
--- a/xmvn-core/.classpath
+++ b/xmvn-core/.classpath
@@ -24,7 +24,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
diff --git a/xmvn-core/.settings/org.eclipse.jdt.core.prefs b/xmvn-core/.settings/org.eclipse.jdt.core.prefs
index 2d67d3f3..2f39a66b 100644
--- a/xmvn-core/.settings/org.eclipse.jdt.core.prefs
+++ b/xmvn-core/.settings/org.eclipse.jdt.core.prefs
@@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
@@ -97,8 +97,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/xmvn-it/.classpath b/xmvn-it/.classpath
index 2fcc9100..8131be0e 100644
--- a/xmvn-it/.classpath
+++ b/xmvn-it/.classpath
@@ -19,7 +19,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
diff --git a/xmvn-it/.settings/org.eclipse.jdt.core.prefs b/xmvn-it/.settings/org.eclipse.jdt.core.prefs
index 2d67d3f3..2f39a66b 100644
--- a/xmvn-it/.settings/org.eclipse.jdt.core.prefs
+++ b/xmvn-it/.settings/org.eclipse.jdt.core.prefs
@@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
@@ -97,8 +97,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/xmvn-it/src/test/resources/testJavadocJPMS/pom.xml b/xmvn-it/src/test/resources/testJavadocJPMS/pom.xml
index 6bb860ef..46926484 100644
--- a/xmvn-it/src/test/resources/testJavadocJPMS/pom.xml
+++ b/xmvn-it/src/test/resources/testJavadocJPMS/pom.xml
@@ -16,7 +16,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
- <release>11</release>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
</plugins>
diff --git a/xmvn-mojo/.classpath b/xmvn-mojo/.classpath
index 4d004b9e..1a0c5608 100644
--- a/xmvn-mojo/.classpath
+++ b/xmvn-mojo/.classpath
@@ -18,7 +18,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
diff --git a/xmvn-mojo/.settings/org.eclipse.jdt.core.prefs b/xmvn-mojo/.settings/org.eclipse.jdt.core.prefs
index 2d67d3f3..2f39a66b 100644
--- a/xmvn-mojo/.settings/org.eclipse.jdt.core.prefs
+++ b/xmvn-mojo/.settings/org.eclipse.jdt.core.prefs
@@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
@@ -97,8 +97,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
index fd5289c3..383f320c 100644
--- a/xmvn-parent/pom.xml
+++ b/xmvn-parent/pom.xml
@@ -298,7 +298,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${compilerPluginVersion}</version>
<configuration>
- <release>11</release>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
<plugin>
diff --git a/xmvn-tools/xmvn-install/.classpath b/xmvn-tools/xmvn-install/.classpath
index 0fb79cfe..002ad570 100644
--- a/xmvn-tools/xmvn-install/.classpath
+++ b/xmvn-tools/xmvn-install/.classpath
@@ -24,7 +24,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
diff --git a/xmvn-tools/xmvn-install/.settings/org.eclipse.jdt.core.prefs b/xmvn-tools/xmvn-install/.settings/org.eclipse.jdt.core.prefs
index 2d67d3f3..2f39a66b 100644
--- a/xmvn-tools/xmvn-install/.settings/org.eclipse.jdt.core.prefs
+++ b/xmvn-tools/xmvn-install/.settings/org.eclipse.jdt.core.prefs
@@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
@@ -97,8 +97,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/xmvn-tools/xmvn-resolve/.classpath b/xmvn-tools/xmvn-resolve/.classpath
index 97c81cef..4f8e155a 100644
--- a/xmvn-tools/xmvn-resolve/.classpath
+++ b/xmvn-tools/xmvn-resolve/.classpath
@@ -13,7 +13,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
diff --git a/xmvn-tools/xmvn-resolve/.settings/org.eclipse.jdt.core.prefs b/xmvn-tools/xmvn-resolve/.settings/org.eclipse.jdt.core.prefs
index 2d67d3f3..2f39a66b 100644
--- a/xmvn-tools/xmvn-resolve/.settings/org.eclipse.jdt.core.prefs
+++ b/xmvn-tools/xmvn-resolve/.settings/org.eclipse.jdt.core.prefs
@@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
@@ -97,8 +97,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/xmvn-tools/xmvn-subst/.classpath b/xmvn-tools/xmvn-subst/.classpath
index 4559ca0b..5e8a55fe 100644
--- a/xmvn-tools/xmvn-subst/.classpath
+++ b/xmvn-tools/xmvn-subst/.classpath
@@ -13,7 +13,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
diff --git a/xmvn-tools/xmvn-subst/.settings/org.eclipse.jdt.core.prefs b/xmvn-tools/xmvn-subst/.settings/org.eclipse.jdt.core.prefs
index 2d67d3f3..2f39a66b 100644
--- a/xmvn-tools/xmvn-subst/.settings/org.eclipse.jdt.core.prefs
+++ b/xmvn-tools/xmvn-subst/.settings/org.eclipse.jdt.core.prefs
@@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
@@ -97,8 +97,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
--
2.36.0

View File

@ -0,0 +1,91 @@
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 class JavadocMojo
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 @@ public class JavadocMojo
}
boolean skipModuleInfo = !isModular;
- if ( sourceLevel != null && !skipModuleInfo )
+ if ( sourceLevel != null )
{
try
{
@@ -279,6 +256,28 @@ public class JavadocMojo
}
}
+ 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" ) )
--
2.36.0

View File

@ -1,115 +0,0 @@
From a07c7079d6e7ed3f799454a827836b3ca3033e45 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Mon, 1 Jul 2019 12:22:04 +0200
Subject: [PATCH 3/3] Fix requires generation for self-depending packages
---
.../tools/install/impl/DefaultInstaller.java | 5 ++++
.../tools/install/impl/InstallerTest.java | 9 +++++++
.../test/resources/self-requires-resolved.xml | 25 +++++++++++++++++++
.../src/test/resources/self-requires.xml | 24 ++++++++++++++++++
4 files changed, 63 insertions(+)
create mode 100644 xmvn-tools/xmvn-install/src/test/resources/self-requires-resolved.xml
create mode 100644 xmvn-tools/xmvn-install/src/test/resources/self-requires.xml
diff --git a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultInstaller.java b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultInstaller.java
index e051e823..671d79d3 100644
--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultInstaller.java
+++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultInstaller.java
@@ -275,6 +275,11 @@ public class DefaultInstaller
dependency.setNamespace( resolvedMetadata.getNamespace() );
return;
}
+ }
+
+ for ( String version : Arrays.asList( dependency.getRequestedVersion(), Artifact.DEFAULT_VERSION ) )
+ {
+ Artifact dependencyArtifact = dependency.toArtifact().setVersion( version );
// Next try system artifact resolver
ResolutionRequest request = new ResolutionRequest( dependencyArtifact );
diff --git a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/InstallerTest.java b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/InstallerTest.java
index 48db907d..ccbbf63d 100644
--- a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/InstallerTest.java
+++ b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/InstallerTest.java
@@ -204,6 +204,15 @@ public class InstallerTest
installRoot.resolve( "usr/share/maven-metadata/test-pkg.xml" ) );
}
+ @Test
+ public void testSelfRequires()
+ throws Exception
+ {
+ install( "self-requires.xml" );
+ assertMetadataEqual( getResource( "self-requires-resolved.xml" ),
+ installRoot.resolve( "usr/share/maven-metadata/test-pkg.xml" ) );
+ }
+
@Test
public void testSubpackage()
throws Exception
diff --git a/xmvn-tools/xmvn-install/src/test/resources/self-requires-resolved.xml b/xmvn-tools/xmvn-install/src/test/resources/self-requires-resolved.xml
new file mode 100644
index 00000000..59e8ad61
--- /dev/null
+++ b/xmvn-tools/xmvn-install/src/test/resources/self-requires-resolved.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://fedorahosted.org/xmvn/METADATA/3.0.0">
+ <uuid>bfb4d47f-4bf2-49bc-bd85-1d3528e97746</uuid>
+ <artifacts>
+ <artifact>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <version>3.3.2</version>
+ <path>???example.jar</path>
+ </artifact>
+ <artifact>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ <version>3.3.2</version>
+ <path>???example.jar</path>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <requestedVersion>3.3.2</requestedVersion>
+ </dependency>
+ </dependencies>
+ </artifact>
+ </artifacts>
+</metadata>
diff --git a/xmvn-tools/xmvn-install/src/test/resources/self-requires.xml b/xmvn-tools/xmvn-install/src/test/resources/self-requires.xml
new file mode 100644
index 00000000..16a78328
--- /dev/null
+++ b/xmvn-tools/xmvn-install/src/test/resources/self-requires.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://fedorahosted.org/xmvn/METADATA/3.2.0">
+ <artifacts>
+ <artifact>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <version>3.3.2</version>
+ <path>src/test/resources/example.jar</path>
+ </artifact>
+ <artifact>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ <version>3.3.2</version>
+ <path>src/test/resources/example.jar</path>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <requestedVersion>3.3.2</requestedVersion>
+ </dependency>
+ </dependencies>
+ </artifact>
+ </artifacts>
+</metadata>
\ No newline at end of file
--
2.21.0

View File

@ -0,0 +1,109 @@
From 67ad1e7228166863edc81fe56b74abad443251df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Sun, 8 May 2022 19:28:37 +0200
Subject: [PATCH 3/4] Revert "Use new Collection methods added in Java 9"
This reverts commit 1acda1ff8bb2a58c458395d61c0aaeae3d425e53.
---
.../fedoraproject/xmvn/deployer/DependencyDescriptor.java | 3 ++-
.../org/fedoraproject/xmvn/deployer/DeploymentRequest.java | 5 +++--
.../xmvn/connector/maven/XMvnMojoExecutionListener.java | 3 ++-
.../org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java | 3 ++-
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DependencyDescriptor.java b/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DependencyDescriptor.java
index 9918affe..1af7d2fb 100644
--- a/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DependencyDescriptor.java
+++ b/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DependencyDescriptor.java
@@ -15,6 +15,7 @@
*/
package org.fedoraproject.xmvn.deployer;
+import java.util.Collections;
import java.util.List;
import org.fedoraproject.xmvn.artifact.Artifact;
@@ -34,7 +35,7 @@ public class DependencyDescriptor
{
this.dependencyArtifact = dependencyArtifact;
this.optional = optional;
- this.exclusions = List.copyOf( exclusions );
+ this.exclusions = Collections.unmodifiableList( exclusions );
}
public Artifact getDependencyArtifact()
diff --git a/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DeploymentRequest.java b/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DeploymentRequest.java
index 6c67d2c7..16e48471 100644
--- a/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DeploymentRequest.java
+++ b/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DeploymentRequest.java
@@ -19,6 +19,7 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
@@ -53,7 +54,7 @@ public class DeploymentRequest
public List<DependencyDescriptor> getDependencies()
{
- return List.copyOf( dependencies );
+ return Collections.unmodifiableList( dependencies );
}
public void addDependency( Artifact dependencyArtifact, Artifact... exclusions )
@@ -85,7 +86,7 @@ public class DeploymentRequest
public Map<String, String> getProperties()
{
- return Map.copyOf( properties );
+ return Collections.unmodifiableMap( properties );
}
public String getProperty( String key )
diff --git a/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnMojoExecutionListener.java b/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnMojoExecutionListener.java
index dc312edf..812ecd83 100644
--- a/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnMojoExecutionListener.java
+++ b/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnMojoExecutionListener.java
@@ -25,6 +25,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Properties;
@@ -276,7 +277,7 @@ public class XMvnMojoExecutionListener
}
else if ( XMVN_BUILDDEP.equals( execution ) )
{
- trySetBeanProperty( mojo, "resolutions", List.copyOf( resolutions ) );
+ trySetBeanProperty( mojo, "resolutions", Collections.unmodifiableList( new ArrayList<>( resolutions ) ) );
}
}
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java
index e77ca530..75cc4922 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java
@@ -16,6 +16,7 @@
package org.fedoraproject.xmvn.mojo;
import java.util.Arrays;
+import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
@@ -53,7 +54,7 @@ class BuildDependencyVisitor
public Set<Artifact> getArtifacts()
{
- return Set.copyOf( artifacts );
+ return Collections.unmodifiableSet( artifacts );
}
private boolean isExternal( InputLocation location )
--
2.36.0

View File

@ -0,0 +1,44 @@
From 4dc70921e93fdf1f34e9c02b7a9bd8890bb4ac4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Sun, 8 May 2022 19:56:30 +0200
Subject: [PATCH 4/4] Add a jdk9+ profile to assure that we are jdk8 compatible
---
xmvn-parent/pom.xml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
index 383f320c..e1ed807f 100644
--- a/xmvn-parent/pom.xml
+++ b/xmvn-parent/pom.xml
@@ -565,5 +565,27 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>jdk9+</id>
+ <activation>
+ <jdk>[9,)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <release>8</release>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
--
2.36.0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f0575f5bd74af4ca23b27f7da97367ee56e2891245c6fd4c66c33a74ffd0a7c
size 181604

3
xmvn-4.0.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b0d5bb4fe3e66d84695abd5347b570bb1135bab21125d55ab9a07fbacfa5bb3c
size 140696

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dd78073f17d4c3fe0039f551b0f1ec8fc1c307d455c603d73e0966dab6b59758
size 4672
oid sha256:3cfe7eae867e19082770770bb45b1da5dd46dbc28a2e2c737e304205feeef1ec
size 4388

View File

@ -1,20 +0,0 @@
-------------------------------------------------------------------
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

View File

@ -1,27 +0,0 @@
-------------------------------------------------------------------
Thu Nov 21 14:25:58 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
- Added patch:
* xmvn-gradle_4_4_1.patch
+ backport this version to use gradle 4.4.1 instead of 4.5.1
-------------------------------------------------------------------
Wed Mar 27 06:28:06 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of xmvn-connector-gradle 3.0.0
- Added patch:
* 0001-Fix-resolution-of-aliases-registered-by-add_maven_de.patch
+ fix resolution of aliases that are registered by the
%%add_maven_depmap macro

View File

@ -1,113 +0,0 @@
#
# spec file
#
# Copyright (c) 2021 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-gradle
Name: %{parent}-%{subname}
Version: 3.1.0
Release: 0
Summary: XMvn Connector for Gradle
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: 0001-Fix-resolution-of-aliases-registered-by-add_maven_de.patch
# Backport to gradle 4.4.1
Patch1: xmvn-gradle_4_4_1.patch
BuildRequires: fdupes
# Build this one with the bootstrap package in order to avoid build cycles
BuildRequires: maven-local
BuildRequires: mvn(javax.inject:javax.inject)
BuildRequires: mvn(org.apache.ivy:ivy)
BuildRequires: mvn(org.codehaus.groovy:groovy-all)
BuildRequires: mvn(org.fedoraproject.xmvn:xmvn-api)
BuildRequires: mvn(org.gradle:gradle-base-services) >= 4.4.1
BuildRequires: mvn(org.gradle:gradle-base-services-groovy) >= 4.4.1
BuildRequires: mvn(org.gradle:gradle-core) >= 4.4.1
BuildRequires: mvn(org.gradle:gradle-dependency-management) >= 4.4.1
BuildRequires: mvn(org.gradle:gradle-resources) >= 4.4.1
BuildRequires: mvn(org.slf4j:slf4j-api)
#!BuildRequires: gradle-bootstrap groovy-bootstrap gpars-bootstrap
BuildArch: noarch
%description
This package provides XMvn Connector for Gradle, which provides
integration of Gradle with XMvn. It provides an adapter which allows
XMvn resolver to be used as Gradle resolver.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package provides %{summary}.
%prep
%setup -q -n %{parent}-%{version}
%patch0 -p1
%patch1 -p1
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
find -name BisectIntegrationTest.java -delete
# 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
pushd %{name}
%{mvn_build} -f -- -Dsource=8
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

View File

@ -1,20 +0,0 @@
-------------------------------------------------------------------
Thu Nov 21 14:24:55 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:25:55 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of xmvn-connector-ivy 3.0.0

View File

@ -1,115 +0,0 @@
#
# spec file
#
# Copyright (c) 2021 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-ivy
%bcond_with tests
Name: %{parent}-%{subname}
Version: 3.1.0
Release: 0
Summary: XMvn Connector for Apache Ivy
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
BuildRequires: %{parent}-api = %{version}
BuildRequires: ant
BuildRequires: apache-ivy
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: slf4j
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
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} -a1
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
find -name BisectIntegrationTest.java -delete
# 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 \
ivy slf4j/api %{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

45
xmvn-connector.changes Normal file
View File

@ -0,0 +1,45 @@
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
- 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

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,10 +17,10 @@
%global parent xmvn
%global subname connector-aether
%global subname connector
%bcond_with tests
Name: %{parent}-%{subname}
Version: 3.1.0
Version: 4.0.0
Release: 0
Summary: XMvn Connector for Maven Resolver
License: Apache-2.0
@ -28,6 +28,13 @@ 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
Patch1: 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
Patch2: 0002-module-path-not-allowed-with-release-8.patch
Patch3: 0001-Simple-implementation-of-toolchains-https-github.com.patch
Patch4: 0001-Restore-possibility-to-build-with-Java-8.patch
Patch5: 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
Patch6: 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
Patch7: 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
BuildRequires: %{parent}-api = %{version}
BuildRequires: %{parent}-core = %{version}
BuildRequires: ant
@ -43,6 +50,8 @@ BuildRequires: sisu-inject
BuildRequires: sisu-plexus
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
Provides: %{name}-aether = %{version}
Obsoletes: %{name}-aether < %{version}
BuildArch: noarch
%description
@ -61,9 +70,7 @@ This package provides %{summary}.
%prep
%setup -q -n %{parent}-%{version} -a1
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
find -name BisectIntegrationTest.java -delete
%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...

View File

@ -1,78 +0,0 @@
--- xmvn-3.1.0/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java 2019-06-14 13:04:11.000000000 +0200
+++ xmvn-3.1.0/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java 2019-11-21 14:38:15.619695681 +0100
@@ -25,7 +25,6 @@
import org.gradle.api.artifacts.ModuleVersionIdentifier;
import org.gradle.api.artifacts.component.ComponentArtifactIdentifier;
import org.gradle.api.artifacts.component.ModuleComponentIdentifier;
-import org.gradle.api.internal.ExperimentalFeatures;
import org.gradle.api.internal.artifacts.ImmutableModuleIdentifierFactory;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ConfiguredModuleComponentRepository;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ModuleComponentRepositoryAccess;
@@ -35,13 +34,10 @@
import org.gradle.api.internal.artifacts.repositories.AbstractArtifactRepository;
import org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository;
import org.gradle.api.internal.artifacts.repositories.resolver.MetadataFetchingCost;
-import org.gradle.api.internal.attributes.ImmutableAttributesFactory;
import org.gradle.api.internal.component.ArtifactType;
-import org.gradle.api.internal.model.NamedObjectInstantiator;
import org.gradle.internal.component.external.model.DefaultModuleComponentArtifactMetadata;
import org.gradle.internal.component.external.model.DefaultMutableMavenModuleResolveMetadata;
import org.gradle.internal.component.external.model.FixedComponentArtifacts;
-import org.gradle.internal.component.external.model.MavenDependencyDescriptor;
import org.gradle.internal.component.external.model.ModuleComponentArtifactMetadata;
import org.gradle.internal.component.external.model.ModuleComponentResolveMetadata;
import org.gradle.internal.component.external.model.ModuleDependencyMetadata;
@@ -84,27 +80,17 @@
{
public GradleResolver( MetaDataParser<MutableMavenModuleResolveMetadata> pomParser,
ImmutableModuleIdentifierFactory moduleIdentifierFactory,
- FileResourceRepository fileRepository, ImmutableAttributesFactory immutableAttributesFactory,
- NamedObjectInstantiator objectInstantiator, ExperimentalFeatures experimentalFeatures )
+ FileResourceRepository fileRepository )
{
this.pomParser = pomParser;
this.moduleIdentifierFactory = moduleIdentifierFactory;
this.fileRepository = fileRepository;
- this.immutableAttributesFactory = immutableAttributesFactory;
- this.experimentalFeatures = experimentalFeatures;
- this.objectInstantiator = objectInstantiator;
}
private MetaDataParser<MutableMavenModuleResolveMetadata> pomParser;
private ImmutableModuleIdentifierFactory moduleIdentifierFactory;
- private ImmutableAttributesFactory immutableAttributesFactory;
-
- private ExperimentalFeatures experimentalFeatures;
-
- private NamedObjectInstantiator objectInstantiator;
-
private FileResourceRepository fileRepository;
private final Logger logger = LoggerFactory.getLogger( GradleResolver.class );
@@ -233,11 +219,8 @@
logger.debug( "Artifact {} found, returning minimal model", artifact3 );
ModuleVersionIdentifier mvi =
moduleIdentifierFactory.moduleWithVersion( id.getGroup(), id.getModule(), id.getVersion() );
- DefaultMutableMavenModuleResolveMetadata metaData =
- new DefaultMutableMavenModuleResolveMetadata( mvi, id,
- Collections.<MavenDependencyDescriptor>emptyList(),
- immutableAttributesFactory, objectInstantiator,
- experimentalFeatures );
+ MutableModuleComponentResolveMetadata metaData =
+ DefaultMutableMavenModuleResolveMetadata.missing( mvi, id );
result.resolved( metaData.asImmutable() );
return;
}
--- xmvn-3.1.0/xmvn-parent/pom.xml 2019-06-14 13:04:11.000000000 +0200
+++ xmvn-3.1.0/xmvn-parent/pom.xml 2019-11-21 14:36:19.831099473 +0100
@@ -84,7 +84,7 @@
<atinjectVersion>1</atinjectVersion>
<ivyVersion>2.5.0-rc1</ivyVersion>
<jcommanderVersion>1.72</jcommanderVersion>
- <gradleVersion>4.5.1</gradleVersion>
+ <gradleVersion>4.4.1</gradleVersion>
<groovyVersion>2.4.12</groovyVersion>
<mavenInvokerVersion>3.0.1</mavenInvokerVersion>
<mavenResolverVersion>1.3.1</mavenResolverVersion>

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
- 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>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,13 +19,20 @@
%global parent xmvn
%global subname mojo
Name: %{parent}-%{subname}
Version: 3.1.0
Version: 4.0.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
Patch1: 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
Patch2: 0002-module-path-not-allowed-with-release-8.patch
Patch3: 0001-Simple-implementation-of-toolchains-https-github.com.patch
Patch4: 0001-Restore-possibility-to-build-with-Java-8.patch
Patch5: 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
Patch6: 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
Patch7: 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
BuildRequires: %{parent}-api = %{version}
BuildRequires: %{parent}-core = %{version}
BuildRequires: fdupes
@ -72,9 +79,7 @@ This package provides %{summary}.
%prep
%setup -q -n %{parent}-%{version}
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
find -name BisectIntegrationTest.java -delete
%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...
@ -98,7 +103,8 @@ find -name ResolverIntegrationTest.java -delete
# Don't put Class-Path attributes in manifests
%pom_remove_plugin :maven-jar-plugin xmvn-tools
%pom_remove_dep -r :xmlunit-assertj
# 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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
-------------------------------------------------------------------
Thu Nov 21 14:19:39 UTC 2019 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,13 +19,20 @@
%global parent xmvn
%global subname parent
Name: %{parent}-%{subname}
Version: 3.1.0
Version: 4.0.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
Patch1: 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
Patch2: 0002-module-path-not-allowed-with-release-8.patch
Patch3: 0001-Simple-implementation-of-toolchains-https-github.com.patch
Patch4: 0001-Restore-possibility-to-build-with-Java-8.patch
Patch5: 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
Patch6: 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
Patch7: 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
BuildRequires: javapackages-local
BuildRequires: xmvn-resolve
BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin)
@ -40,6 +47,8 @@ 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

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
- 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>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,7 +19,7 @@
%global parent xmvn
%global subname tools
Name: %{parent}-%{subname}
Version: 3.1.0
Version: 4.0.0
Release: 0
Summary: Local Extensions for Apache Maven
License: Apache-2.0
@ -27,9 +27,13 @@ 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
Patch1: 0001-Prefer-namespaced-metadata-when-duplicates-are-found.patch
Patch2: 0002-Make-xmvn-subst-honor-settings-for-ignoring-duplicat.patch
Patch3: 0003-Fix-requires-generation-for-self-depending-packages.patch
Patch1: 0001-Mimic-maven-javadoc-plugin-for-source-and-release.patch
Patch2: 0002-module-path-not-allowed-with-release-8.patch
Patch3: 0001-Simple-implementation-of-toolchains-https-github.com.patch
Patch4: 0001-Restore-possibility-to-build-with-Java-8.patch
Patch5: 0002-Revert-Update-compiler-source-target-to-JDK-11.patch
Patch6: 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch
Patch7: 0004-Add-a-jdk9-profile-to-assure-that-we-are-jdk8-compat.patch
BuildRequires: ant
BuildRequires: apache-commons-compress
BuildRequires: beust-jcommander
@ -86,19 +90,6 @@ 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}-bisect
Summary: XMvn Bisect
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Group: Development/Tools/Building
Requires: beust-jcommander
Requires: javapackages-tools
Requires: maven-invoker
%description -n %{parent}-bisect
This package provides XMvn Bisect, which is a debugging tool that can
diagnose build failures by using bisection method.
%package -n %{parent}-subst
Summary: XMvn Subst
# Explicit javapackages-tools requires since scripts use
@ -143,13 +134,7 @@ This package provides %{summary}.
%prep
%setup -q -n %{parent}-%{version} -a1
%patch1 -p1
%patch2 -p1
%patch3 -p1
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
find -name BisectIntegrationTest.java -delete
%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...
@ -182,7 +167,7 @@ for i in api core; do
<version>%{version}</version>" %{parent}-${i}
%pom_remove_parent %{parent}-${i}
done
for i in bisect install resolve subst; do
for i in install resolve subst; do
%pom_xpath_inject "pom:project" "
<groupId>org.fedoraproject.xmvn</groupId>
<version>%{version}</version>" %{parent}-tools/%{parent}-${i}
@ -204,7 +189,7 @@ 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 bisect install resolve subst; do
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
@ -214,7 +199,7 @@ 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 bisect install resolve subst; do
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
@ -225,14 +210,13 @@ 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 bisect install resolve subst; do
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.bisect.BisectCli "" "-Dxmvn.home=%{_datadir}/%{name}" %{parent}/%{parent}-bisect:beust-jcommander:maven-invoker:plexus/utils %{parent}-bisect
%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 %{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
@ -246,9 +230,6 @@ done
%files -n %{parent}-resolve -f .mfiles-resolve
%{_bindir}/%{parent}-resolve
%files -n %{parent}-bisect -f .mfiles-bisect
%{_bindir}/%{parent}-bisect
%files -n %{parent}-subst -f .mfiles-subst
%{_bindir}/%{parent}-subst

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 10 12:36:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 4.0.0
-------------------------------------------------------------------
Fri Oct 22 09:15:52 UTC 2021 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package xmvn
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,14 +17,14 @@
Name: xmvn
Version: 3.1.0
Version: 4.0.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-aether = %{version}
BuildRequires: %{name}-connector = %{version}
BuildRequires: %{name}-core = %{version}
BuildRequires: %{name}-subst
BuildRequires: javapackages-tools
@ -42,7 +42,7 @@ creating RPM packages containing Maven artifacts.
Summary: Dependency-reduced version of XMvn
Group: Development/Tools/Building
Requires: %{name}-api = %{version}
Requires: %{name}-connector-aether = %{version}
Requires: %{name}-connector = %{version}
Requires: %{name}-core = %{version}
%requires_eq maven-lib
@ -63,7 +63,7 @@ maven_home=%{_datadir}/maven
install -d -m 755 %{buildroot}%{_datadir}/%{name}
cp -aL ${maven_home}/* %{buildroot}%{_datadir}/%{name}/
for i in api core connector-aether; do
for i in api core connector; do
ln -s $(build-classpath %{name}/%{name}-${i}) %{buildroot}%{_datadir}/%{name}/lib/ext/
done