diff --git a/MANIFEST.MF b/MANIFEST.MF
index fec577b..7d260b6 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,12 @@ 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.18.0.v20190522-0428
Bundle-ClassPath: .
-Created-By: Apache Maven
-Build-Jdk: 1.8.0_121
+Built-By: genie.releng
+Bundle-ManifestVersion: 2
+Bundle-Vendor: Eclipse.org
+Created-By: Apache Maven 3.5.4
+Build-Jdk: 1.8.0_192
+Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
diff --git a/ecj-3.18.0.pom b/ecj-3.18.0.pom
new file mode 100644
index 0000000..b739824
--- /dev/null
+++ b/ecj-3.18.0.pom
@@ -0,0 +1,47 @@
+
+
+
+ 4.0.0
+ org.eclipse.jdt
+ ecj
+ 3.18.0
+ Eclipse Compiler for Java(TM)
+ Eclipse Compiler for Java(TM)
+ http://www.eclipse.org/jdt
+
+
+ Eclipse Public License - v 2.0
+ https://www.eclipse.org/legal/epl-2.0/
+ repo
+
+
+
+ Eclipse Foundation
+ http://www.eclipse.org/
+
+
+ Bugzilla
+ https://bugs.eclipse.org/
+
+
+ scm:git:git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
+ https://git.eclipse.org/c/jdt/eclipse.jdt.core.git
+
+
+
+ https://projects.eclipse.org/projects/eclipse.jdt/who
+
+
+
diff --git a/ecj-4.9.pom b/ecj-4.9.pom
deleted file mode 100644
index 0155a2d..0000000
--- a/ecj-4.9.pom
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
- 4.0.0
- org.eclipse.jdt.core.compiler
- ecj
- 4.9
- jar
- Eclipse ECJ
- Eclipse JDT Core Batch Compiler
- http://www.eclipse.org/jdt/
-
- UTF-8
- UTF-8
- 1.8
- 1.8
-
-
-
- Eclipse Public License v1.0
- http://www.eclipse.org/org/documents/epl-v10.php
- repo
-
-
-
- http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/
- :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
-
-
-
-
- Ralph Schaer
- ralphschaer@gmail.com
-
-
-
-
-
- org.apache.ant
- ant
- 1.9.4
- true
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.10.3
-
- -Xdoclint:none
-
-
-
-
-
-
diff --git a/ecj-rpmdebuginfo.patch b/ecj-rpmdebuginfo.patch
new file mode 100644
index 0000000..e2727a1
--- /dev/null
+++ b/ecj-rpmdebuginfo.patch
@@ -0,0 +1,39 @@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.jdt.core
+Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
+retrieving revision 1.327
+diff -u -r1.327 Main.java
+--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2008 15:00:59 -0000 1.327
++++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Nov 2008 19:26:57 -0000
+@@ -2609,6 +2609,29 @@
+ this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
+ }
+
++ {
++ // If we're building an RPM, force full debugging info to
++ // be generated, no matter what options have been passed
++ // by Ant. This is something of a kludge, but it is far
++ // better than the alternative, which is having class
++ // files with debug info mysteriously missing.
++
++ String RpmPackageName = System.getenv("RPM_PACKAGE_NAME");
++ String RpmArch = System.getenv("RPM_ARCH");
++ String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT");
++ if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) {
++ this.options.put(
++ CompilerOptions.OPTION_LocalVariableAttribute,
++ CompilerOptions.GENERATE);
++ this.options.put(
++ CompilerOptions.OPTION_LineNumberAttribute,
++ CompilerOptions.GENERATE);
++ this.options.put(
++ CompilerOptions.OPTION_SourceFileAttribute,
++ CompilerOptions.GENERATE);
++ }
++ }
++
+ this.logger.logCommandLineArguments(newCommandLineArgs);
+ this.logger.logOptions(this.options);
+
diff --git a/ecj.sh.in b/ecj.sh.in
deleted file mode 100644
index d8a40e9..0000000
--- a/ecj.sh.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-CLASSPATH=$(build-classpath ecj):${CLASSPATH=.} \
-java org.eclipse.jdt.internal.compiler.batch.Main "$@"
diff --git a/ecj.spec b/ecj.spec
index 4fde71d..93eab20 100644
--- a/ecj.spec
+++ b/ecj.spec
@@ -1,19 +1,21 @@
Epoch: 1
+%global qualifier R-4.12-201906051800
+
Name: ecj
-Version: 4.9
-Release: 3
+Version: 4.12
+Release: 1
Summary: the Eclipse Compiler for Java
License: EPL-2.0
URL: http://www.eclipse.org
-Source0: http://download.eclipse.org/eclipse/downloads/drops4/R-4.9-201809060745/ecjsrc-4.9.jar
-Source1: ecj.sh.in
-Source3: https://repo1.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/%{version}/ecj-%{version}.pom
-Source4: MANIFEST.MF
-Source5: java10api.jar
+Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/ecjsrc-%{version}.jar
+Source1: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.18.0/ecj-3.18.0.pom
+Source2: MANIFEST.MF
+Source3: java10api.jar
-Patch0: javaAPI.patch
+Patch0: %{name}-rpmdebuginfo.patch
+Patch1: javaAPI.patch
BuildArch: noarch
BuildRequires: ant javapackages-local
@@ -27,30 +29,26 @@ ECJ is the the Eclipse Compiler for Java. It is also known as the JDT Core batc
%autosetup -c -n %{name}-%{version} -p1
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
-sed -i -e "s/Xlint:none/Xlint:none -encoding cp1252/g" build.xml
-rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
-cp %{SOURCE3} pom.xml
+
+cp %{SOURCE1} pom.xml
mkdir -p scripts/binary/META-INF/
-cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
+cp %{SOURCE2} scripts/binary/META-INF/MANIFEST.MF
-%pom_remove_dep org.apache.ant:ant
+rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
-%mvn_file :ecj ecj jdtcore
-%mvn_alias org.eclipse.jdt.core.compiler:ecj org.eclipse.jdt:core org.eclipse.jdt:ecj \
+%mvn_alias org.eclipse.jdt:ecj 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
-%mvn_artifact "org.eclipse:java10api:jar:10" %{SOURCE5}
+%mvn_artifact "org.eclipse:java10api:jar:10" %{SOURCE3}
%mvn_alias "org.eclipse:java10api:jar:10" "org.eclipse:java9api:jar:9"
%build
-ant -Djavaapi=%{SOURCE5}
+ant -Djavaapi=%{SOURCE3}
%install
%mvn_artifact pom.xml ecj.jar
%mvn_install
-sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/f2f42549-cfab-4d71-be48-5e9f9a41e5f5/g' $(find %{_buildrootdir} -name ecj.xml)
-
-install -p -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/ecj
+%jpackage_script org.eclipse.jdt.internal.compiler.batch.Main '' '' ecj ecj true
mkdir -p %{buildroot}%{_mandir}/man1
install -m 644 -p ecj.1 %{buildroot}%{_mandir}/man1/ecj.1
@@ -64,5 +62,8 @@ install -m 644 -p ecj.1 %{buildroot}%{_mandir}/man1/ecj.1
%{_mandir}/man1/ecj*
%changelog
+* Thu Oct 27 2022 liyanan - 1:4.12-1
+- update to 4.12
+
* Wed Dec 4 2019 openEuler Buildteam - 1:4.9-3
- Package init
diff --git a/ecjsrc-4.12.jar b/ecjsrc-4.12.jar
new file mode 100644
index 0000000..eacd58a
Binary files /dev/null and b/ecjsrc-4.12.jar differ
diff --git a/ecjsrc-4.9.jar b/ecjsrc-4.9.jar
deleted file mode 100644
index a48d6a2..0000000
Binary files a/ecjsrc-4.9.jar and /dev/null differ
diff --git a/javaAPI.patch b/javaAPI.patch
index 71de2e4..cd8d1b5 100644
--- a/javaAPI.patch
+++ b/javaAPI.patch
@@ -20,7 +20,7 @@
source="1.8"
target="1.8">
-
-+
++