Fridrich Strba 2022-05-13 08:53:40 +00:00 committed by Git OBS Bridge
parent 6f5858d98a
commit 4e6c7fe910
7 changed files with 62 additions and 48 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9fe69873167d68c3f8542722df0ac28a6b755a73f1da8d03aaa36eea47fefaa0
size 923125

BIN
modello-2.0.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,6 +1,22 @@
--- modello-1.9.1/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java 2019-03-15 15:06:08.911975772 +0100
+++ modello-1.9.1/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java 2019-03-15 15:07:02.920265437 +0100
@@ -121,6 +121,11 @@
--- 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] );
}
@ -12,11 +28,11 @@
}
// ----------------------------------------------------------------------
@@ -130,6 +135,6 @@
@@ -130,6 +144,6 @@
private static void usage()
{
System.err.println( "Usage: modello <model> <outputType> <output directory> <modelVersion> <packageWithVersion>"
- + "<useJava5> [<encoding>]" );
+ + " <useJava5> [<encoding> [<domAsXpp3>]]" );
- + "<javaSource> [<encoding>]" );
+ + " <javaSource> [<encoding> [<domAsXpp3>]]" );
}
}

View File

@ -19,7 +19,7 @@
%global parent modello
%global subname maven-plugin
Name: %{parent}-%{subname}
Version: 1.11
Version: 2.0.0
Release: 0
Summary: Modello Maven Plugin
License: Apache-2.0 AND MIT
@ -38,17 +38,13 @@ BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.codehaus.modello:modello-core) = %{version}
BuildRequires: mvn(org.codehaus.modello:modello-plugin-converters) = %{version}
BuildRequires: mvn(org.codehaus.modello:modello-plugin-dom4j) = %{version}
BuildRequires: mvn(org.codehaus.modello:modello-plugin-jackson) = %{version}
BuildRequires: mvn(org.codehaus.modello:modello-plugin-java) = %{version}
BuildRequires: mvn(org.codehaus.modello:modello-plugin-jdom) = %{version}
BuildRequires: mvn(org.codehaus.modello:modello-plugin-jsonschema) = %{version}
BuildRequires: mvn(org.codehaus.modello:modello-plugin-sax) = %{version}
BuildRequires: mvn(org.codehaus.modello:modello-plugin-snakeyaml) = %{version}
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-container-default)
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api)
#!BuildRequires: maven-compiler-plugin-bootstrap
@ -80,23 +76,21 @@ API documentation for %{name}.
%prep
%setup -q -n %{parent}-%{version}
cp -p %{SOURCE1} LICENSE
# We don't generate site; don't pull extra dependencies.
%pom_remove_plugin :maven-site-plugin
# Avoid using Maven 2.x APIs
sed -i s/maven-project/maven-core/ modello-maven-plugin/pom.xml
%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_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
%build
pushd %{name}
%{mvn_build} -f -- \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
-Dmaven.compiler.release=8 \
%endif
-Dmaven.version=3.1.1 -Dsource=8
%{mvn_build} -f -- -Dsource=8
popd
%install

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri May 13 08:52:25 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 2.0.0
- Modified patch:
* Adapt to the change of parameter from useJava5 to javaSource
-------------------------------------------------------------------
Tue Mar 22 14:07:24 UTC 2022 - Fridrich Strba <fstrba@suse.com>

View File

