Accepting request 1167612 from Java:packages

2.3.0

OBS-URL: https://build.opensuse.org/request/show/1167612
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/modello?expand=0&rev=13
This commit is contained in:
Ana Guerrero 2024-04-15 18:17:06 +00:00 committed by Git OBS Bridge
commit 4d2392707b
11 changed files with 265 additions and 142 deletions

View File

@ -0,0 +1,85 @@
From 90352d3cd8de0382be73d5ce16b5f9d96469e39c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Sat, 13 Apr 2024 15:14:24 +0200
Subject: [PATCH] Fix ModelloCli after moving from Plexus to JSR330
---
.../java/org/codehaus/modello/Modello.java | 26 ++++++++++++++-----
.../java/org/codehaus/modello/ModelloCli.java | 3 +--
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/modello-core/src/main/java/org/codehaus/modello/Modello.java b/modello-core/src/main/java/org/codehaus/modello/Modello.java
index 2b73884f..9e3f8072 100644
--- a/modello-core/src/main/java/org/codehaus/modello/Modello.java
+++ b/modello-core/src/main/java/org/codehaus/modello/Modello.java
@@ -22,8 +22,6 @@ package org.codehaus.modello;
* SOFTWARE.
*/
-import javax.inject.Inject;
-
import java.io.Reader;
import java.io.Writer;
import java.util.Properties;
@@ -31,17 +29,33 @@ import java.util.Properties;
import org.codehaus.modello.core.ModelloCore;
import org.codehaus.modello.model.Model;
import org.codehaus.modello.model.ModelValidationException;
+import org.codehaus.plexus.ContainerConfiguration;
+import org.codehaus.plexus.DefaultContainerConfiguration;
+import org.codehaus.plexus.DefaultPlexusContainer;
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainer;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
*/
public class Modello {
- private final ModelloCore core;
+ private PlexusContainer container;
+
+ private ModelloCore core;
+
+ public Modello() throws ModelloException {
+ try {
+ ContainerConfiguration configuration = new DefaultContainerConfiguration();
+ configuration.setAutoWiring(true);
+ configuration.setClassPathScanning(PlexusConstants.SCANNING_INDEX);
+
+ container = new DefaultPlexusContainer(configuration);
- @Inject
- public Modello(ModelloCore core) {
- this.core = core;
+ core = (ModelloCore) container.lookup(ModelloCore.ROLE);
+ } catch (Exception ex) {
+ throw new ModelloException("Error while starting plexus.", ex);
+ }
}
public void generate(Reader modelReader, String outputType, Properties parameters)
diff --git a/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java b/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java
index ba8f029f..e9c9e079 100644
--- a/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java
+++ b/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java
@@ -25,7 +25,6 @@ package org.codehaus.modello;
import java.io.File;
import java.util.Properties;
-import org.codehaus.plexus.DefaultPlexusContainer;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.XmlStreamReader;
@@ -40,7 +39,7 @@ public class ModelloCli {
private static Properties parameters;
public static void main(String[] args) throws Exception {
- Modello modello = new DefaultPlexusContainer().lookup(Modello.class);
+ Modello modello = new Modello();
parseArgumentsFromCommandLine(args);
--
2.44.0

View File

@ -0,0 +1,50 @@
From fa4864cc12b705ce55f3a01a71096223e920dc21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Fri, 12 Apr 2024 09:37:47 +0200
Subject: [PATCH 2/3] Add support for domAsXpp3 and fail if the old Java5
parameter is used
---
.../java/org/codehaus/modello/ModelloCli.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java b/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java
index 19144947..579f56e3 100644
--- a/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java
+++ b/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java
@@ -121,11 +121,24 @@ public class ModelloCli {
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);
if (args.length > 6) {
parameters.setProperty(ModelloParameterConstants.ENCODING, args[6]);
}
+
+ if (args.length > 7) {
+ parameters.setProperty(ModelloParameterConstants.DOM_AS_XPP3, args[7]);
+ }
}
// ----------------------------------------------------------------------
@@ -134,6 +147,6 @@ public class ModelloCli {
private static void usage() {
System.err.println("Usage: modello <model> <outputType> <output directory> <modelVersion> <packageWithVersion>"
- + "<javaSource> [<encoding>]");
+ + " <javaSource> [<encoding> [<domAsXpp3>]]");
}
}
--
2.44.0

View File

@ -1,23 +1,22 @@
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)"
From 5dd8c6daa70e8f22fa12b026e4474d8bf4e2c4d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Tue, 9 Apr 2024 14:37:06 +0200
Subject: [PATCH 3/3] 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(-)
modello-core/pom.xml | 3 +--
.../org/codehaus/modello/plugin/AbstractModelloGenerator.java | 2 +-
modello-maven-plugin/pom.xml | 2 +-
.../codehaus/modello/maven/AbstractModelloGeneratorMojo.java | 2 +-
.../org/codehaus/modello/maven/ModelloConvertersMojoTest.java | 2 +-
.../java/org/codehaus/modello/maven/ModelloJavaMojoTest.java | 2 +-
modello-plugins/modello-plugin-java/pom.xml | 2 +-
pom.xml | 4 ++--
8 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/modello-core/pom.xml b/modello-core/pom.xml
index 636c03fe..7f9adf39 100644
index 1b0f2258..51970394 100644
--- a/modello-core/pom.xml
+++ b/modello-core/pom.xml
@@ -13,7 +13,7 @@
@ -29,31 +28,36 @@ index 636c03fe..7f9adf39 100644
<artifactId>plexus-build-api</artifactId>
</dependency>
<dependency>
@@ -25,7 +25,6 @@
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-guice</artifactId>
<classifier>no_aop</classifier>
- <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
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
index a297210d..ffa6ae27 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;
@@ -43,11 +43,11 @@ import org.codehaus.modello.model.ModelClass;
import org.codehaus.modello.model.ModelDefault;
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
+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
index 0a842b8f..8d0fb29a 100644
--- a/modello-maven-plugin/pom.xml
+++ b/modello-maven-plugin/pom.xml
@@ -121,7 +121,7 @@
@@ -116,7 +116,7 @@
<artifactId>modello-plugin-velocity</artifactId>
</dependency>
<dependency>
@ -61,7 +65,7 @@ index 3687fb05..57227449 100644
+ <groupId>org.sonatype.plexus</groupId>
<artifactId>plexus-build-api</artifactId>
</dependency>
</dependencies>
<dependency>
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
@ -77,14 +81,12 @@ index 762b5784..51b75a12 100644
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;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
index 92adde1f..2e747a98 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;
@@ -29,8 +29,8 @@ import org.apache.maven.project.MavenProject;
import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.plexus.ContainerConfiguration;
import org.codehaus.plexus.ContainerConfiguration;
import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.build.BuildContext;
import org.codehaus.plexus.util.FileUtils;
@ -92,25 +94,13 @@ index 779f178d..23f466d3 100644
/**
* @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
index ef234cac..64589165 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;
@@ -29,8 +29,8 @@ import org.apache.maven.project.MavenProject;
import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.plexus.ContainerConfiguration;
import org.codehaus.plexus.ContainerConfiguration;
import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.build.BuildContext;
import org.codehaus.plexus.util.FileUtils;
@ -118,18 +108,8 @@ index f15b4031..bb5bb7cf 100644
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;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
index 46f5f68b..d40b53cd 100644
--- a/modello-plugins/modello-plugin-java/pom.xml
+++ b/modello-plugins/modello-plugin-java/pom.xml
@@ -17,7 +17,7 @@
@ -141,34 +121,12 @@ index ea94c3c6..6ba7c01f 100644
<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
index 4ae44cec..59af89cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -347,9 +347,9 @@
<version>4.0.0</version>
@@ -316,9 +316,9 @@
<version>3.0.0</version>
</dependency>
<dependency>
- <groupId>org.codehaus.plexus</groupId>
@ -178,7 +136,7 @@ index 88f8ed6f..9a4ac6df 100644
+ <version>0.0.7</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<groupId>org.slf4j</groupId>
--
2.41.0
2.44.0

BIN
modello-2.1.2-source-release.zip (Stored with Git LFS)

Binary file not shown.

View File

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

BIN
modello-build.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,35 +0,0 @@
--- modello-2.1.2/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-05 12:10:26.198361088 +0200
@@ -105,11 +105,24 @@
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);
if (args.length > 6) {
parameters.setProperty(ModelloParameterConstants.ENCODING, args[6]);
}
+
+ if ( args.length > 7 ) {
+ parameters.setProperty( ModelloParameterConstants.DOM_AS_XPP3, args[7] );
+ }
}
// ----------------------------------------------------------------------
@@ -118,6 +131,6 @@
private static void usage() {
System.err.println("Usage: modello <model> <outputType> <output directory> <modelVersion> <packageWithVersion>"
- + "<javaSource> [<encoding>]");
+ + " <javaSource> [<encoding> [<domAsXpp3>]]" );
}
}

View File

@ -1,3 +1,34 @@
-------------------------------------------------------------------
Sun Apr 14 06:13:08 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstrem version 2.3.0
* Changes of version 2.3.0
+ Kill off dead Plexus
+ Fix for #366
* Changes of version 2.2.0
+ Parse javadoc tags in xdoc generator (only @since is supported
atm)
+ Use generic in Xpp3Reader for JDK 5+
+ Get rid of usage deprecated Reader/WriterFactory
+ Make spotless plugin work with Java 21
+ Support java source property being discovered as 1.x
+ Fix thread safety issues by not using singletons for
generators
+ Improve discovering javaSource based on maven.compiler
properties, default as 8
+ Switch Plexus Annotation to JSR-330
+ Make spotless plugin work with Java 21
- Modified patches:
* 0001-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
-> 0003-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
* modello-cli-domasxpp3.patch ->
0002-Add-support-for-domAsXpp3-and-fail-if-the-old-Java5-.patch
+ rediff to changed context
- Added patch:
* 0001-Fix-ModelloCli-after-moving-from-Plexus-to-JSR330.patch
+ Fix for https://github.com/codehaus-plexus/modello/issues/434
submitted upstream
-------------------------------------------------------------------
Tue Apr 2 17:32:17 UTC 2024 - Fridrich Strba <fstrba@suse.com>

View File

@ -19,7 +19,7 @@
%global parent modello
%global subname maven-plugin
Name: %{parent}-%{subname}
Version: 2.1.2
Version: 2.3.0
Release: 0
Summary: Modello Maven Plugin
License: Apache-2.0 AND MIT
@ -27,8 +27,9 @@ 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: 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
Patch0: 0001-Fix-ModelloCli-after-moving-from-Plexus-to-JSR330.patch
Patch1: 0002-Add-support-for-domAsXpp3-and-fail-if-the-old-Java5-.patch
Patch2: 0003-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: unzip
@ -47,7 +48,6 @@ 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)
@ -81,10 +81,12 @@ API documentation for %{name}.
%setup -q -n %{parent}-%{version}
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
cp -p %{SOURCE1} LICENSE
%pom_remove_plugin :maven-site-plugin
%pom_remove_plugin :maven-enforcer-plugin
%pom_remove_plugin :sisu-maven-plugin
%pom_remove_dep :plexus-xml modello-core
%pom_remove_dep :sisu-guice modello-core

View File

@ -1,3 +1,34 @@
-------------------------------------------------------------------
Sun Apr 14 06:13:08 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstrem version 2.3.0
* Changes of version 2.3.0
+ Kill off dead Plexus
+ Fix for #366
* Changes of version 2.2.0
+ Parse javadoc tags in xdoc generator (only @since is supported
atm)
+ Use generic in Xpp3Reader for JDK 5+
+ Get rid of usage deprecated Reader/WriterFactory
+ Make spotless plugin work with Java 21
+ Support java source property being discovered as 1.x
+ Fix thread safety issues by not using singletons for
generators
+ Improve discovering javaSource based on maven.compiler
properties, default as 8
+ Switch Plexus Annotation to JSR-330
+ Make spotless plugin work with Java 21
- Modified patches:
* 0001-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
-> 0003-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
* modello-cli-domasxpp3.patch ->
0002-Add-support-for-domAsXpp3-and-fail-if-the-old-Java5-.patch
+ rediff to changed context
- Added patch:
* 0001-Fix-ModelloCli-after-moving-from-Plexus-to-JSR330.patch
+ Fix for https://github.com/codehaus-plexus/modello/issues/434
submitted upstream
-------------------------------------------------------------------
Tue Apr 2 17:32:12 UTC 2024 - Fridrich Strba <fstrba@suse.com>

View File

@ -17,7 +17,7 @@
Name: modello
Version: 2.1.2
Version: 2.3.0
Release: 0
Summary: Modello Data Model toolkit
License: Apache-2.0 AND MIT
@ -26,28 +26,33 @@ URL: https://codehaus-plexus.github.io/modello
Source0: https://repo1.maven.org/maven2/org/codehaus/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip
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
Patch0: 0001-Fix-ModelloCli-after-moving-from-Plexus-to-JSR330.patch
Patch1: 0002-Add-support-for-domAsXpp3-and-fail-if-the-old-Java5-.patch
Patch2: 0003-Revert-Switch-to-codehaus-plexus-build-api-1.2.0-345.patch
BuildRequires: ant
BuildRequires: aopalliance
BuildRequires: atinject
BuildRequires: fdupes
BuildRequires: google-guice
BuildRequires: guava
BuildRequires: javadoc-parser
BuildRequires: javapackages-local >= 6
BuildRequires: jsoup
BuildRequires: objectweb-asm
BuildRequires: plexus-build-api
BuildRequires: plexus-classworlds
BuildRequires: plexus-containers-component-annotations
BuildRequires: plexus-metadata-generator
BuildRequires: plexus-utils
BuildRequires: plexus-xml
BuildRequires: sisu-inject
BuildRequires: sisu-plexus
BuildRequires: slf4j
BuildRequires: unzip
Requires: aopalliance
Requires: atinject
Requires: google-guice
Requires: guava
Requires: javadoc-parser
Requires: javapackages-tools
Requires: plexus-build-api
Requires: plexus-classworlds
@ -56,6 +61,7 @@ Requires: plexus-utils
Requires: plexus-xml
Requires: sisu-inject
Requires: sisu-plexus
Requires: slf4j
BuildArch: noarch
%description
@ -78,17 +84,15 @@ API documentation for %{name}.
%setup -q -a100
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -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_add_dep org.codehaus.plexus:plexus-xml:3.0.0 modello-core
%pom_remove_dep :jackson-bom
%pom_disable_module modello-plugin-jackson modello-plugins
@ -109,12 +113,10 @@ mkdir -p lib
build-jar-repository -s lib \
aopalliance \
atinject \
commons-cli \
guava/guava \
guice/google-guice \
jdom2/jdom2 \
javadoc-parser \
jsoup \
objectweb-asm/asm \
org.eclipse.sisu.inject \
org.eclipse.sisu.plexus \
plexus/classworlds \
@ -123,8 +125,7 @@ build-jar-repository -s lib \
plexus/utils \
plexus/xml \
plexus-containers/plexus-component-annotations \
plexus-metadata-generator \
qdox
slf4j/api
%{ant} \
-Dtest.skip=true \
@ -171,7 +172,7 @@ done
%fdupes -s %{buildroot}%{_javadocdir}
# script
%jpackage_script org.codehaus.modello.ModelloCli "" "" modello:org.eclipse.sisu.plexus:org.eclipse.sisu.inject:google-guice:aopalliance:atinject:plexus-containers/plexus-component-annotations:plexus/classworlds:plexus/utils:plexus/xml:plexus/plexus-build-api:guava %{name} true
%jpackage_script org.codehaus.modello.ModelloCli "" "" modello:objectweb-asm:org.eclipse.sisu.plexus:org.eclipse.sisu.inject:javadoc-parser:google-guice:aopalliance:atinject:plexus-containers/plexus-component-annotations:plexus/classworlds:plexus/utils:plexus/xml:plexus/plexus-build-api:guava:slf4j/api:slf4j/simple %{name} true
%files -f .mfiles
%license LICENSE