Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package tesla-polyglot for openSUSE:Factory checked in at 2021-01-15 19:45:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tesla-polyglot (Old) and /work/SRC/openSUSE:Factory/.tesla-polyglot.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tesla-polyglot" Fri Jan 15 19:45:51 2021 rev:4 rq:862842 version:0.4.5 Changes: -------- --- /work/SRC/openSUSE:Factory/tesla-polyglot/tesla-polyglot.changes 2019-11-26 16:58:45.332119836 +0100 +++ /work/SRC/openSUSE:Factory/.tesla-polyglot.new.28504/tesla-polyglot.changes 2021-01-15 19:45:52.765990660 +0100 @@ -1,0 +2,8 @@ +Thu Dec 10 11:25:42 UTC 2020 - Fridrich Strba <fst...@suse.com> + +- Upgrade to upstream version 0.4.5 +- Added patch: + * pomless-tycho.patch + + allow building eclipse with our pomless tycho + +------------------------------------------------------------------- Old: ---- polyglot-0.2.1.tar.gz New: ---- polyglot-0.4.5.tar.gz pomless-tycho.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tesla-polyglot.spec ++++++ --- /var/tmp/diff_new_pack.4iVizT/_old 2021-01-15 19:45:53.373991566 +0100 +++ /var/tmp/diff_new_pack.4iVizT/_new 2021-01-15 19:45:53.373991566 +0100 @@ -1,7 +1,7 @@ # # spec file for package tesla-polyglot # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,13 +23,15 @@ %bcond_with bootstrap %endif %global base_name tesla-polyglot -Version: 0.2.1 +Version: 0.4.5 Release: 0 URL: https://github.com/takari/maven-polyglot Source0: https://github.com/takari/polyglot-maven/archive/polyglot-%{version}.tar.gz Patch0: polyglot-snakeyaml-1.25.patch +Patch1: pomless-tycho.patch BuildRequires: fdupes BuildRequires: maven-local +BuildRequires: mvn(commons-beanutils:commons-beanutils) BuildRequires: mvn(org.apache.maven:maven-core) BuildRequires: mvn(org.apache.maven:maven-model) BuildRequires: mvn(org.apache.maven:maven-model-builder) @@ -84,6 +86,12 @@ %description groovy Polyglot Tesla :: Groovy. +%package java +Summary: Polyglot Tesla :: Java + +%description java +Polyglot Tesla :: Java. + %package yaml Summary: Polyglot Tesla :: YAML @@ -119,6 +127,7 @@ %prep %setup -q -n polyglot-maven-polyglot-%{version} %patch0 -p1 +%patch1 -p1 find -name "*.class" -delete find -name "*.jar" -delete @@ -129,14 +138,17 @@ %pom_remove_dep -r :polyglot-scala %pom_disable_module polyglot-ruby %pom_remove_dep -r :polyglot-ruby +%pom_disable_module polyglot-kotlin +%pom_remove_dep -r :polyglot-kotlin -%{pom_remove_parent} +%pom_remove_parent perl -pi -e 's#takari-jar#jar#g' */pom.xml perl -pi -e 's#takari-maven-plugin#maven-plugin#g' */pom.xml %if %{with bootstrap} %pom_disable_module polyglot-atom %pom_disable_module polyglot-groovy +%pom_disable_module polyglot-java %pom_disable_module polyglot-maven-plugin %pom_disable_module polyglot-translate-plugin %pom_disable_module polyglot-xml @@ -148,6 +160,7 @@ %pom_remove_dep rubygems:maven-tools polyglot-ruby rm -Rf polyglot-ruby/src/{test,it} %pom_remove_plugin :maven-invoker-plugin polyglot-ruby +%pom_remove_plugin -r :maven-enforcer-plugin # Unavailable plugin %pom_remove_plugin org.codehaus.groovy:groovy-eclipse-compiler polyglot-groovy @@ -218,7 +231,7 @@ %endif -f -- -Dproject.build.sourceEncoding=UTF-8 \ %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} - -Dmaven.compiler.release=7 + -Dmaven.compiler.release=8 %endif %install @@ -238,6 +251,8 @@ %files groovy -f .mfiles-polyglot-groovy +%files java -f .mfiles-polyglot-java + %files yaml -f .mfiles-polyglot-yaml %files maven-plugin -f .mfiles-polyglot-maven-plugin ++++++ polyglot-0.2.1.tar.gz -> polyglot-0.4.5.tar.gz ++++++ ++++ 25100 lines of diff (skipped) ++++++ pomless-tycho.patch ++++++ --- polyglot-maven-polyglot-0.4.5/polyglot-common/src/main/java/org/sonatype/maven/polyglot/TeslaModelProcessor.java +++ polyglot-maven-polyglot-0.4.5/polyglot-common/src/main/java/org/sonatype/maven/polyglot/TeslaModelProcessor.java @@ -60,22 +60,20 @@ assert manager != null; File pomFile = manager.locatePom(dir); - if (pomFile == null) { - throw new AssertionError("pom file must not be null from PolyglotModelManager as per API"); - } - if (pomFile.getName().equals("pom.xml") && pomFile.getParentFile().equals(dir)) { - // behave like proper maven in case there is no pom from manager - return pomFile; - } - File polyglotPomFile = new File(pomFile.getParentFile(), ".polyglot." + pomFile.getName()); - try { - if (polyglotPomFile.createNewFile()) { - polyglotPomFile.deleteOnExit(); + if (pomFile != null && !pomFile.getName().endsWith(".pom") && !pomFile.getName().endsWith(".xml")) { + pomFile = new File(pomFile.getParentFile(), ".polyglot." + pomFile.getName()); + try { + pomFile.createNewFile(); + pomFile.deleteOnExit(); + } catch (IOException e) { + throw new RuntimeException("error creating empty file", e); } - } catch (IOException e) { - throw new RuntimeException("error creating empty file", e); + } else { + // behave like proper maven in case there is no pom from manager + pomFile = new File(dir, "pom.xml"); } - return polyglotPomFile; + + return pomFile; } @Override @@ -108,13 +106,13 @@ log.debug(source.getLocation()); File pom = new File(source.getLocation()); - File realPom = new File(pom.getPath().replaceFirst("[.]polyglot[.]", "")); + source = new FileModelSource(new File(pom.getPath().replaceFirst("[.]polyglot[.]", ""))); - ((Map) options).put(ModelProcessor.SOURCE, new FileModelSource(realPom)); + ((Map) options).put(ModelProcessor.SOURCE, source); ModelReader reader = manager.getReaderFor(options); - Model model = reader.read(realPom, options); - PolyglotPropertiesEnhancer.enhanceModel(manager.getEnhancementPropertiesFor(options), model); + Model model = reader.read(source.getInputStream(), options); + MavenXpp3Writer xmlWriter = new MavenXpp3Writer(); StringWriter xml = new StringWriter(); xmlWriter.write(xml, model);