@ -17,7 +17,7 @@
Name: modello
Version: 1.11
Version: 2.0.0
Release: 0
Summary: Modello Data Model toolkit
License: Apache-2.0 AND MIT
@ -29,36 +29,27 @@ Source100: %{name}-build.tar.xz
Patch0: modello-cli-domasxpp3.patch
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: google-guice
BuildRequires: guava
BuildRequires: jackson-annotations
BuildRequires: jackson-core
BuildRequires: jackson-databind
BuildRequires: javapackages-local
BuildRequires: jsoup
BuildRequires: junit
BuildRequires: plexus-build-api
BuildRequires: plexus-classworlds
BuildRequires: plexus-compiler
BuildRequires: plexus-containers-container-default
BuildRequires: plexus-utils
BuildRequires: snakeyaml
BuildRequires: sisu-plexus
BuildRequires: unzip
Requires: guava
# Explicit javapackages-tools requires since modello script uses
# /usr/share/java-utils/java-functions
Requires: javapackages-tools
Requires: xbean
Requires: mvn(com.fasterxml.jackson.core:jackson-annotations)
Requires: mvn(com.fasterxml.jackson.core:jackson-core)
Requires: mvn(com.fasterxml.jackson.core:jackson-databind)
Requires: mvn(junit:junit)
Requires: mvn(org.codehaus.plexus:plexus-compiler-api)
Requires: mvn(org.codehaus.plexus:plexus-compiler-javac)
Requires: mvn(org.codehaus.plexus:plexus-container-default)
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.yaml:snakeyaml)
Requires: mvn(org.sonatype.sisu:sisu-guice::no_aop:)
BuildArch: noarch
%description
@ -81,17 +72,23 @@ API documentation for %{name}.
%setup -q -a100
%patch0 -p1
cp -p %{SOURCE1} LICENSE
# We don't generate site; don't pull extra dependencies.
%pom_remove_plugin :maven-site-plugin
# Avoid using Maven 2.x APIs
sed -i s/maven-project/maven-core/ modello-maven-plugin/pom.xml
%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_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
%build
mkdir -p lib
build-jar-repository -s lib plexus/classworlds plexus/utils plexus/plexus-build-api \
plexus-containers/plexus-container-default plexus-compiler/plexus-compiler-api junit \
plexus-compiler/plexus-compiler-javac jsoup snakeyaml guava/guava xbean/xbean-reflect \
jackson-core jackson-annotations jackson-databind
plexus-compiler/plexus-compiler-api plexus-compiler/plexus-compiler-javac \
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 \
@ -105,7 +102,7 @@ for i in core test; do
install -pm 0644 %{name}-${i}/target/%{name}-${i}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}-${i}.jar
done
for i in converters dom4j java jdom sax snakeyaml stax xdoc xml xpp3 xsd jackson jsonschema; do
for i in converters dom4j java jdom sax stax xdoc xml xpp3 xsd; do
install -pm 0644 %{name}-plugins/%{name}-plugin-${i}/target/%{name}-plugin-${i}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}-plugin-${i}.jar
done
@ -123,7 +120,7 @@ for i in core test; do
%add_maven_depmap %{name}/%{name}-${i}.pom %{name}/%{name}-${i}.jar
done
for i in converters dom4j java jdom sax snakeyaml stax xdoc xml xpp3 xsd jackson jsonschema; do
for i in converters dom4j java jdom sax stax xdoc xml xpp3 xsd; do
install -pm 0644 %{name}-plugins/%{name}-plugin-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}-plugin-${i}.pom
%add_maven_depmap %{name}/%{name}-plugin-${i}.pom %{name}/%{name}-plugin-${i}.jar
done
@ -136,7 +133,7 @@ for i in core test; do
cp -pr %{name}-${i}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/%{name}-${i}/
done
for i in converters dom4j java jdom sax snakeyaml stax xdoc xml xpp3 xsd jackson jsonschema; do
for i in converters dom4j java jdom sax stax xdoc xml xpp3 xsd; do
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}/%{name}-plugin-${i}
cp -pr %{name}-plugins/%{name}-plugin-${i}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/%{name}-plugin-${i}/
done
@ -144,7 +141,7 @@ done
%fdupes -s %{buildroot}%{_javadocdir}
# script
%jpackage_script org.codehaus.modello.ModelloCli "" "" modello:plexus-containers/plexus-container-default:plexus/classworlds:plexus/utils:plexus/plexus-build-api:xbean/xbean-reflect:guava %{name} true
%jpackage_script org.codehaus.modello.ModelloCli "" "" modello:org.eclipse.sisu.plexus:org.eclipse.sisu.inject:google-guice-no_aop:atinject:plexus-containers/plexus-component-annotations:plexus/classworlds:plexus/utils:plexus/plexus-build-api:guava:plexus-compiler/plexus-compiler-api:plexus-compiler/plexus-compiler-javac %{name} true
%files -f .mfiles
%license LICENSE