From 2fbc00018129075f4fac3acb3f4e66170ac0455f Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Thu, 29 Jun 2023 11:06:48 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- .gitignore | 45 ++++++++++- ...nitial-PoC-of-XMvn-toolchain-manager.patch | 77 ------------------- gating.yaml | 8 -- 3 files changed, 44 insertions(+), 86 deletions(-) delete mode 100644 0001-Initial-PoC-of-XMvn-toolchain-manager.patch delete mode 100644 gating.yaml diff --git a/.gitignore b/.gitignore index 3f37ebb..d87524a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,44 @@ -SOURCES/xmvn-3.0.0.tar.xz +/xmvn-0.tar.xz +/xmvn-0.0.1.tar.xz +/xmvn-0.0.2.tar.xz +/xmvn-0.1.0.tar.xz +/xmvn-0.1.1.tar.xz +/xmvn-0.1.2.tar.xz +/xmvn-0.1.3.tar.xz +/xmvn-0.1.4.tar.xz +/xmvn-0.1.5.tar.xz +/xmvn-0.2.0.tar.xz +/xmvn-0.2.1.tar.xz +/xmvn-0.2.2.tar.xz +/xmvn-0.2.3.tar.xz +/xmvn-0.2.4.tar.xz +/xmvn-0.2.5.tar.xz +/xmvn-0.2.6.tar.xz +/xmvn-0.3.0.tar.xz +/xmvn-0.3.1.tar.xz +/xmvn-snapshot.tar.xz +/xmvn-0.4.0.tar.xz +/xmvn-0.4.1.tar.xz +/xmvn-0.4.2.tar.xz +/xmvn-0.5.0.tar.xz +/xmvn-0.5.1.tar.xz +/xmvn-1.0.0.tar.xz +/xmvn-1.0.1.tar.xz +/xmvn-1.0.2.tar.xz +/xmvn-1.1.0.tar.xz +/xmvn-1.2.0.tar.xz +/xmvn-1.3.0.tar.xz +/xmvn-1.4.0.tar.xz +/xmvn-1.5.0-SNAPSHOT.tar.xz +/xmvn-2.0.0.tar.xz +/xmvn-2.0.1.tar.xz +/xmvn-2.1.0.tar.xz +/xmvn-2.1.1.tar.xz +/xmvn-2.2.0.tar.xz +/xmvn-2.2.1.tar.xz +/xmvn-2.3.0.tar.xz +/xmvn-2.3.1.tar.xz +/xmvn-2.3.2.tar.xz +/xmvn-2.4.0.tar.xz +/xmvn-2.5.0.tar.xz +/xmvn-3.0.0.tar.xz diff --git a/0001-Initial-PoC-of-XMvn-toolchain-manager.patch b/0001-Initial-PoC-of-XMvn-toolchain-manager.patch deleted file mode 100644 index 37b1d81..0000000 --- a/0001-Initial-PoC-of-XMvn-toolchain-manager.patch +++ /dev/null @@ -1,77 +0,0 @@ -From c9362d3f23f950bb6987c63c67b06528de3ce100 Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Thu, 23 Jan 2020 12:50:42 +0100 -Subject: [PATCH] Initial PoC of XMvn toolchain manager - ---- - .../aether/XMvnMavenLifecycleParticipant.java | 38 +++++++++++++++++++ - 1 file changed, 38 insertions(+) - -diff --git a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMavenLifecycleParticipant.java b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMavenLifecycleParticipant.java -index 0e360488..ddd6151b 100644 ---- a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMavenLifecycleParticipant.java -+++ b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMavenLifecycleParticipant.java -@@ -15,10 +15,15 @@ - */ - package org.fedoraproject.xmvn.connector.aether; - -+import java.util.Collections; -+ - import org.apache.maven.AbstractMavenLifecycleParticipant; - import org.apache.maven.MavenExecutionException; - import org.apache.maven.execution.MavenExecutionRequest; - import org.apache.maven.execution.MavenSession; -+import org.apache.maven.project.MavenProject; -+import org.apache.maven.toolchain.MisconfiguredToolchainException; -+import org.apache.maven.toolchain.ToolchainManagerPrivate; - import org.codehaus.plexus.component.annotations.Component; - import org.codehaus.plexus.component.annotations.Requirement; - import org.codehaus.plexus.logging.Logger; -@@ -42,6 +47,9 @@ public class XMvnMavenLifecycleParticipant - @Requirement( role = XMvnMojoExecutionListener.class ) - private XMvnMojoExecutionListener mojoExecutionListener; - -+ @Requirement -+ private ToolchainManagerPrivate toolchainManager; -+ - @Override - public void afterSessionStart( MavenSession session ) - throws MavenExecutionException -@@ -61,4 +69,34 @@ public class XMvnMavenLifecycleParticipant - chainedListener.addExecutionListener( reportGenerator ); - request.setExecutionListener( chainedListener ); - } -+ -+ @Override -+ public void afterProjectsRead( MavenSession session ) -+ throws MavenExecutionException -+ { -+ MavenProject currentProject = session.getCurrentProject(); -+ -+ try -+ { -+ for ( var toolchain : toolchainManager.getToolchainsForType( "jdk", session ) ) -+ { -+ if ( toolchain.matchesRequirements( Collections.singletonMap( "xmvn", "xmvn" ) ) ) -+ { -+ for ( var project : session.getAllProjects() ) -+ { -+ session.setCurrentProject( project ); -+ toolchainManager.storeToolchainToBuildContext( toolchain, session ); -+ } -+ } -+ } -+ } -+ catch ( MisconfiguredToolchainException e ) -+ { -+ throw new MavenExecutionException( "Unable to configure toolchains", e ); -+ } -+ finally -+ { -+ session.setCurrentProject( currentProject ); -+ } -+ } - } --- -2.21.0 - diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index d6b7694..0000000 --- a/gating.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- !Policy -product_versions: - - rhel-9 -decision_contexts: - - osci_compose_gate -rules: - # https://docs.engineering.redhat.com/display/RHELPLAN/Maven+Bootstrap+manual+gating+test - - !PassingTestCaseRule {test_case_name: manual.sst_cs_apps.maven.bootstrap}