diff --git a/jakarta-server-pages.spec b/jakarta-server-pages.spec
index 52ae853..11e26c6 100644
--- a/jakarta-server-pages.spec
+++ b/jakarta-server-pages.spec
@@ -2,7 +2,7 @@
Name: jakarta-server-pages
Version: 2.3.6
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Jakarta Server Pages (JSP)
# some files have Apache-2.0 license headers
# https://github.com/eclipse-ee4j/jsp-api/issues/180
@@ -81,6 +81,10 @@ This package contains the API documentation for %{name}.
# reset jsp-api version from 2.3.7-SNAPSHOT to 2.3.6 (no code changes)
sed -i "s/2\.3\.7-SNAPSHOT/2.3.6/" api/pom.xml
+# ant and ecj should be optional OSGi requirements
+%pom_xpath_inject "pom:dependency[pom:groupId='org.apache.ant']" "true" impl
+%pom_xpath_inject "pom:dependency[pom:groupId='org.eclipse.jdt']" "true" impl
+
# this source file is excluded by maven-compiler-plugin configuration;
# remove it entirely to fix building javadocs
rm impl/src/main/java/org/apache/jasper/runtime/PerThreadTagHandlerPool.java
@@ -119,6 +123,9 @@ rm impl/src/main/java/org/apache/jasper/runtime/PerThreadTagHandlerPool.java
%changelog
+* Wed Aug 26 2020 Mat Booth - 2.3.6-2
+- Make the OSGi dep on ant and ecj optional, jsp can be used without these
+
* Tue Aug 25 2020 Fabio Valentini - 2.3.6-1
- Initial package produced by merging glassfish-jsp and glassfish-jsp-api.