Compare commits
12 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 62498620a7 | |||
| 7923c4f196 | |||
| 00a01431ee | |||
| 56ec86643e | |||
| 7fc63b56f6 | |||
| 06b8864bf0 | |||
| fe4ab37400 | |||
| d0fb18e442 | |||
| 96c0fb0814 | |||
| 91b193e02a | |||
| 1945eaf948 | |||
| b2838db671 |
@@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 20 10:44:58 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Fix 'Not fully interpolated dependency' with maven 4.0.0-rc-4
|
||||
- Craft the spec file so that migration from maven 3 to maven 4
|
||||
could be done with minimal changes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 27 14:49:55 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Added patch:
|
||||
* port-to-mpt4.patch
|
||||
+ port the maven-plugins to java-annotations extractor instead
|
||||
of the deprecated java-javadoc one
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 16 08:07:52 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package glassfish-hk2
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -38,6 +38,8 @@ Patch2: hk2-jdk11.patch
|
||||
Patch3: reproducible-now.patch
|
||||
# Port to maven-plugin-plugin >= 3.11
|
||||
Patch4: hk2-inhabitant-generator-goaprefix.patch
|
||||
# port to maven-plugin-tools >= 4.0.0
|
||||
Patch5: port-to-mpt4.patch
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(aopalliance:aopalliance)
|
||||
BuildRequires: mvn(javax.annotation:javax.annotation-api)
|
||||
@@ -234,6 +236,7 @@ This package contains API documentation for %{name}.
|
||||
%patch -P 0 -p1
|
||||
%patch -P 1 -p1
|
||||
%patch -P 2 -p1
|
||||
%patch -P 5 -p1
|
||||
|
||||
# Disable tests that intermittently fail on ARM arches
|
||||
sed -i -e '/org\.junit\.Ignore/s/\/\///' \
|
||||
@@ -270,8 +273,8 @@ find . -name '*.class' -print -delete
|
||||
%pom_change_dep -r org.glassfish.hk2.external:jakarta.inject javax.inject:javax.inject
|
||||
|
||||
# Use system libraries, not bundled versions
|
||||
%pom_change_dep -r org.glassfish.hk2.external:asm-repackaged org.ow2.asm:asm-all:'${asm.version}'
|
||||
%pom_change_dep -r org.glassfish.hk2.external:aopalliance-repackaged aopalliance:aopalliance:'${aopalliance.version}'
|
||||
%pom_change_dep -r org.glassfish.hk2.external:asm-repackaged org.ow2.asm:asm-all
|
||||
%pom_change_dep -r org.glassfish.hk2.external:aopalliance-repackaged aopalliance:aopalliance
|
||||
find class-model maven-plugins/hk2-inhabitant-generator hk2-testing/hk2-junitrunner \
|
||||
-name "*.java" -exec sed -i "s/org.glassfish.hk2.external.org.objectweb.asm/org.objectweb.asm/g" {} +
|
||||
|
||||
@@ -345,8 +348,10 @@ rm hk2-runlevel/src/test/java/org/glassfish/hk2/runlevel/tests/listener/Listener
|
||||
%pom_remove_dep -r :jboss-logging
|
||||
%pom_remove_dep -r :classmate
|
||||
|
||||
%pom_add_dep org.apache.maven:maven-core:3.9.0:provided maven-plugins/osgiversion-maven-plugin
|
||||
%pom_add_dep org.apache.maven:maven-core:3.9.0:provided maven-plugins/consolidatedbundle-maven-plugin
|
||||
%pom_add_dep org.apache.maven:maven-core:3:provided maven-plugins/osgiversion-maven-plugin
|
||||
%pom_add_dep org.apache.maven:maven-core:3:provided maven-plugins/consolidatedbundle-maven-plugin
|
||||
|
||||
%pom_add_dep org.apache.maven.plugin-tools:maven-plugin-annotations:3.15.1:provided maven-plugins
|
||||
|
||||
# Disable security policy that interferes with tests
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId ='maven-surefire-plugin']/pom:configuration" hk2-api
|
||||
@@ -386,6 +391,7 @@ cp -p %{SOURCE2} maven-plugins/hk2-inhabitant-generator/osgi.bundle
|
||||
%pom_add_plugin org.glassfish.hk2:osgiversion-maven-plugin:'${project.version}' maven-plugins/hk2-inhabitant-generator
|
||||
|
||||
# Inject manifest file
|
||||
%pom_remove_plugin -f :maven-jar-plugin maven-plugins/hk2-inhabitant-generator
|
||||
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin:2.4 maven-plugins/hk2-inhabitant-generator "
|
||||
<configuration>
|
||||
<archive>
|
||||
@@ -407,6 +413,7 @@ for mod in $(grep -l maven-bundle-plugin $(find */ -name pom.xml) ) ; do
|
||||
if [ "$(dirname $mod)" = "hk-utils" ] ; then
|
||||
continue
|
||||
fi
|
||||
%pom_remove_plugin -f :maven-jar-plugin $mod
|
||||
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin $mod "
|
||||
<configuration>
|
||||
<archive>
|
||||
@@ -418,6 +425,9 @@ done
|
||||
# This causes the plugin not to try to build with source/target 1.5
|
||||
%pom_remove_plugin :maven-compiler-plugin maven-plugins/consolidatedbundle-maven-plugin
|
||||
|
||||
%pom_change_dep -r org.apache.maven:maven-plugin-api ::3
|
||||
%pom_change_dep -r org.apache.maven:maven-artifact ::3
|
||||
|
||||
# Don't package unit test jars
|
||||
%{mvn_package} ":::tests:" __noinstall
|
||||
|
||||
@@ -487,8 +497,7 @@ done
|
||||
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
|
||||
-Dmaven.compiler.release=8 \
|
||||
%endif
|
||||
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
|
||||
-Dhk2.mvn.plugins.version=%{version}
|
||||
-Dhk2.mvn.plugins.version=%{version} -Dmvn.version=3 -DmavenVersion=3
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
242
port-to-mpt4.patch
Normal file
242
port-to-mpt4.patch
Normal file
@@ -0,0 +1,242 @@
|
||||
--- glassfish-hk2-2.5.0-RELEASE/maven-plugins/consolidatedbundle-maven-plugin/src/main/java/com/sun/enterprise/module/maven/HK2GenerateMojo.java 2025-03-27 12:48:57.365572862 +0100
|
||||
+++ glassfish-hk2-2.5.0-RELEASE/maven-plugins/consolidatedbundle-maven-plugin/src/main/java/com/sun/enterprise/module/maven/HK2GenerateMojo.java 2025-03-27 13:13:41.134788755 +0100
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
+import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
+import org.apache.maven.plugins.annotations.Mojo;
|
||||
+import org.apache.maven.plugins.annotations.Parameter;
|
||||
+import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
|
||||
@@ -33,14 +37,13 @@
|
||||
/**
|
||||
* Generates a consolidated OSGI bundle with a consolidated HK2 header
|
||||
*
|
||||
- * @goal hk2-generate
|
||||
- * @phase prepare-package
|
||||
- *
|
||||
- * @requiresProject true
|
||||
- * @requiresDependencyResolution compile
|
||||
* @author Sivakumar Thyagarajan
|
||||
*/
|
||||
/* We use prepare-package as the phase as we need to perform this consolidation before the maven-bundle-plugin's bundle goal gets executed in the package phase.*/
|
||||
+@Mojo( name = "hk2-generate",
|
||||
+ defaultPhase = LifecyclePhase.PREPARE_PACKAGE,
|
||||
+ requiresProject = true,
|
||||
+ requiresDependencyResolution = ResolutionScope.COMPILE )
|
||||
public class HK2GenerateMojo extends AbstractMojo {
|
||||
|
||||
private final static String META_INF = "META-INF";
|
||||
@@ -51,17 +54,17 @@
|
||||
/**
|
||||
* Directory where the manifest will be written
|
||||
*
|
||||
- * @parameter expression="${manifestLocation}"
|
||||
- * default-value="${project.build.outputDirectory}"
|
||||
*/
|
||||
+ @Parameter( property = "manifestLocation",
|
||||
+ defaultValue = "${project.build.outputDirectory}" )
|
||||
protected File manifestLocation;
|
||||
/**
|
||||
* The maven project.
|
||||
*
|
||||
- * @parameter expression="${project}"
|
||||
- * @required
|
||||
- * @readonly
|
||||
*/
|
||||
+ @Parameter( property = "project",
|
||||
+ required = true,
|
||||
+ readonly = true )
|
||||
protected MavenProject project;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
--- glassfish-hk2-2.5.0-RELEASE/maven-plugins/hk2-inhabitant-generator/src/main/java/org/jvnet/hk2/generator/maven/AbstractInhabitantsGeneratorMojo.java 2025-03-27 12:48:57.366337802 +0100
|
||||
+++ glassfish-hk2-2.5.0-RELEASE/maven-plugins/hk2-inhabitant-generator/src/main/java/org/jvnet/hk2/generator/maven/AbstractInhabitantsGeneratorMojo.java 2025-03-27 13:14:08.446958321 +0100
|
||||
@@ -26,6 +26,7 @@
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoFailureException;
|
||||
+import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.jvnet.hk2.generator.HabitatGenerator;
|
||||
|
||||
@@ -38,36 +39,28 @@
|
||||
private final static String WEB_INF = "WEB-INF";
|
||||
private final static String CLASSES = "classes";
|
||||
|
||||
- /**
|
||||
- * @parameter expression="${project.build.directory}"
|
||||
- */
|
||||
+ @Parameter( property = "project.build.directory" )
|
||||
private File targetDirectory;
|
||||
|
||||
/**
|
||||
* The maven project.
|
||||
- *
|
||||
- * @parameter expression="${project}" @required @readonly
|
||||
*/
|
||||
+ @Parameter( property = "project",
|
||||
+ required = true,
|
||||
+ readonly = true )
|
||||
protected MavenProject project;
|
||||
|
||||
- /**
|
||||
- * @parameter
|
||||
- */
|
||||
+ @Parameter
|
||||
private boolean verbose;
|
||||
|
||||
- /**
|
||||
- * @parameter default-value=true
|
||||
- */
|
||||
+ @Parameter( defaultValue = "true" )
|
||||
private boolean includeDate = true;
|
||||
|
||||
- /**
|
||||
- * @parameter
|
||||
- */
|
||||
+ @Parameter
|
||||
private String locator;
|
||||
|
||||
- /**
|
||||
- * @parameter expression="${supportedProjectTypes}" default-value="jar,ejb,war"
|
||||
- */
|
||||
+ @Parameter( property = "supportedProjectTypes",
|
||||
+ defaultValue = "jar,ejb,war" )
|
||||
private String supportedProjectTypes;
|
||||
|
||||
protected abstract boolean getNoSwap();
|
||||
--- glassfish-hk2-2.5.0-RELEASE/maven-plugins/hk2-inhabitant-generator/src/main/java/org/jvnet/hk2/generator/maven/InhabitantsGeneratorMojo.java 2025-03-27 12:48:57.366372023 +0100
|
||||
+++ glassfish-hk2-2.5.0-RELEASE/maven-plugins/hk2-inhabitant-generator/src/main/java/org/jvnet/hk2/generator/maven/InhabitantsGeneratorMojo.java 2025-03-27 13:13:16.318526883 +0100
|
||||
@@ -16,25 +16,26 @@
|
||||
|
||||
package org.jvnet.hk2.generator.maven;
|
||||
|
||||
+import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
+import org.apache.maven.plugins.annotations.Mojo;
|
||||
+import org.apache.maven.plugins.annotations.Parameter;
|
||||
+import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
+
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Generates inhabitant
|
||||
*
|
||||
- * @goal generate-inhabitants
|
||||
- * @phase process-classes
|
||||
- * @requiresDependencyResolution test
|
||||
*/
|
||||
+@Mojo( name = "generate-inhabitants",
|
||||
+ defaultPhase = LifecyclePhase.PROCESS_CLASSES,
|
||||
+ requiresDependencyResolution = ResolutionScope.TEST )
|
||||
public class InhabitantsGeneratorMojo extends AbstractInhabitantsGeneratorMojo {
|
||||
|
||||
- /**
|
||||
- * @parameter expression="${project.build.outputDirectory}"
|
||||
- */
|
||||
+ @Parameter( property = "project.build.outputDirectory" )
|
||||
private File outputDirectory;
|
||||
|
||||
- /**
|
||||
- * @parameter default-value="true"
|
||||
- */
|
||||
+ @Parameter( defaultValue = "true" )
|
||||
private boolean noswap;
|
||||
|
||||
@Override
|
||||
--- glassfish-hk2-2.5.0-RELEASE/maven-plugins/hk2-inhabitant-generator/src/main/java/org/jvnet/hk2/generator/maven/TestInhabitantsGeneratorMojo.java 2025-03-27 12:48:57.366398692 +0100
|
||||
+++ glassfish-hk2-2.5.0-RELEASE/maven-plugins/hk2-inhabitant-generator/src/main/java/org/jvnet/hk2/generator/maven/TestInhabitantsGeneratorMojo.java 2025-03-27 13:13:26.846558707 +0100
|
||||
@@ -16,25 +16,26 @@
|
||||
|
||||
package org.jvnet.hk2.generator.maven;
|
||||
|
||||
+import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
+import org.apache.maven.plugins.annotations.Mojo;
|
||||
+import org.apache.maven.plugins.annotations.Parameter;
|
||||
+import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
+
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Generates inhabitant
|
||||
*
|
||||
- * @goal generate-test-inhabitants
|
||||
- * @phase test-compile
|
||||
- * @requiresDependencyResolution test
|
||||
*/
|
||||
+@Mojo( name = "generate-test-inhabitants",
|
||||
+ defaultPhase = LifecyclePhase.TEST_COMPILE,
|
||||
+ requiresDependencyResolution = ResolutionScope.TEST )
|
||||
public class TestInhabitantsGeneratorMojo extends AbstractInhabitantsGeneratorMojo {
|
||||
|
||||
- /**
|
||||
- * @parameter expression="${project.build.testOutputDirectory}"
|
||||
- */
|
||||
+ @Parameter( property = "project.build.testOutputDirectory" )
|
||||
private File outputDirectory;
|
||||
|
||||
- /**
|
||||
- * @parameter default-value="false"
|
||||
- */
|
||||
+ @Parameter( defaultValue = "false" )
|
||||
private boolean noswap;
|
||||
|
||||
@Override
|
||||
--- glassfish-hk2-2.5.0-RELEASE/maven-plugins/osgiversion-maven-plugin/src/main/java/com/sun/enterprise/module/maven/OsgiVersionMojo.java 2025-03-27 12:48:57.368438894 +0100
|
||||
+++ glassfish-hk2-2.5.0-RELEASE/maven-plugins/osgiversion-maven-plugin/src/main/java/com/sun/enterprise/module/maven/OsgiVersionMojo.java 2025-03-27 13:12:55.438497082 +0100
|
||||
@@ -20,6 +20,9 @@
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.plugin.MojoFailureException;
|
||||
+import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
+import org.apache.maven.plugins.annotations.Mojo;
|
||||
+import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
|
||||
/**
|
||||
@@ -30,19 +33,19 @@
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
* @author Sanjeeb.Sahoo@Sun.COM
|
||||
- * @goal compute-osgi-version
|
||||
- * @threadSafe
|
||||
- * @phase validate
|
||||
- * @requiresProject
|
||||
*/
|
||||
+@Mojo ( name = "compute-osgi-version",
|
||||
+ threadSafe = true,
|
||||
+ defaultPhase = LifecyclePhase.VALIDATE,
|
||||
+ requiresProject = true )
|
||||
public class OsgiVersionMojo extends AbstractMojo {
|
||||
/**
|
||||
* The maven project.
|
||||
*
|
||||
- * @parameter expression="${project}"
|
||||
- * @required
|
||||
- * @readonly
|
||||
*/
|
||||
+ @Parameter( property = "project",
|
||||
+ required = true,
|
||||
+ readonly = true )
|
||||
protected MavenProject project;
|
||||
|
||||
/**
|
||||
@@ -60,13 +63,13 @@
|
||||
* be used in the OSGi version. If they ask us to drop minor, then only
|
||||
* major will be used. Similarly, if they ask us to drop qualifier, then
|
||||
* major, minor and micro portions will be used.
|
||||
- * @parameter
|
||||
*/
|
||||
+ @Parameter
|
||||
protected Version.COMPONENT dropVersionComponent;
|
||||
|
||||
/**
|
||||
- * @parameter default-value="project.osgi.version"
|
||||
*/
|
||||
+ @Parameter( defaultValue = "project.osgi.version" )
|
||||
protected String versionPropertyName;
|
||||
|
||||
@Override
|
||||
Reference in New Issue
Block a user