From b7ff5c14cd1c868f7cb73c815fea64c258e889a729a3986c32aca4db68113ac5 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 29 Sep 2024 11:07:52 +0000 Subject: [PATCH 1/3] OBS-URL: https://build.opensuse.org/package/show/Java:packages/modello?expand=0&rev=60 --- .gitattributes | 23 + .gitignore | 1 + 0001-Upgrade-to-SnakeYaml-2.2-439.patch | 1850 +++++++++++++++++ ...-build-get-rid-of-legacy-fix-CLI-452.patch | 351 ++++ ...domAsXpp3-and-fail-if-the-old-Java5-.patch | 50 + LICENSE-2.0.txt | 202 ++ _multibuild | 4 + modello-2.4.0-source-release.zip | 3 + modello-build.tar.xz | 3 + modello-maven-plugin.changes | 275 +++ modello-maven-plugin.spec | 119 ++ modello.changes | 304 +++ modello.spec | 179 ++ 13 files changed, 3364 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Upgrade-to-SnakeYaml-2.2-439.patch create mode 100644 0002-Update-build-get-rid-of-legacy-fix-CLI-452.patch create mode 100644 0003-Add-support-for-domAsXpp3-and-fail-if-the-old-Java5-.patch create mode 100644 LICENSE-2.0.txt create mode 100644 _multibuild create mode 100644 modello-2.4.0-source-release.zip create mode 100644 modello-build.tar.xz create mode 100644 modello-maven-plugin.changes create mode 100644 modello-maven-plugin.spec create mode 100644 modello.changes create mode 100644 modello.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Upgrade-to-SnakeYaml-2.2-439.patch b/0001-Upgrade-to-SnakeYaml-2.2-439.patch new file mode 100644 index 0000000..d915066 --- /dev/null +++ b/0001-Upgrade-to-SnakeYaml-2.2-439.patch @@ -0,0 +1,1850 @@ +From c6747419bf16f55b92a2d0eec2e87da09d9a1507 Mon Sep 17 00:00:00 2001 +From: Tamas Cservenak +Date: Wed, 29 May 2024 18:51:31 +0200 +Subject: [PATCH 1/3] Upgrade to SnakeYaml 2.2 (#439) + +Upgrade to SnakeYaml 2.2 +--- + .../modello-plugin-snakeyaml/pom.xml | 10 +- + .../snakeyaml/SnakeYamlReaderGenerator.java | 16 +- + .../snakeyaml/SnakeYamlWriterGenerator.java | 4 +- + .../snakeyaml/SnakeYamlGeneratorTest.java | 50 + + .../src/test/resources/models/maven.mdo | 1668 +++++++++++++++++ + 5 files changed, 1744 insertions(+), 4 deletions(-) + create mode 100644 modello-plugins/modello-plugin-snakeyaml/src/test/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlGeneratorTest.java + create mode 100644 modello-plugins/modello-plugin-snakeyaml/src/test/resources/models/maven.mdo + +diff --git a/modello-plugins/modello-plugin-snakeyaml/pom.xml b/modello-plugins/modello-plugin-snakeyaml/pom.xml +index 656a26fa..418654cc 100644 +--- a/modello-plugins/modello-plugin-snakeyaml/pom.xml ++++ b/modello-plugins/modello-plugin-snakeyaml/pom.xml +@@ -24,7 +24,15 @@ + + org.yaml + snakeyaml +- 1.33 ++ 2.2 + + ++ ++ ++ ++ ++ maven-dependency-plugin ++ ++ ++ + +diff --git a/modello-plugins/modello-plugin-snakeyaml/src/main/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlReaderGenerator.java b/modello-plugins/modello-plugin-snakeyaml/src/main/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlReaderGenerator.java +index d53a40a5..532afe6e 100644 +--- a/modello-plugins/modello-plugin-snakeyaml/src/main/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlReaderGenerator.java ++++ b/modello-plugins/modello-plugin-snakeyaml/src/main/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlReaderGenerator.java +@@ -210,7 +210,7 @@ public class SnakeYamlReaderGenerator extends AbstractSnakeYamlGenerator { + + sc = unmarshall.getSourceCode(); + +- sc.add("Parser parser = new ParserImpl( new StreamReader( reader ) );"); ++ sc.add("Parser parser = new ParserImpl( new StreamReader( reader ), new LoaderOptions() );"); + + sc.add("return " + readerMethodName + "( parser, strict );"); + +@@ -288,6 +288,7 @@ public class SnakeYamlReaderGenerator extends AbstractSnakeYamlGenerator { + jClass.addImport("org.yaml.snakeyaml.parser.ParserException"); + jClass.addImport("org.yaml.snakeyaml.parser.ParserImpl"); + jClass.addImport("org.yaml.snakeyaml.reader.StreamReader"); ++ jClass.addImport("org.yaml.snakeyaml.LoaderOptions"); + jClass.addImport("java.io.InputStream"); + jClass.addImport("java.io.InputStreamReader"); + jClass.addImport("java.io.IOException"); +@@ -820,6 +821,8 @@ public class SnakeYamlReaderGenerator extends AbstractSnakeYamlGenerator { + + sc = method.getSourceCode(); + ++ sc.add("if (!(event instanceof ScalarEvent))"); ++ sc.addIndented("return false;"); + sc.add("String currentName = ( (ScalarEvent) event ).getValue();"); + + sc.add(""); +@@ -855,9 +858,17 @@ public class SnakeYamlReaderGenerator extends AbstractSnakeYamlGenerator { + + sc.add("if ( strict )"); + ++ sc.add("{"); ++ sc.indent(); ++ sc.add("if ( event instanceof ScalarEvent )"); + sc.add("{"); + sc.addIndented( + "throw new ParserException( \"Unrecognised tag: '\" + ( (ScalarEvent) event ).getValue() + \"'\", event.getStartMark(), \"\", null );"); ++ sc.add("} else {"); ++ sc.addIndented( ++ "return ; // throw new ParserException( \"Unrecognised : '\" + event.getEventId() + \"'\", event.getStartMark(), \"\", null );"); ++ sc.add("}"); ++ sc.unindent(); + sc.add("}"); + + sc.add(""); +@@ -1041,7 +1052,8 @@ public class SnakeYamlReaderGenerator extends AbstractSnakeYamlGenerator { + return; + } + +- String constr = "new " + locationTracker.getName() + "( parser.getLineNumber(), parser.getColumnNumber()"; ++ String constr = "new " + locationTracker.getName() ++ + "( parser.peekEvent().getStartMark().getLine(), parser.peekEvent().getStartMark().getColumn()"; + constr += (sourceTracker != null) ? ", " + SOURCE_PARAM : ""; + constr += " )"; + +diff --git a/modello-plugins/modello-plugin-snakeyaml/src/main/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlWriterGenerator.java b/modello-plugins/modello-plugin-snakeyaml/src/main/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlWriterGenerator.java +index cd1a5f9d..00da62ff 100644 +--- a/modello-plugins/modello-plugin-snakeyaml/src/main/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlWriterGenerator.java ++++ b/modello-plugins/modello-plugin-snakeyaml/src/main/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlWriterGenerator.java +@@ -74,6 +74,7 @@ public class SnakeYamlWriterGenerator extends AbstractSnakeYamlGenerator { + + JClass jClass = new JClass(packageName + '.' + marshallerName); + initHeader(jClass); ++ suppressAllWarnings(objectModel, jClass); + + jClass.addImport("org.yaml.snakeyaml.DumperOptions"); + jClass.addImport("org.yaml.snakeyaml.DumperOptions.Version"); +@@ -290,7 +291,8 @@ public class SnakeYamlWriterGenerator extends AbstractSnakeYamlGenerator { + sc.indent(); + + writeScalarKey(sc, fieldTagName); +- sc.add("generator.emit( new SequenceStartEvent( null, null, true, null, null, false ) );"); ++ sc.add( ++ "generator.emit( new SequenceStartEvent( null, null, true, null, null, FlowStyle.AUTO ) );"); + + sc.add("for ( " + toType + " o : " + value + " )"); + +diff --git a/modello-plugins/modello-plugin-snakeyaml/src/test/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlGeneratorTest.java b/modello-plugins/modello-plugin-snakeyaml/src/test/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlGeneratorTest.java +new file mode 100644 +index 00000000..a9bb50fb +--- /dev/null ++++ b/modello-plugins/modello-plugin-snakeyaml/src/test/java/org/codehaus/modello/plugin/snakeyaml/SnakeYamlGeneratorTest.java +@@ -0,0 +1,50 @@ ++package org.codehaus.modello.plugin.snakeyaml; ++ ++/* ++ * Copyright (c) 2004, Codehaus.org ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy of ++ * this software and associated documentation files (the "Software"), to deal in ++ * the Software without restriction, including without limitation the rights to ++ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies ++ * of the Software, and to permit persons to whom the Software is furnished to do ++ * so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in all ++ * copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++import java.util.Map; ++ ++import org.codehaus.modello.AbstractModelloJavaGeneratorTest; ++import org.codehaus.modello.core.ModelloCore; ++import org.codehaus.modello.model.Model; ++ ++public class SnakeYamlGeneratorTest extends AbstractModelloJavaGeneratorTest { ++ public SnakeYamlGeneratorTest() { ++ super("snakeyaml"); ++ } ++ ++ public void testYamlGenerator() throws Throwable { ++ ModelloCore modello = (ModelloCore) lookup(ModelloCore.ROLE); ++ ++ Model model = modello.loadModel(getXmlResourceReader("/models/maven.mdo")); ++ ++ Map parameters = getModelloParameters("4.0.0"); ++ ++ modello.generate(model, "java", parameters); ++ modello.generate(model, "snakeyaml-writer", parameters); ++ modello.generate(model, "snakeyaml-reader", parameters); ++ ++ addDependency("org.yaml", "snakeyaml"); ++ compileGeneratedSources(); ++ } ++} +diff --git a/modello-plugins/modello-plugin-snakeyaml/src/test/resources/models/maven.mdo b/modello-plugins/modello-plugin-snakeyaml/src/test/resources/models/maven.mdo +new file mode 100644 +index 00000000..4ebfc768 +--- /dev/null ++++ b/modello-plugins/modello-plugin-snakeyaml/src/test/resources/models/maven.mdo +@@ -0,0 +1,1668 @@ ++ ++ ++ maven ++ Maven ++ ++ ++ ++ package ++ org.codehaus.modello.test.model ++ ++ ++ ++ ++ Model ++ 3.0.0+ ++ ++ ++ extend ++ 3.0.0+ ++ ++ String ++ ++ ++ parent ++ 4.0.0 ++ ++ ++ Parent ++ ++ ++ ++ ++ modelVersion ++ 4.0.0 ++ true ++ ++ String ++ ++ ++ pomVersion ++ 3.0.0 ++ true ++ String ++ ++ ++ id ++ 3.0.0 ++ true ++ ++ String ++ ++ ++ groupId ++ 3.0.0+ ++ true ++ ++ String ++ ++ ++ artifactId ++ 3.0.0+ ++ true ++ ++ String ++ ++ ++ type ++ 4.0.0 ++ ++ String ++ jar ++ ++ ++ name ++ 3.0.0+ ++ true ++ ++ String ++ ++ ++ currentVersion ++ 3.0.0 ++ true ++ String ++ ++ ++ version ++ 4.0.0 ++ true ++ ++ String ++ ++ ++ shortDescription ++ 3.0.0+ ++ ++ String ++ ++ ++ description ++ 3.0.0+ ++ front page ++ of the project's web site. ++ ]]> ++ String ++ ++ ++ url ++ 3.0.0+ ++ ++ String ++ ++ ++ logo ++ 3.0.0+ ++ ++ String ++ ++ ++ issueTrackingUrl ++ 3.0.0 ++ ++ ++ String ++ ++ ++ issueManagement ++ 4.0.0 ++ ++ ++ IssueManagement ++ ++ ++ ++ ciManagement ++ 4.0.0 ++ ++ ++ CiManagement ++ ++ ++ ++ inceptionYear ++ 3.0.0+ ++ true ++ ++ String ++ ++ ++ gumpRepositoryId ++ 3.0.0 ++ ++ String ++ ++ ++ siteAddress ++ 3.0.0 ++ ++ String ++ ++ ++ siteDirectory ++ 3.0.0 ++ ++ ++ String ++ ++ ++ distributionSite ++ 3.0.0 ++ ++ String ++ This naming is inconsistent and distribution should occur from a repository structure. ++ ++ ++ distributionDirectory ++ 3.0.0 ++ ++ ++ String ++ This naming is inconsistent and distribution should occur from a repository structure. ++ ++ ++ ++ repositories ++ 4.0.0 ++ ++ ++ Repository ++ * ++ ++ ++ ++ pluginRepositories ++ 4.0.0 ++ ++ ++ Repository ++ * ++ ++ This may be removed or relocated in the near future. It is undecided whether plugins really need a ++ remote repository set of their own. ++ ++ ++ mailingLists ++ 3.0.0+ ++ ++ ++ MailingList ++ * ++ ++ ++ ++ developers ++ 3.0.0+ ++ developer element, which is then described by ++ additional elements (described below). The auto-generated site ++ documentation references this information. ++ ]]> ++ ++ Developer ++ * ++ ++ ++ ++ contributors ++ 3.0.0+ ++ contributor element, which is then describe by additional ++ elements (described below). The auto-generated site documentation ++ references this information. ++ ]]> ++ ++ Contributor ++ * ++ ++ ++ ++ dependencies ++ 3.0.0+ ++ dependency element, which is then described by ++ additional elements (described below). ++ ]]> ++ ++ Dependency ++ * ++ ++ These should ultimately only be compile time dependencies when transitive dependencies come into ++ play. ++ ++ ++ overrides ++ 4.0.0 ++ override element, which is then described by ++ additional elements (described below). ++ ]]> ++ ++ Override ++ * ++ ++ ++ ++ licenses ++ 3.0.0+ ++ license element, which is then describe by additional ++ elements (described below). The auto-generated site documentation ++ references this information. Projects should only list the license(s) that ++ applies to the project and not the licenses that apply to dependencies. ++ ]]> ++ ++ License ++ * ++ ++ ++ ++ versions ++ 3.0.0 ++ ++ ++ Version ++ * ++ ++ ++ ++ branches ++ 3.0.0 ++ ++ ++ Branch ++ * ++ ++ ++ ++ packageGroups ++ 3.0.0+ ++ ++ ++ PackageGroup ++ * ++ ++ ++ ++ reports ++ 3.0.0+ ++ maven site. All of the ++ reports will be included in the navigation bar for browsing in ++ the order they are specified. ++ ]]> ++ ++ String ++ * ++ ++ ++ ++ scm ++ 4.0.0 ++ ++ ++ Scm ++ ++ ++ ++ repository ++ 3.0.0 ++ ++ ++ Repository ++ ++ This element needs to be renamed as it conflicts with the existing notion of repositories in ++ Maven. ++ ++ ++ build ++ 3.0.0+ ++ true ++ ++ ++ Build ++ ++ ++ ++ organization ++ 3.0.0+ ++ ++ ++ Organization ++ ++ ++ ++ distributionManagement ++ 4.0.0 ++ ++ ++ DistributionManagement ++ ++ ++ ++ local ++ 4.0.0 ++ false ++ ++ ++ Local ++ ++ ++ ++ ++ properties ++ 3.0.0+ ++ ++ Properties ++ ++ String ++ * ++ ++ ++ ++ preGoals ++ 4.0.0 ++ ++ ++ PreGoal ++ * ++ ++ ++ ++ postGoals ++ 4.0.0 ++ ++ ++ PostGoal ++ * ++ ++ ++ ++ ++ ++ ++ ++ 3.0.0 ++ ++ public void setVersion(String version) ++ { ++ this.currentVersion = version; ++ } ++ ++ public String getVersion() ++ { ++ return currentVersion; ++ } ++ ++ ++ ++ 3.0.0+ ++ ++ private String packageName; ++ ++ public void setPackage(String packageName) ++ { ++ this.packageName = packageName; ++ } ++ ++ public String getPackage() ++ { ++ return packageName; ++ } ++ ++ ++ ++ 4.0.0 ++ ++ public String getId() ++ { ++ StringBuilder id = new StringBuilder(); ++ ++ id.append( getGroupId() ); ++ id.append( ":" ); ++ id.append( getArtifactId() ); ++ id.append( ":" ); ++ id.append( getType() ); ++ id.append( ":" ); ++ id.append( getVersion() ); ++ ++ return id.toString(); ++ } ++ ++ ++ ++ ++ ++ ++ Branch ++ 3.0.0+ ++ tag ++ element ++ ]]> ++ ++ ++ tag ++ 3.0.0+ ++ true ++ ++ String ++ ++ ++ description ++ 4.0.0 ++ ++ String ++ ++ ++ lastMergeTag ++ 4.0.0 ++ ++ String ++ ++ ++ ++ ++ Build ++ 3.0.0+ ++ ++ ++ nagEmailAddress ++ 3.0.0 ++ maven:gump-descriptor ++ target. ++ ]]> ++ String ++ This should be moved out of the build section. Vestigal for use with Gump. ++ ++ ++ sourceDirectory ++ 3.0.0+ ++ true ++ ++ String ++ ++ ++ unitTestSourceDirectory ++ 3.0.0+ ++ true ++ ++ String ++ ++ ++ aspectSourceDirectory ++ 3.0.0+ ++ Aspectj goals document). ++ The path given is relative to the project descriptor. ++ ]]> ++ String ++ ++ ++ integrationUnitTestSourceDirectory ++ 3.0.0+ ++ ++ String ++ ++ ++ sourceModifications ++ 3.0.0+ ++ true ++ sourceModification element, which is then described by ++ additional elements (described below). These modifications are used ++ to exclude or include various source depending on the environment ++ the build is running in. ++ ]]> ++ ++ SourceModification ++ * ++ ++ ++ ++ unitTest ++ 3.0.0+ ++ true ++ ++ new UnitTest() ++ ++ UnitTest ++ ++ ++ ++ resources ++ 3.0.0+ ++ below). These resources are used to ++ complete the jar file or to run unit test. ++ ]]> ++ ++ Resource ++ * ++ ++ ++ ++ directory ++ 4.0.0 ++ ++ String ++ ++ ++ output ++ 4.0.0 ++ ++ String ++ ++ ++ finalName ++ 4.0.0 ++ ++ String ++ ++ ++ testOutput ++ 4.0.0 ++ ++ String ++ ++ ++ ++ ++ CiManagement ++ 4.0.0 ++ ++ ++ system ++ 4.0.0 ++ ++ String ++ ++ ++ url ++ 4.0.0 ++ ++ String ++ ++ ++ nagEmailAddress ++ 4.0.0 ++ ++ String ++ ++ ++ ++ ++ Contributor ++ 3.0.0+ ++ ++ ++ name ++ 3.0.0+ ++ ++ String ++ ++ ++ email ++ 3.0.0+ ++ ++ String ++ ++ ++ url ++ 3.0.0+ ++ ++ String ++ ++ ++ organization ++ 3.0.0+ ++ ++ String ++ ++ ++ roles ++ 3.0.0+ ++ role element, the body of which is a ++ role name. ++ ]]> ++ ++ String ++ * ++ ++ ++ ++ timezone ++ 3.0.0+ ++ ++ String ++ ++ ++ ++ ++ Dependency ++ 3.0.0+ ++ ++ ++ id ++ 3.0.0 ++ true ++ ++ String ++ ++ ++ groupId ++ 3.0.0+ ++ true ++ geronimo. ++ ]]> ++ String ++ ++ ++ artifactId ++ 3.0.0+ ++ true ++ germonimo-jms ++ ]]> ++ String ++ ++ ++ version ++ 3.0.0+ ++ true ++ 3.2.1 ++ ]]> ++ String ++ ++ ++ url ++ 3.0.0+ ++ ++ String ++ The URL should really be gleaned from a shared database of dependency information. ++ ++ ++ jar ++ 3.0.0 ++ ++ String ++ ++ ++ artifact ++ 4.0.0+ ++ ++ String ++ ++ ++ type ++ 3.0.0+ ++ ejb and ++ plugin. ++ ]]> ++ String ++ jar ++ ++ ++ properties ++ 3.0.0+ ++ mark dependencies with properties. For example the ++ war plugin looks for a ++ war.bundle property, and if found will include the dependency ++ in ++ WEB-INF/lib. For example syntax, check the war plugin docs. ++ ]]> ++ Properties ++ ++ String ++ * ++ ++ ++ ++ ++ ++ 3.0.0+ ++ ++ public String toString() ++ { ++ return groupId + "/" + type + "s:" + artifactId + "-" + version; ++ } ++ ++ ++ ++ 4.0.0 ++ ++ public String getId() ++ { ++ return groupId + ":" + artifactId + ":" + type + ":" + version; ++ } ++ ++ ++ ++ 3.0.0 ++ element is explicity used in the POM. ++ if ( getJar() != null) ++ { ++ return getJar(); ++ } ++ ++ return getArtifactId() + "-" + getVersion() + "." + getExtension(); ++ } ++ ++ public String getExtension() ++ { ++ if ("ejb".equals(getType()) || "plugin".equals(getType()) || "aspect".equals(getType())) return "jar"; ++ return getType(); ++ } ++ ++ public boolean isAddedToClasspath() ++ { ++ return ("jar".equals(getType()) || "ejb".equals(getType())); ++ } ++ ++ public boolean isPlugin() ++ { ++ return ("plugin".equals(getType())); ++ } ++ ++ public String getProperty( String property ) ++ { ++ return getProperties().getProperty( property ); ++ } ++ ++ public boolean equals( Object o ) ++ { ++ if ( this == o ) ++ { ++ return true; ++ } ++ ++ if ( !( o instanceof Dependency ) ) ++ { ++ return false; ++ } ++ ++ Dependency d = (Dependency) o; ++ return getId().equals( d.getId() ); ++ } ++ ++ public int hashCode() ++ { ++ return getId().hashCode(); ++ } ++ ]]> ++ ++ ++ ++ ++ Override ++ 4.0.0 ++ ++ ++ groupId ++ 4.0.0 ++ true ++ geronimo. ++ ]]> ++ String ++ ++ ++ artifactId ++ 4.0.0 ++ true ++ germonimo-jms ++ ]]> ++ String ++ ++ ++ type ++ 4.0.0 ++ ejb and ++ plugin. ++ ]]> ++ String ++ jar ++ ++ ++ ++ version ++ 4.0.0 ++ true ++ 3.2.1 ++ ]]> ++ String ++ ++ ++ file ++ 4.0.0 ++ true ++ lib/non-distributable-code-1.3.jar ++ ]]> ++ String ++ ++ ++ ++ ++ Contributor ++ Developer ++ 3.0.0+ ++ ++ ++ id ++ 3.0.0+ ++ ++ String ++ ++ ++ ++ ++ IssueManagement ++ 4.0.0 ++ ++ ++ system ++ 4.0.0 ++ ++ String ++ ++ ++ url ++ 4.0.0 ++ ++ String ++ ++ ++ ++ ++ DistributionManagement ++ 4.0.0 ++ ++ ++ ++ repository ++ 4.0.0 ++ ++ ++ ++ Repository ++ ++ ++ ++ site ++ ++ 4.0.0 ++ ++ Site ++ ++ ++ ++ ++ ++ License ++ 3.0.0+ ++ ++ ++ name ++ 3.0.0+ ++ ++ String ++ ++ ++ url ++ 3.0.0+ ++ ++ String ++ ++ ++ distribution ++ 3.0.0 ++ ++
repo
++
may be downloaded from the Maven repository
++
manual
++
user must manually download and install the dependency.
++ ++ ]]>
++ String ++
++ ++ comments ++ 3.0.0+ ++ ++ String ++ ++
++
++ ++ MailingList ++ 3.0.0+ ++ mailingList element, which is then described by ++ additional elements (described below). The auto-generated site ++ documentation references this information. ++ ]]> ++ ++ ++ name ++ 3.0.0+ ++ ++ String ++ ++ ++ subscribe ++ 3.0.0+ ++ mailto: link will automatically be created when ++ the documentation is created. ++ ]]> ++ String ++ ++ ++ unsubscribe ++ 3.0.0+ ++ mailto: link will automatically be created ++ when the documentation is created. ++ ]]> ++ String ++ ++ ++ post ++ 4.0.0 ++ mailto: link will automatically be created ++ when the documentation is created. ++ ]]> ++ String ++ ++ ++ archive ++ 3.0.0+ ++ ++ String ++ This should probably be removed from 4.0.0 before alpha-1 ++ ++ ++ archives ++ 4.0.0 ++ ++ ++ String ++ * ++ ++ ++ ++ ++ We could probably have a specific element for a dev mailing list for ++ things like CI, and maybe even a specific element for the user and scm ++ mailing lists. Then leave the more lose structure for any other type ++ of mailing list. ++ ++ ++ ++ Organization ++ 3.0.0+ ++ ++ ++ name ++ 3.0.0+ ++ ++ String ++ ++ ++ url ++ 3.0.0+ ++ ++ String ++ ++ ++ logo ++ 3.0.0+ ++ /images/org-logo.png) or an absolute URL ++ (e.g., ++ http://my.corp/logo.png). This value is used ++ when generating the project documentation. ++ ]]> ++ String ++ ++ ++ ++ ++ PackageGroup ++ 3.0.0+ ++ ++ ++ title ++ 3.0.0+ ++ ++ String ++ ++ ++ packages ++ 3.0.0+ ++ ++ String ++ ++ ++ ++ ++ PatternSet ++ 3.0.0+ ++ ++ ++ includes ++ 3.0.0+ ++ ++ ++ String ++ * ++ ++ ++ ++ excludes ++ 3.0.0+ ++ ++ ++ String ++ * ++ ++ ++ ++ ++ ++ 3.0.0+ ++ ++ ++ public java.util.List getDefaultExcludes() ++ { ++ java.util.List defaultExcludes = new java.util.ArrayList(); ++ defaultExcludes.add( "**/*~" ); ++ defaultExcludes.add( "**/#*#" ); ++ defaultExcludes.add( "**/.#*" ); ++ defaultExcludes.add( "**/%*%" ); ++ defaultExcludes.add( "**/._*" ); ++ ++ // CVS ++ defaultExcludes.add( "**/CVS" ); ++ defaultExcludes.add( "**/CVS/**" ); ++ defaultExcludes.add( "**/.cvsignore" ); ++ ++ // SCCS ++ defaultExcludes.add( "**/SCCS" ); ++ defaultExcludes.add( "**/SCCS/**" ); ++ ++ // Visual SourceSafe ++ defaultExcludes.add( "**/vssver.scc" ); ++ ++ // Subversion ++ defaultExcludes.add( "**/.svn" ); ++ defaultExcludes.add( "**/.svn/**" ); ++ ++ // Mac ++ defaultExcludes.add( "**/.DS_Store" ); ++ return defaultExcludes; ++ } ++ ++ ++ ++ ++ ++ Parent ++ 4.0.0 ++ ++ ++ artifactId ++ 4.0.0 ++ ++ String ++ ++ ++ groupId ++ 4.0.0 ++ ++ String ++ ++ ++ version ++ 4.0.0 ++ on of the project to extend.]]> ++ String ++ ++ ++ ++ ++ Repository ++ 3.0.0 ++ ++ ++ connection ++ 3.0.0 ++ building versions ++ from specific ID. ++ ]]> ++ String ++ ++ ++ developerConnection ++ 3.0.0 ++ ++ String ++ ++ ++ url ++ 3.0.0 ++ ++ String ++ ++ ++ ++ ++ Scm ++ 4.0.0 ++ ++ ++ connection ++ 4.0.0 ++ building versions ++ from specific ID. ++ ]]> ++ String ++ ++ ++ developerConnection ++ 4.0.0 ++ ++ String ++ ++ ++ url ++ 4.0.0 ++ ++ String ++ ++ ++ branches ++ 4.0.0 ++ ++ ++ ++ String ++ * ++ ++ ++ ++ ++ ++ Resource ++ 3.0.0+ ++ PatternSet ++ ++ ++ directory ++ 3.0.0+ ++ ++ String ++ ++ ++ targetPath ++ 3.0.0+ ++ org.apache.maven.messages), you must specify this ++ element with this value : ++ org/apache/maven/messages ++ ]]> ++ String ++ ++ ++ filtering ++ 3.0.0+ ++ ++ boolean ++ false ++ ++ ++ ++ ++ SourceModification ++ 3.0.0+ ++ Resource ++ ++ ++ className ++ 3.0.0+ ++ not be ++ loaded, then the includes and excludes specified below ++ will be applied to the contents of the ++ sourceDirectory ++ ]]> ++ String ++ ++ ++ property ++ 3.0.0+ ++ ++ String ++ ++ ++ ++ ++ UnitTest ++ 3.0.0+ ++ PatternSet ++ ++ ++ resources ++ 3.0.0+ ++ ++ ++ Resource ++ * ++ ++ ++ ++ ++ ++ Version ++ 3.0.0 ++ version ++ element ++ ]]> ++ ++ ++ name ++ 3.0.0 ++ 1.0, ++ 1.1-alpha1, ++ 1.2-beta, ++ 1.3.2 etc. ++ ]]> ++ String ++ ++ ++ tag ++ 3.0.0 ++ ++ String ++ ++ ++ id ++ 3.0.0 ++ ++ maven:dist ++ builds. ++ ]]> ++ String ++ ++ ++ ++ ++ ++ Repository ++ 4.0.0 ++ ++ ++ ++ id ++ 4.0.0 ++ ++ String ++ ++ ++ name ++ 4.0.0 ++ ++ String ++ ++ ++ url ++ 4.0.0 ++ ++ String ++ ++ ++ ++ ++ 4.0.0 ++ ++ public boolean equals( Object obj ) ++ { ++ Repository other = ( Repository ) obj; ++ ++ boolean retValue = false; ++ ++ if ( id != null ) ++ { ++ retValue = id.equals( other.id ); ++ } ++ ++ return retValue; ++ } ++ ++ ++ ++ ++ ++ ++ Site ++ 4.0.0 ++ ++ ++ ++ id ++ 4.0.0 ++ ++ String ++ ++ ++ name ++ 4.0.0 ++ ++ String ++ ++ ++ url ++ 4.0.0 ++ ++ String ++ ++ ++ ++ ++ GoalDecorator ++ 4.0.0 ++ ++ ++ name ++ 4.0.0 ++ ++ String ++ ++ ++ attain ++ 4.0.0 ++ ++ String ++ ++ ++ ++ ++ GoalDecorator ++ PreGoal ++ 4.0.0 ++ ++ ++ ++ GoalDecorator ++ PostGoal ++ 4.0.0 ++ ++ ++ ++ ++ ++ Local ++ 4.0.0 ++ ++ ++ ++ ++ repository ++ 4.0.0 ++ ++ String ++ ++ ++ ++ online ++ 4.0.0 ++ ++ boolean ++ true ++ ++ ++ ++ ++
++
+-- +2.45.1 + diff --git a/0002-Update-build-get-rid-of-legacy-fix-CLI-452.patch b/0002-Update-build-get-rid-of-legacy-fix-CLI-452.patch new file mode 100644 index 0000000..a4e9b78 --- /dev/null +++ b/0002-Update-build-get-rid-of-legacy-fix-CLI-452.patch @@ -0,0 +1,351 @@ +From ba2e53e7b28fa126e030056921930e83a44e2494 Mon Sep 17 00:00:00 2001 +From: Tamas Cservenak +Date: Wed, 5 Jun 2024 10:16:52 +0200 +Subject: [PATCH 2/3] Update build, get rid of legacy, fix CLI (#452) + +Port 90352d3cd8de0382be73d5ce16b5f9d96469e39c to this PR, CLI use nop logging, rest unchanged. + +Fixes #434 +--- + modello-core/pom.xml | 84 ++++++++++++++----- + .../java/org/codehaus/modello/Modello.java | 17 ++-- + .../java/org/codehaus/modello/ModelloCli.java | 3 +- + modello-maven-plugin/pom.xml | 38 ++++++--- + pom.xml | 28 ++++--- + 5 files changed, 120 insertions(+), 50 deletions(-) + +diff --git a/modello-core/pom.xml b/modello-core/pom.xml +index 4fffa729..2af513a2 100644 +--- a/modello-core/pom.xml ++++ b/modello-core/pom.xml +@@ -19,47 +19,89 @@ + + org.eclipse.sisu + org.eclipse.sisu.plexus +- provided ++ ++ ++ javax.annotation ++ javax.annotation-api ++ ++ ++ javax.enterprise ++ cdi-api ++ ++ + + +- org.sonatype.sisu +- sisu-guice +- no_aop ++ com.google.inject ++ guice + runtime + + + org.codehaus.plexus + plexus-utils + +- +- org.codehaus.plexus +- plexus-xml +- + + org.slf4j + slf4j-api + + + org.slf4j +- slf4j-simple +- test ++ slf4j-nop ++ runtime ++ true + + + + + + +- maven-assembly-plugin +- +- +- jar-with-dependencies +- +- +- +- org.codehaus.modello.ModelloCli +- +- +- ++ org.apache.maven.plugins ++ maven-shade-plugin ++ 3.5.3 ++ ++ ++ cli ++ ++ shade ++ ++ package ++ ++ cli ++ false ++ true ++ ++ ++ ++ ++ ++ ++ org.codehaus.modello.ModelloCli ++ ${project.artifactId} ++ ${project.version} ++ ${project.artifactId} ++ ${project.version} ++ ${project.groupId} ++ ++ ++ ++ ++ ++ *:* ++ ++ META-INF/MANIFEST.MF ++ META-INF/LICENSE ++ META-INF/LICENSE.txt ++ META-INF/DEPENDENCIES ++ META-INF/NOTICE ++ META-INF/NOTICE.txt ++ **/module-info.class ++ about.html ++ overview.html ++ ++ ++ ++ ++ ++ + + + +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 00fb7114..62cb7eb4 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.Map; +@@ -31,6 +29,9 @@ import java.util.Map; + import org.codehaus.modello.core.ModelloCore; + import org.codehaus.modello.model.Model; + import org.codehaus.modello.model.ModelValidationException; ++import org.codehaus.plexus.DefaultContainerConfiguration; ++import org.codehaus.plexus.DefaultPlexusContainer; ++import org.codehaus.plexus.PlexusConstants; + + /** + * @author Jason van Zyl +@@ -39,9 +40,15 @@ import org.codehaus.modello.model.ModelValidationException; + public class Modello { + private final ModelloCore core; + +- @Inject +- public Modello(ModelloCore core) { +- this.core = core; ++ public Modello() throws ModelloException { ++ try { ++ this.core = new DefaultPlexusContainer(new DefaultContainerConfiguration() ++ .setClassPathScanning(PlexusConstants.SCANNING_INDEX) ++ .setAutoWiring(true)) ++ .lookup(ModelloCore.class); ++ } catch (Exception e) { ++ throw new ModelloException("Error while starting plexus.", e); ++ } + } + + public void generate(Reader modelReader, String outputType, Map 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 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 +@@ -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; + +@@ -41,7 +40,7 @@ public class ModelloCli { + private static Map parameters; + + public static void main(String[] args) throws Exception { +- Modello modello = new DefaultPlexusContainer().lookup(Modello.class); ++ Modello modello = new Modello(); + + parseArgumentsFromCommandLine(args); + +diff --git a/modello-maven-plugin/pom.xml b/modello-maven-plugin/pom.xml +index cd8d38bd..0765c379 100644 +--- a/modello-maven-plugin/pom.xml ++++ b/modello-maven-plugin/pom.xml +@@ -19,16 +19,35 @@ + + + ++ ++ org.codehaus.modello ++ modello-core ++ ++ ++ org.eclipse.sisu ++ org.eclipse.sisu.plexus ++ ++ ++ com.google.inject ++ guice ++ ++ ++ ++ ++ org.codehaus.plexus ++ plexus-utils ++ ++ ++ org.codehaus.plexus ++ plexus-build-api ++ ++ + + org.apache.maven + maven-plugin-api + ${mavenVersion} + provided + +- +- org.codehaus.modello +- modello-core +- + + org.apache.maven + maven-model +@@ -41,10 +60,6 @@ + ${mavenVersion} + provided + +- +- org.codehaus.plexus +- plexus-utils +- + + org.apache.maven.plugin-tools + maven-plugin-annotations +@@ -70,6 +85,7 @@ + + org.codehaus.modello + modello-plugin-java ++ runtime + + + org.codehaus.modello +@@ -114,11 +130,9 @@ + + org.codehaus.modello + modello-plugin-velocity ++ + +- +- org.codehaus.plexus +- plexus-build-api +- ++ + + org.slf4j + slf4j-simple +diff --git a/pom.xml b/pom.xml +index 02bcc5de..fb63107f 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -194,7 +194,8 @@ + UTF-8 + 2.17.0 + 2.0.2 +- 3.5.4 ++ 1.7.36 ++ 3.6.3 +