diff --git a/MANIFEST.MF b/MANIFEST.MF
index 6774de5..7f5b51a 100644
--- a/MANIFEST.MF
+++ b/MANIFEST.MF
@@ -1,10 +1,5 @@
Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
-Archiver-Version: Plexus Archiver
-Built-By: genie.releng
-Bundle-ManifestVersion: 2
-Bundle-Vendor: Eclipse.org
-Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org
.eclipse.jdt.internal.antadapter;x-internal:=true,org.eclipse.jdt.int
ernal.compiler;x-internal:=true,org.eclipse.jdt.internal.compiler.apt
@@ -23,8 +18,10 @@ Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org
-internal:=true,org.eclipse.jdt.internal.compiler.tool;x-internal:=tr
ue
Bundle-Name: Eclipse Compiler for Java(TM)
-Bundle-Version: 3.13.0.v20170516-1929
+Bundle-Version: 3.24.0.v20201123-0742
Bundle-ClassPath: .
-Created-By: Apache Maven
-Build-Jdk: 1.8.0_121
-
+Bundle-ManifestVersion: 2
+Bundle-Vendor: Eclipse.org
+Build-Jdk-Spec: 11
+Created-By: Maven Archiver 3.5.0
+Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
diff --git a/ecj-3.18.0.pom b/ecj-3.24.0.pom
similarity index 98%
rename from ecj-3.18.0.pom
rename to ecj-3.24.0.pom
index 9f03163..f1ce2a7 100644
--- a/ecj-3.18.0.pom
+++ b/ecj-3.24.0.pom
@@ -16,7 +16,7 @@
4.0.0
org.eclipse.jdt
ecj
- 3.18.0
+ 3.24.0
Eclipse Compiler for Java(TM)
Eclipse Compiler for Java(TM)
http://www.eclipse.org/jdt
diff --git a/ecj-encoding.patch b/ecj-encoding.patch
deleted file mode 100644
index f95f3c6..0000000
--- a/ecj-encoding.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- ecj-4.12/build.xml 2019-09-25 08:54:14.517407464 +0200
-+++ ecj-4.12/build.xml 2019-09-25 08:55:02.281660671 +0200
-@@ -25,6 +25,7 @@
-
-
-
diff --git a/ecj.changes b/ecj.changes
index 32e9f7f..2f61433 100644
--- a/ecj.changes
+++ b/ecj.changes
@@ -1,3 +1,19 @@
+-------------------------------------------------------------------
+Mon Oct 18 21:28:05 UTC 2021 - Marcel Witte
+
+- Upgrade to eclipse 4.18 ecj
+- Switch java14api to java15api to be compatible to JDK 15
+
+-------------------------------------------------------------------
+Mon Oct 18 12:05:38 UTC 2021 - Marcel Witte
+
+- Upgrade to eclipse 4.17 ecj
+- Removed patches:
+ * ecj-encoding.patch
+ * jdk10u-jdk8compat.patch
+- Switch to JDK 11 for build a JDK 8 is not supported anymore by ecj
+- Switch java10api to java14api to be compatible to JDK 14
+
-------------------------------------------------------------------
Wed Sep 25 12:22:02 UTC 2019 - Fridrich Strba
diff --git a/ecj.spec b/ecj.spec
index 47714a5..3c218e5 100644
--- a/ecj.spec
+++ b/ecj.spec
@@ -1,7 +1,7 @@
#
# spec file for package ecj
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# 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
@@ -16,37 +16,35 @@
#
-%global qualifier R-4.12-201906051800
-%global jdk10_revision 45b1d041a4ef
+%global qualifier R-4.18-202012021800
+%global jdk15_revision 1055f2102e6e
Name: ecj
-Version: 4.12
+Version: 4.18
Release: 0
Summary: Eclipse Compiler for Java
-License: EPL-2.0 AND GPL-2.0 WITH Classpath-exception-2.0
+License: EPL-2.0 AND GPL-2.0-only WITH Classpath-exception-2.0
Group: Development/Libraries/Java
URL: https://www.eclipse.org
Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/ecjsrc-%{version}.jar
-# Jdk10 sources to build Java API stubs for newer JDKs
-# wget http://hg.openjdk.java.net/jdk-updates/jdk10u/archive/45b1d041a4ef.tar.bz2 -O jdk10u.tar.bz2
-# tar xf jdk10u.tar.bz2 && rm jdk10u.tar.bz2
-# mv jdk10u-45b1d041a4ef/src/java.compiler/share/classes java10api-src && rm -rf jdk10u-45b1d041a4ef
-# tar cJf java10api-src.tar.xz java10api-src && rm -rf java10api-src
-Source1: java10api-src.tar.xz
-Source2: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.18.0/ecj-3.18.0.pom
-# Simple pom file to declare org.eclipse:java10api artifact
-Source3: java10api.pom
+# Jdk15 sources to build Java API stubs for newer JDKs
+# wget http://hg.openjdk.java.net/jdk-updates/jdk15u/archive/1055f2102e6e.tar.bz2 -O jdk15u.tar.bz2
+# tar xf jdk15u.tar.bz2 && rm jdk15u.tar.bz2
+# mv jdk15u-1055f2102e6e/src/java.compiler/share/classes java15api-src && mkdir -p java15api-src/jdk/internal/ && mv jdk15u-1055f2102e6e/src/java.base/share/classes/jdk/internal/PreviewFeature.java java15api-src/jdk/internal/
+# rm -rf jdk15u-1055f2102e6e
+# tar cJf java15api-src.tar.xz java15api-src && rm -rf java15api-src
+Source1: java15api-src.tar.xz
+Source2: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.24.0/ecj-3.24.0.pom
+# Simple pom file to declare org.eclipse:java15api artifact
+Source3: java15api.pom
# Extracted from https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/%%{qualifier}/ecj-%%{version}.jar
Source4: MANIFEST.MF
# Always generate debug info when building RPMs
Patch0: %{name}-rpmdebuginfo.patch
-# Include java API stubs in build with java < 9
+# Include java API stubs in build with java < 15
Patch1: javaAPI.patch
-# Fix build with java >= 9
-Patch2: ecj-encoding.patch
-# Patch out deprecation annotation not understood by java 8
-Patch3: jdk10u-jdk8compat.patch
BuildRequires: ant
-BuildRequires: java-devel >= 1.8
+BuildRequires: java-devel = 1.8.0
+BuildRequires: java-devel = 11
BuildRequires: javapackages-local
BuildRequires: unzip
BuildArch: noarch
@@ -58,12 +56,9 @@ the JDT Core batch compiler.
%prep
%setup -q -c -a 1
%patch0 -p1
-%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
+%if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1}
%patch1
-%else
-%patch2 -p1
%endif
-%patch3
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
@@ -73,23 +68,21 @@ cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
# JDTCompilerAdapter isn't used by the batch compiler
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
-# Not compatible with non-modular Java
-%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
-rm -f java10api-src/javax/tools/ToolProvider.java
-%endif
+# Cannot sign jar file with eclipse key
+rm META-INF/ECLIPSE_*
%build
mkdir -p build/classes
-javac -d build/classes -source 8 -target 8 \
- $(find java10api-src/javax -name \*.java | xargs)
-jar -cf java10api.jar -C build/classes .
+javac --patch-module java.compiler=java15api-src -XDignore.symbol.file=true -d build/classes -source 11 -target 11 \
+ $(find java15api-src/javax -name \*.java | xargs)
+jar -cf java15api.jar -C build/classes .
# Remove everything except the jar, since ant looks for java files in "."
-rm -rf java10api-src build/classes
+rm -rf java15api-src build/classes
ant \
-%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
- -Djavaapi=java10api.jar -Drtjar=%{_jvmdir}/jre/lib/rt.jar \
+%if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1}
+ -Djavaapi=java15api.jar -Drtjar=%{_jvmdir}/jre-1.8.0/lib/rt.jar \
%endif
build
@@ -97,14 +90,14 @@ ant \
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 ecj.jar %{buildroot}%{_javadir}/%{name}/ecj.jar
-install -pm 0644 java10api.jar %{buildroot}%{_javadir}/%{name}/java10api.jar
+install -pm 0644 java15api.jar %{buildroot}%{_javadir}/%{name}/java15api.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
install -pm 0644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}/ecj.pom
%add_maven_depmap %{name}/ecj.pom %{name}/ecj.jar -a "org.eclipse.jdt:core,org.eclipse.jdt.core.compiler:ecj,org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.tycho:org.eclipse.jdt.compiler.apt"
-install -pm 0644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}/java10api.pom
-%add_maven_depmap %{name}/java10api.pom %{name}/java10api.jar -a "org.eclipse:java9api"
+install -pm 0644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}/java15api.pom
+%add_maven_depmap %{name}/java15api.pom %{name}/java15api.jar -a "org.eclipse:java9api"
# Install the ecj wrapper script
%jpackage_script org.eclipse.jdt.internal.compiler.batch.Main '' '' ecj ecj true
diff --git a/ecjsrc-4.12.jar b/ecjsrc-4.12.jar
deleted file mode 100644
index f0d5ed0..0000000
--- a/ecjsrc-4.12.jar
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d42c8ae16f590cbade9700525263b31cb723f278ee22dbf72d1c5e3c4d48db71
-size 2066664
diff --git a/ecjsrc-4.18.jar b/ecjsrc-4.18.jar
new file mode 100644
index 0000000..a361d48
--- /dev/null
+++ b/ecjsrc-4.18.jar
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ed2419d5d449062cfd3e3ed48a471d292cb8993c8157a99ebc57b6cbcd3cc683
+size 2248232
diff --git a/java10api-src.tar.xz b/java10api-src.tar.xz
deleted file mode 100644
index 9b92646..0000000
--- a/java10api-src.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:913cc3561273af7e22e0f3e39aad33581a315f35a225cff1cab874784d8ddb9f
-size 67396
diff --git a/java15api-src.tar.xz b/java15api-src.tar.xz
new file mode 100644
index 0000000..61dbaae
--- /dev/null
+++ b/java15api-src.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9af70c3935b210d9044400a74df095d9aaf23fef855b4fd1b76675849af2924d
+size 73108
diff --git a/java10api.pom b/java15api.pom
similarity index 85%
rename from java10api.pom
rename to java15api.pom
index 1a91023..4a5dfea 100644
--- a/java10api.pom
+++ b/java15api.pom
@@ -2,6 +2,6 @@
4.0.0
org.eclipse
- java10api
- 10
+ java15api
+ 15
diff --git a/javaAPI.patch b/javaAPI.patch
index 9dba2c7..ee011ed 100644
--- a/javaAPI.patch
+++ b/javaAPI.patch
@@ -1,6 +1,6 @@
---- build.xml.orig 2018-03-20 15:15:57.063810672 +0000
-+++ build.xml 2018-03-20 15:16:26.018700633 +0000
-@@ -15,16 +15,20 @@
+--- build.xml.orig 2020-09-02 22:05:12.000000000 +0200
++++ build.xml 2021-03-16 14:41:19.331235267 +0100
+@@ -18,6 +18,10 @@
@@ -11,16 +11,15 @@
-
+@@ -25,9 +29,11 @@
--
--
-+
+
diff --git a/jdk10u-jdk8compat.patch b/jdk10u-jdk8compat.patch
deleted file mode 100644
index 833eb0a..0000000
--- a/jdk10u-jdk8compat.patch
+++ /dev/null
@@ -1,149 +0,0 @@
---- java10api-src/javax/lang/model/util/AbstractAnnotationValueVisitor6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/AbstractAnnotationValueVisitor6.java 2019-09-25 10:43:47.764821845 +0200
-@@ -75,7 +75,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected AbstractAnnotationValueVisitor6() {}
-
- /**
---- java10api-src/javax/lang/model/util/AbstractElementVisitor6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/AbstractElementVisitor6.java 2019-09-25 10:44:11.829001049 +0200
-@@ -75,7 +75,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected AbstractElementVisitor6(){}
-
- /**
---- java10api-src/javax/lang/model/util/AbstractTypeVisitor6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/AbstractTypeVisitor6.java 2019-09-25 10:43:54.596872718 +0200
-@@ -74,7 +74,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected AbstractTypeVisitor6() {}
-
- /**
---- java10api-src/javax/lang/model/util/ElementKindVisitor6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/ElementKindVisitor6.java 2019-09-25 10:45:46.301704594 +0200
-@@ -91,7 +91,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected ElementKindVisitor6() {
- super(null);
- }
-@@ -104,7 +103,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected ElementKindVisitor6(R defaultValue) {
- super(defaultValue);
- }
---- java10api-src/javax/lang/model/util/ElementScanner6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/ElementScanner6.java 2019-09-25 10:45:07.805417912 +0200
-@@ -106,7 +106,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected ElementScanner6(){
- DEFAULT_VALUE = null;
- }
-@@ -119,7 +118,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected ElementScanner6(R defaultValue){
- DEFAULT_VALUE = defaultValue;
- }
---- java10api-src/javax/lang/model/util/SimpleAnnotationValueVisitor6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/SimpleAnnotationValueVisitor6.java 2019-09-25 10:44:58.053345287 +0200
-@@ -92,7 +92,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected SimpleAnnotationValueVisitor6() {
- super();
- DEFAULT_VALUE = null;
-@@ -106,7 +105,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected SimpleAnnotationValueVisitor6(R defaultValue) {
- super();
- DEFAULT_VALUE = defaultValue;
---- java10api-src/javax/lang/model/util/SimpleElementVisitor6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/SimpleElementVisitor6.java 2019-09-25 10:45:31.181591992 +0200
-@@ -94,7 +94,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected SimpleElementVisitor6(){
- DEFAULT_VALUE = null;
- }
-@@ -107,7 +106,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected SimpleElementVisitor6(R defaultValue){
- DEFAULT_VALUE = defaultValue;
- }
---- java10api-src/javax/lang/model/util/SimpleTypeVisitor6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/SimpleTypeVisitor6.java 2019-09-25 10:45:17.877492913 +0200
-@@ -94,7 +94,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected SimpleTypeVisitor6(){
- DEFAULT_VALUE = null;
- }
-@@ -107,7 +106,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected SimpleTypeVisitor6(R defaultValue){
- DEFAULT_VALUE = defaultValue;
- }
---- java10api-src/javax/lang/model/util/TypeKindVisitor6.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/lang/model/util/TypeKindVisitor6.java 2019-09-25 10:44:26.801112546 +0200
-@@ -85,7 +85,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected TypeKindVisitor6() {
- super(null);
- }
-@@ -99,7 +98,6 @@
- * @deprecated Release 6 is obsolete; update to a visitor for a newer
- * release level.
- */
-- @Deprecated(since="9")
- protected TypeKindVisitor6(R defaultValue) {
- super(defaultValue);
- }
---- java10api-src/javax/tools/ToolProvider.java 2018-06-24 16:07:06.000000000 +0200
-+++ java10api-src/javax/tools/ToolProvider.java 2019-09-25 10:58:25.566820650 +0200
-@@ -94,7 +94,6 @@
- * locate system tools as well as user-installed tools.
- * @return a class loader, or {@code null}
- */
-- @Deprecated(since="9")
- public static ClassLoader getSystemToolClassLoader() {
- return null;
- }
-Only in java10api-src/javax/tools: ToolProvider.java.bak