This commit is contained in:
parent
543be828a6
commit
950c8ad357
184
0001-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
Normal file
184
0001-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
Normal file
@ -0,0 +1,184 @@
|
||||
From f892c4e5906fcacaec99a146a2a36dd4ca5d5166 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Sun, 27 Aug 2023 07:49:01 +0200
|
||||
Subject: [PATCH] Revert "Switch to codehaus plexus-build-api 1.2.0 (#345)"
|
||||
|
||||
This reverts commit c689155598257f225963b9332f57fe72dfd78753.
|
||||
---
|
||||
modello-core/pom.xml | 2 +-
|
||||
.../codehaus/modello/plugin/AbstractModelloGenerator.java | 2 +-
|
||||
modello-maven-plugin/pom.xml | 2 +-
|
||||
.../modello/maven/AbstractModelloGeneratorMojo.java | 2 +-
|
||||
.../codehaus/modello/maven/ModelloConvertersMojoTest.java | 8 +-------
|
||||
.../org/codehaus/modello/maven/ModelloJavaMojoTest.java | 8 +-------
|
||||
modello-plugins/modello-plugin-java/pom.xml | 2 +-
|
||||
.../codehaus/modello/AbstractModelloGeneratorTest.java | 6 ------
|
||||
pom.xml | 4 ++--
|
||||
9 files changed, 9 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/modello-core/pom.xml b/modello-core/pom.xml
|
||||
index 636c03fe..7f9adf39 100644
|
||||
--- a/modello-core/pom.xml
|
||||
+++ b/modello-core/pom.xml
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
+ <groupId>org.sonatype.plexus</groupId>
|
||||
<artifactId>plexus-build-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
diff --git a/modello-core/src/main/java/org/codehaus/modello/plugin/AbstractModelloGenerator.java b/modello-core/src/main/java/org/codehaus/modello/plugin/AbstractModelloGenerator.java
|
||||
index bb59b439..334e16e8 100644
|
||||
--- a/modello-core/src/main/java/org/codehaus/modello/plugin/AbstractModelloGenerator.java
|
||||
+++ b/modello-core/src/main/java/org/codehaus/modello/plugin/AbstractModelloGenerator.java
|
||||
@@ -43,7 +43,6 @@ import org.codehaus.modello.model.ModelField;
|
||||
import org.codehaus.modello.model.Version;
|
||||
import org.codehaus.plexus.PlexusConstants;
|
||||
import org.codehaus.plexus.PlexusContainer;
|
||||
-import org.codehaus.plexus.build.BuildContext;
|
||||
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
||||
import org.codehaus.plexus.context.Context;
|
||||
import org.codehaus.plexus.context.ContextException;
|
||||
@@ -51,6 +50,7 @@ import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.codehaus.plexus.util.io.CachingWriter;
|
||||
+import org.sonatype.plexus.build.incremental.BuildContext;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:jason@modello.org">Jason van Zyl</a>
|
||||
diff --git a/modello-maven-plugin/pom.xml b/modello-maven-plugin/pom.xml
|
||||
index 3687fb05..57227449 100644
|
||||
--- a/modello-maven-plugin/pom.xml
|
||||
+++ b/modello-maven-plugin/pom.xml
|
||||
@@ -121,7 +121,7 @@
|
||||
<artifactId>modello-plugin-velocity</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
+ <groupId>org.sonatype.plexus</groupId>
|
||||
<artifactId>plexus-build-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
diff --git a/modello-maven-plugin/src/main/java/org/codehaus/modello/maven/AbstractModelloGeneratorMojo.java b/modello-maven-plugin/src/main/java/org/codehaus/modello/maven/AbstractModelloGeneratorMojo.java
|
||||
index 762b5784..51b75a12 100644
|
||||
--- a/modello-maven-plugin/src/main/java/org/codehaus/modello/maven/AbstractModelloGeneratorMojo.java
|
||||
+++ b/modello-maven-plugin/src/main/java/org/codehaus/modello/maven/AbstractModelloGeneratorMojo.java
|
||||
@@ -41,8 +41,8 @@ import org.codehaus.modello.ModelloParameterConstants;
|
||||
import org.codehaus.modello.core.ModelloCore;
|
||||
import org.codehaus.modello.model.Model;
|
||||
import org.codehaus.modello.model.ModelValidationException;
|
||||
-import org.codehaus.plexus.build.BuildContext;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
+import org.sonatype.plexus.build.incremental.BuildContext;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
|
||||
diff --git a/modello-maven-plugin/src/test/java/org/codehaus/modello/maven/ModelloConvertersMojoTest.java b/modello-maven-plugin/src/test/java/org/codehaus/modello/maven/ModelloConvertersMojoTest.java
|
||||
index 779f178d..23f466d3 100644
|
||||
--- a/modello-maven-plugin/src/test/java/org/codehaus/modello/maven/ModelloConvertersMojoTest.java
|
||||
+++ b/modello-maven-plugin/src/test/java/org/codehaus/modello/maven/ModelloConvertersMojoTest.java
|
||||
@@ -26,10 +26,9 @@ import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.codehaus.modello.core.ModelloCore;
|
||||
-import org.codehaus.plexus.ContainerConfiguration;
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
-import org.codehaus.plexus.build.BuildContext;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
+import org.sonatype.plexus.build.incremental.BuildContext;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||
@@ -99,9 +98,4 @@ public class ModelloConvertersMojoTest extends PlexusTestCase {
|
||||
|
||||
assertFalse("The generated java file doesn't exist: '" + javaFile.getAbsolutePath() + "'.", javaFile.exists());
|
||||
}
|
||||
-
|
||||
- @Override
|
||||
- protected void customizeContainerConfiguration(ContainerConfiguration containerConfiguration) {
|
||||
- containerConfiguration.setClassPathScanning("cache");
|
||||
- }
|
||||
}
|
||||
diff --git a/modello-maven-plugin/src/test/java/org/codehaus/modello/maven/ModelloJavaMojoTest.java b/modello-maven-plugin/src/test/java/org/codehaus/modello/maven/ModelloJavaMojoTest.java
|
||||
index f15b4031..bb5bb7cf 100644
|
||||
--- a/modello-maven-plugin/src/test/java/org/codehaus/modello/maven/ModelloJavaMojoTest.java
|
||||
+++ b/modello-maven-plugin/src/test/java/org/codehaus/modello/maven/ModelloJavaMojoTest.java
|
||||
@@ -26,10 +26,9 @@ import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.codehaus.modello.core.ModelloCore;
|
||||
-import org.codehaus.plexus.ContainerConfiguration;
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
-import org.codehaus.plexus.build.BuildContext;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
+import org.sonatype.plexus.build.incremental.BuildContext;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
|
||||
@@ -97,9 +96,4 @@ public class ModelloJavaMojoTest extends PlexusTestCase {
|
||||
assertFalse(
|
||||
"The generated java file shouldn't exist: '" + javaFile.getAbsolutePath() + "'.", javaFile.exists());
|
||||
}
|
||||
-
|
||||
- @Override
|
||||
- protected void customizeContainerConfiguration(ContainerConfiguration containerConfiguration) {
|
||||
- containerConfiguration.setClassPathScanning("cache");
|
||||
- }
|
||||
}
|
||||
diff --git a/modello-plugins/modello-plugin-java/pom.xml b/modello-plugins/modello-plugin-java/pom.xml
|
||||
index ea94c3c6..6ba7c01f 100644
|
||||
--- a/modello-plugins/modello-plugin-java/pom.xml
|
||||
+++ b/modello-plugins/modello-plugin-java/pom.xml
|
||||
@@ -17,7 +17,7 @@
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
+ <groupId>org.sonatype.plexus</groupId>
|
||||
<artifactId>plexus-build-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
diff --git a/modello-test/src/main/java/org/codehaus/modello/AbstractModelloGeneratorTest.java b/modello-test/src/main/java/org/codehaus/modello/AbstractModelloGeneratorTest.java
|
||||
index f46cece1..e71231fb 100644
|
||||
--- a/modello-test/src/main/java/org/codehaus/modello/AbstractModelloGeneratorTest.java
|
||||
+++ b/modello-test/src/main/java/org/codehaus/modello/AbstractModelloGeneratorTest.java
|
||||
@@ -32,7 +32,6 @@ import java.io.Reader;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
|
||||
-import org.codehaus.plexus.ContainerConfiguration;
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.codehaus.plexus.util.ReaderFactory;
|
||||
@@ -108,9 +107,4 @@ public abstract class AbstractModelloGeneratorTest extends PlexusTestCase {
|
||||
new File(getOutputDirectory(), generatedXsdName));
|
||||
return saxParser;
|
||||
}
|
||||
-
|
||||
- @Override
|
||||
- protected void customizeContainerConfiguration(ContainerConfiguration containerConfiguration) {
|
||||
- containerConfiguration.setClassPathScanning("cache");
|
||||
- }
|
||||
}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 88f8ed6f..9a4ac6df 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -347,9 +347,9 @@
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
+ <groupId>org.sonatype.plexus</groupId>
|
||||
<artifactId>plexus-build-api</artifactId>
|
||||
- <version>1.2.0</version>
|
||||
+ <version>0.0.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
--
|
||||
2.41.0
|
||||
|
BIN
modello-2.0.0-source-release.zip
(Stored with Git LFS)
BIN
modello-2.0.0-source-release.zip
(Stored with Git LFS)
Binary file not shown.
BIN
modello-2.1.2-source-release.zip
(Stored with Git LFS)
Normal file
BIN
modello-2.1.2-source-release.zip
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
modello-build.tar.xz
(Stored with Git LFS)
BIN
modello-build.tar.xz
(Stored with Git LFS)
Binary file not shown.
@ -1,38 +1,22 @@
|
||||
--- modello-2.0.0/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java 2022-02-13 14:30:34.000000000 +0100
|
||||
+++ modello-2.0.0/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java 2022-05-10 09:08:57.893555360 +0200
|
||||
@@ -114,6 +114,15 @@
|
||||
|
||||
System.exit( 1 );
|
||||
}
|
||||
+ if ( StringUtils.equalsIgnoreCase( javaSource, "true" ) || StringUtils.equalsIgnoreCase( javaSource, "false" ) )
|
||||
+ {
|
||||
+ // The old useJava5 parameter at this position
|
||||
+ System.err.println( "Missing required parameter: Java Source (replacing the old \"Use Java5\" parameter)" );
|
||||
+
|
||||
+ usage();
|
||||
+
|
||||
+ System.exit( 1 );
|
||||
+ }
|
||||
|
||||
parameters.setProperty( ModelloParameterConstants.OUTPUT_JAVA_SOURCE, javaSource );
|
||||
|
||||
@@ -121,6 +130,11 @@
|
||||
{
|
||||
parameters.setProperty( ModelloParameterConstants.ENCODING, args[6] );
|
||||
diff -urEbwB modello-2.1.2.orig/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java modello-2.1.2/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java
|
||||
--- modello-2.1.2.orig/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java 2023-09-04 23:38:10.194571922 +0200
|
||||
+++ modello-2.1.2/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java 2023-09-04 23:40:24.188819301 +0200
|
||||
@@ -110,6 +110,10 @@
|
||||
if (args.length > 6) {
|
||||
parameters.setProperty(ModelloParameterConstants.ENCODING, args[6]);
|
||||
}
|
||||
+
|
||||
+ if ( args.length > 7 )
|
||||
+ {
|
||||
+ if ( args.length > 7 ) {
|
||||
+ parameters.setProperty( ModelloParameterConstants.DOM_AS_XPP3, args[7] );
|
||||
+ }
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -130,6 +144,6 @@
|
||||
private static void usage()
|
||||
{
|
||||
System.err.println( "Usage: modello <model> <outputType> <output directory> <modelVersion> <packageWithVersion>"
|
||||
- + "<javaSource> [<encoding>]" );
|
||||
+ + " <javaSource> [<encoding> [<domAsXpp3>]]" );
|
||||
@@ -118,6 +122,6 @@
|
||||
|
||||
private static void usage() {
|
||||
System.err.println("Usage: modello <model> <outputType> <output directory> <modelVersion> <packageWithVersion>"
|
||||
- + "<javaSource> [<encoding>]");
|
||||
+ + " <javaSource> [<encoding> [<domAsXpp3>]]" );
|
||||
}
|
||||
}
|
||||
|
@ -19,14 +19,16 @@
|
||||
%global parent modello
|
||||
%global subname maven-plugin
|
||||
Name: %{parent}-%{subname}
|
||||
Version: 2.0.0
|
||||
Version: 2.1.2
|
||||
Release: 0
|
||||
Summary: Modello Maven Plugin
|
||||
License: Apache-2.0 AND MIT
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://codehaus-plexus.github.io/modello/modello-maven-plugin
|
||||
Source0: https://repo1.maven.org/maven2/org/codehaus/%{parent}/%{parent}/%{version}/%{parent}-%{version}-source-release.zip
|
||||
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Source1: https://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Patch0: modello-cli-domasxpp3.patch
|
||||
Patch1: 0001-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: unzip
|
||||
@ -45,7 +47,9 @@ BuildRequires: mvn(org.codehaus.modello:modello-plugin-stax) = %{version}
|
||||
BuildRequires: mvn(org.codehaus.modello:modello-plugin-xdoc) = %{version}
|
||||
BuildRequires: mvn(org.codehaus.modello:modello-plugin-xpp3) = %{version}
|
||||
BuildRequires: mvn(org.codehaus.modello:modello-plugin-xsd) = %{version}
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus:pom:)
|
||||
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api)
|
||||
#!BuildRequires: maven-compiler-plugin-bootstrap
|
||||
#!BuildRequires: maven-jar-plugin-bootstrap
|
||||
@ -75,18 +79,29 @@ API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{parent}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
cp -p %{SOURCE1} LICENSE
|
||||
|
||||
%pom_remove_plugin :maven-site-plugin
|
||||
%pom_remove_plugin :maven-enforcer-plugin
|
||||
|
||||
%pom_remove_dep :plexus-xml modello-core
|
||||
%pom_remove_dep :sisu-guice modello-core
|
||||
%pom_add_dep com.google.inject:guice modello-core
|
||||
|
||||
%pom_remove_dep :jackson-bom
|
||||
|
||||
%pom_disable_module modello-plugin-jackson modello-plugins
|
||||
%pom_disable_module modello-plugin-jsonschema modello-plugins
|
||||
%pom_disable_module modello-plugin-snakeyaml modello-plugins
|
||||
%pom_disable_module modello-plugin-velocity modello-plugins
|
||||
%pom_remove_dep :modello-plugin-jackson modello-maven-plugin
|
||||
%pom_remove_dep :modello-plugin-jsonschema modello-maven-plugin
|
||||
%pom_remove_dep :modello-plugin-snakeyaml modello-maven-plugin
|
||||
%pom_remove_dep :modello-plugin-velocity modello-maven-plugin
|
||||
|
||||
rm -f modello-maven-plugin/src/main/java/org/codehaus/modello/maven/ModelloVelocityMojo.java
|
||||
|
||||
%build
|
||||
pushd %{name}
|
||||
|
25
modello.spec
25
modello.spec
@ -17,16 +17,17 @@
|
||||
|
||||
|
||||
Name: modello
|
||||
Version: 2.0.0
|
||||
Version: 2.1.2
|
||||
Release: 0
|
||||
Summary: Modello Data Model toolkit
|
||||
License: Apache-2.0 AND MIT
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://codehaus-plexus.github.io/modello
|
||||
Source0: https://repo1.maven.org/maven2/org/codehaus/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
||||
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Source1: https://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Source100: %{name}-build.tar.xz
|
||||
Patch0: modello-cli-domasxpp3.patch
|
||||
Patch1: 0001-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: google-guice
|
||||
@ -37,19 +38,13 @@ BuildRequires: junit
|
||||
BuildRequires: plexus-build-api
|
||||
BuildRequires: plexus-classworlds
|
||||
BuildRequires: plexus-compiler
|
||||
BuildRequires: plexus-containers-component-annotations
|
||||
BuildRequires: plexus-utils
|
||||
BuildRequires: sisu-plexus
|
||||
BuildRequires: unzip
|
||||
Requires: guava
|
||||
Requires: javapackages-tools
|
||||
Requires: xbean
|
||||
Requires: mvn(org.codehaus.plexus:plexus-compiler-api)
|
||||
Requires: mvn(org.codehaus.plexus:plexus-compiler-javac)
|
||||
Requires: mvn(org.codehaus.plexus:plexus-utils)
|
||||
Requires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus)
|
||||
Requires: mvn(org.jsoup:jsoup)
|
||||
Requires: mvn(org.sonatype.plexus:plexus-build-api)
|
||||
Requires: mvn(org.sonatype.sisu:sisu-guice::no_aop:)
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -71,24 +66,34 @@ API documentation for %{name}.
|
||||
%prep
|
||||
%setup -q -a100
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
cp -p %{SOURCE1} LICENSE
|
||||
|
||||
%pom_remove_plugin :maven-site-plugin
|
||||
%pom_remove_plugin :maven-enforcer-plugin
|
||||
|
||||
%pom_remove_dep :plexus-xml modello-core
|
||||
%pom_remove_dep :sisu-guice modello-core
|
||||
%pom_add_dep com.google.inject:guice modello-core
|
||||
|
||||
%pom_remove_dep :jackson-bom
|
||||
|
||||
%pom_disable_module modello-plugin-jackson modello-plugins
|
||||
%pom_disable_module modello-plugin-jsonschema modello-plugins
|
||||
%pom_disable_module modello-plugin-snakeyaml modello-plugins
|
||||
%pom_disable_module modello-plugin-velocity modello-plugins
|
||||
%pom_remove_dep :modello-plugin-jackson modello-maven-plugin
|
||||
%pom_remove_dep :modello-plugin-jsonschema modello-maven-plugin
|
||||
%pom_remove_dep :modello-plugin-snakeyaml modello-maven-plugin
|
||||
%pom_remove_dep :modello-plugin-velocity modello-maven-plugin
|
||||
|
||||
rm -f modello-maven-plugin/src/main/java/org/codehaus/modello/maven/ModelloVelocityMojo.java
|
||||
|
||||
%build
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib plexus/classworlds plexus/utils plexus/plexus-build-api \
|
||||
plexus-compiler/plexus-compiler-api plexus-compiler/plexus-compiler-javac \
|
||||
jsoup guava/guava junit org.eclipse.sisu.plexus
|
||||
plexus-containers/plexus-component-annotations jsoup guava/guava junit org.eclipse.sisu.plexus
|
||||
# skip tests because we have too old xmlunit in openSUSE now (1.5)
|
||||
%{ant} \
|
||||
-Dtest.skip=true \
|
||||
|
Loading…
Reference in New Issue
Block a user