diff --git a/freemarker-2.3.31-use-jakarta-el.patch b/freemarker-2.3.31-use-jakarta-el.patch
new file mode 100644
index 0000000..3311d58
--- /dev/null
+++ b/freemarker-2.3.31-use-jakarta-el.patch
@@ -0,0 +1,14 @@
+diff --git a/ivy.xml b/ivy.xml
+index 0b03c2b..e880d34 100644
+--- a/ivy.xml
++++ b/ivy.xml
+@@ -98,7 +98,8 @@
+
+
+
+-
++
++
+
+
+
diff --git a/freemarker.spec b/freemarker.spec
index cf7fd0b..661690e 100644
--- a/freemarker.spec
+++ b/freemarker.spec
@@ -1,6 +1,6 @@
Name: freemarker
Version: 2.3.31
-Release: 1
+Release: 2
Summary: The Apache FreeMarker Template Engine
License: ASL 2.0
URL: https://freemarker.apache.org/
@@ -11,11 +11,14 @@ Patch3: fix-javadoc-encoding.patch
Patch5: no-javarebel.patch
Patch6: enable-jdom.patch
Patch7: javacc-7.patch
+Patch8: freemarker-2.3.31-use-jakarta-el.patch
+
BuildArch: noarch
-BuildRequires: ant apache-parent apache-commons-logging aqute-bnd dom4j >= 1.6.1 hamcrest
+BuildRequires: java-1.8.0-openjdk-devel ant apache-parent apache-commons-logging aqute-bnd dom4j >= 1.6.1 hamcrest
BuildRequires: ivy-local glassfish-jsp-api glassfish-servlet-api javacc >= 7.0 jaxen >= 1.1
BuildRequires: jcl-over-slf4j jdom >= 1.0 junit jython log4j-over-slf4j rhino >= 1.6 slf4j
BuildRequires: xalan-j2 >= 2.7.0
+BuildRequires: jakarta-el >= 4.0.0
%description
Apache FreeMarker is a template engine: a Java library to generate text output
(HTML web pages, e-mails, configuration files, source code, etc.) based on
@@ -40,6 +43,8 @@ find -type f -name "*.class" -delete
%patch5
%patch6
%patch7 -p1
+%patch8 -p1
+
rm ivysettings.xml
sed -i 's/cachepath conf="IDE"/cachepath conf="javadoc"/' build.xml
sed -i '/conf name="IDE"/i' ivy.xml
@@ -63,6 +68,9 @@ JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 \
%license LICENSE NOTICE
%changelog
+* Sat Apr 15 2023 Dongxing Wang - 2.3.31-2
+- Add jakarta-el.patch to 2.3.31
+
* Fri Oct 21 2022 yaoxin - 2.3.31-1
- Update to 2.3.31