From 8cade4bfaf2be543af05a641fd03da35291f1ae1 Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Thu, 9 Mar 2023 19:33:01 +0800 Subject: [PATCH] Fix build failure due to snakeyaml update to 1.32 (cherry picked from commit a31e32c41a1f001b3aa312a452d2ac1ac5cb2c54) --- polyglot-snakeyaml-1.25.patch | 23 +++++++++++++++++++++++ tesla-polyglot.spec | 12 ++++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 polyglot-snakeyaml-1.25.patch diff --git a/polyglot-snakeyaml-1.25.patch b/polyglot-snakeyaml-1.25.patch new file mode 100644 index 0000000..f3e6bfb --- /dev/null +++ b/polyglot-snakeyaml-1.25.patch @@ -0,0 +1,23 @@ +diff -urEbwB polyglot-maven-polyglot-0.2.1/polyglot-yaml/src/main/java/org/sonatype/maven/polyglot/yaml/ModelRepresenter.java polyglot-maven-polyglot-0.2.1.new/polyglot-yaml/src/main/java/org/sonatype/maven/polyglot/yaml/ModelRepresenter.java +--- polyglot-maven-polyglot-0.2.1/polyglot-yaml/src/main/java/org/sonatype/maven/polyglot/yaml/ModelRepresenter.java 2017-09-06 19:21:53.000000000 +0200 ++++ polyglot-maven-polyglot-0.2.1.new/polyglot-yaml/src/main/java/org/sonatype/maven/polyglot/yaml/ModelRepresenter.java 2019-11-10 20:22:59.071312361 +0100 +@@ -205,8 +205,7 @@ + * Change the default order. Important data goes first. + */ + @Override +- protected Set getProperties(Class type) +- throws IntrospectionException { ++ protected Set getProperties(Class type) { + if (type.isAssignableFrom(Model.class)) { + return sortTypeWithOrder(type, ORDER_MODEL); + } else if (type.isAssignableFrom(Developer.class)) { +@@ -222,8 +221,7 @@ + } + } + +- private Set sortTypeWithOrder(Class type, List order) +- throws IntrospectionException { ++ private Set sortTypeWithOrder(Class type, List order) { + Set standard = super.getProperties(type); + Set sorted = new TreeSet(new ModelPropertyComparator(order)); + sorted.addAll(standard); diff --git a/tesla-polyglot.spec b/tesla-polyglot.spec index 73bd697..e7c7a8d 100644 --- a/tesla-polyglot.spec +++ b/tesla-polyglot.spec @@ -1,12 +1,13 @@ #Basic Information Name: tesla-polyglot Version: 0.2.1 -Release: 3 +Release: 4 Summary: Modules to enable Maven usage in other JVM languages -License: EPL +License: EPL-1.0 URL: https://github.com/takari/maven-polyglot Source0: https://github.com/takari/polyglot-maven/archive/polyglot-%{version}.tar.gz Source1: eclipse-1.0.txt +Patch0: polyglot-snakeyaml-1.25.patch BuildArch: noarch #Dependency @@ -87,7 +88,7 @@ This package contains javadoc for %{name}. #Build sections %prep -%setup -q -n polyglot-maven-polyglot-%{version} +%autosetup -n polyglot-maven-polyglot-%{version} -p1 find -name "*.class" -delete find -name "*.jar" -delete @@ -162,7 +163,7 @@ dos2unix eclipse-1.0.txt %mvn_alias ':polyglot-{*}' org.sonatype.pmaven:pmaven-@1 %build -%mvn_build -s -- -Dproject.build.sourceEncoding=UTF-8 +%mvn_build -s -f -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install @@ -191,6 +192,9 @@ dos2unix eclipse-1.0.txt %license eclipse-1.0.txt license-header.txt %changelog +* Thu Mar 09 2023 yaoxin - 0.2.1-4 +- Fix build failure due to snakeyaml update to 1.32 + * Fri Dec 06 2019 openEuler Buildteam - 0.2.1-3 - Package init