Accepting request 1171906 from Java:packages

2.4.0

OBS-URL: https://build.opensuse.org/request/show/1171906
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/modello?expand=0&rev=16
This commit is contained in:
Ana Guerrero 2024-05-05 10:10:36 +00:00 committed by Git OBS Bridge
commit aae5734d7c
10 changed files with 1934 additions and 27 deletions

View File

@ -1,7 +1,7 @@
From 90352d3cd8de0382be73d5ce16b5f9d96469e39c Mon Sep 17 00:00:00 2001
From cc800846da128d795c69142d4ae0c33c0677e943 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
Subject: [PATCH 1/3] Fix ModelloCli after moving from Plexus to JSR330
---
.../java/org/codehaus/modello/Modello.java | 26 ++++++++++++++-----
@ -9,7 +9,7 @@ Subject: [PATCH] Fix ModelloCli after moving from Plexus to JSR330
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
index 00fb7114..0572fce6 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;
@ -20,8 +20,8 @@ index 2b73884f..9e3f8072 100644
-
import java.io.Reader;
import java.io.Writer;
import java.util.Properties;
@@ -31,17 +29,33 @@ import java.util.Properties;
import java.util.Map;
@@ -31,17 +29,33 @@ import java.util.Map;
import org.codehaus.modello.core.ModelloCore;
import org.codehaus.modello.model.Model;
import org.codehaus.modello.model.ModelValidationException;
@ -58,21 +58,21 @@ index 2b73884f..9e3f8072 100644
+ }
}
public void generate(Reader modelReader, String outputType, Properties parameters)
public void generate(Reader modelReader, String outputType, Map<String, Object> 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
index 1b4cd974..a75e4011 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;
@@ -26,7 +26,6 @@ import java.io.File;
import java.util.HashMap;
import java.util.Map;
-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;
@@ -41,7 +40,7 @@ public class ModelloCli {
private static Map<String, Object> parameters;
public static void main(String[] args) throws Exception {
- Modello modello = new DefaultPlexusContainer().lookup(Modello.class);

View File

@ -1,4 +1,4 @@
From fa4864cc12b705ce55f3a01a71096223e920dc21 Mon Sep 17 00:00:00 2001
From 8e04db4d5602a985ef4c5fa72cb862e9b4d6daf4 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
@ -9,10 +9,10 @@ Subject: [PATCH 2/3] Add support for domAsXpp3 and fail if the old Java5
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
index a75e4011..db40052c 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 {
@@ -106,11 +106,24 @@ public class ModelloCli {
System.exit(1);
}
@ -25,19 +25,19 @@ index 19144947..579f56e3 100644
+ System.exit(1);
+ }
+
parameters.setProperty(ModelloParameterConstants.OUTPUT_JAVA_SOURCE, javaSource);
parameters.put(ModelloParameterConstants.OUTPUT_JAVA_SOURCE, javaSource);
if (args.length > 6) {
parameters.setProperty(ModelloParameterConstants.ENCODING, args[6]);
parameters.put(ModelloParameterConstants.ENCODING, args[6]);
}
+
+ if (args.length > 7) {
+ parameters.setProperty(ModelloParameterConstants.DOM_AS_XPP3, args[7]);
+ parameters.put(ModelloParameterConstants.DOM_AS_XPP3, args[7]);
+ }
}
// ----------------------------------------------------------------------
@@ -134,6 +147,6 @@ public class ModelloCli {
@@ -119,6 +132,6 @@ public class ModelloCli {
private static void usage() {
System.err.println("Usage: modello <model> <outputType> <output directory> <modelVersion> <packageWithVersion>"

1849
0003-Fix-Snakeyaml.patch Normal file

File diff suppressed because it is too large Load Diff

View File

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

BIN
modello-2.4.0-source-release.zip (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Sat May 4 12:02:36 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 2.4.0
* New features and improvements
+ Keep license structure
+ Support addition of license header to generated files
+ Make generated code - Java 8 based by default
+ threadsafety
* Bug Fixes
+ Revert snakeyaml to 1.33 (as 2.x is not fully compatible with
1.x). This change is reverted and SnakeYaml fixed by the
0003-Fix-Snakeyaml.patch
- Modified patches:
* 0001-Fix-ModelloCli-after-moving-from-Plexus-to-JSR330.patch
* 0002-Add-support-for-domAsXpp3-and-fail-if-the-old-Java5-.patch
* 0003-Fix-Snakeyaml.patch
+ rediff to changed context
-------------------------------------------------------------------
Fri May 3 16:50:54 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0003-Fix-Snakeyaml.patch
+ patch to fix the modello-plugin-snakeyaml with SnakeYaml 2.2
+ https://github.com/codehaus-plexus/modello/pull/439
-------------------------------------------------------------------
Wed May 1 12:22:05 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.3.0
Version: 2.4.0
Release: 0
Summary: Modello Maven Plugin
License: Apache-2.0 AND MIT
@ -29,6 +29,7 @@ Source0: https://repo1.maven.org/maven2/org/codehaus/%{parent}/%{parent}/
Source1: https://www.apache.org/licenses/LICENSE-2.0.txt
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-Fix-Snakeyaml.patch
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: unzip
@ -84,6 +85,7 @@ 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

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Sat May 4 12:02:36 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 2.4.0
* New features and improvements
+ Keep license structure
+ Support addition of license header to generated files
+ Make generated code - Java 8 based by default
+ threadsafety
* Bug Fixes
+ Revert snakeyaml to 1.33 (as 2.x is not fully compatible with
1.x). This change is reverted and SnakeYaml fixed by the
0003-Fix-Snakeyaml.patch
- Modified patches:
* 0001-Fix-ModelloCli-after-moving-from-Plexus-to-JSR330.patch
* 0002-Add-support-for-domAsXpp3-and-fail-if-the-old-Java5-.patch
* 0003-Fix-Snakeyaml.patch
+ rediff to changed context
-------------------------------------------------------------------
Fri May 3 16:50:54 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* 0003-Fix-Snakeyaml.patch
+ patch to fix the modello-plugin-snakeyaml with SnakeYaml 2.2
+ https://github.com/codehaus-plexus/modello/pull/439
-------------------------------------------------------------------
Wed May 1 12:22:05 UTC 2024 - Fridrich Strba <fstrba@suse.com>
@ -14,7 +41,7 @@ Tue Apr 16 13:04:04 UTC 2024 - Fridrich Strba <fstrba@suse.com>
-------------------------------------------------------------------
Sun Apr 14 06:13:08 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstrem version 2.3.0
- Upgrade to upstream version 2.3.0
* Changes of version 2.3.0
+ Kill off dead Plexus
+ Fix for #366

View File

@ -17,7 +17,7 @@
Name: modello
Version: 2.3.0
Version: 2.4.0
Release: 0
Summary: Modello Data Model toolkit
License: Apache-2.0 AND MIT
@ -28,6 +28,7 @@ Source1: https://www.apache.org/licenses/LICENSE-2.0.txt
Source100: %{name}-build.tar.xz
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-Fix-Snakeyaml.patch
BuildRequires: ant
BuildRequires: atinject
BuildRequires: fdupes
@ -97,6 +98,7 @@ 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