Package init
This commit is contained in:
parent
1576752e87
commit
10d0b30108
@ -0,0 +1,92 @@
|
|||||||
|
From 073dfb83021ec59bca50ee09762c552c77b98bd9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabio Valentini <decathorpe@gmail.com>
|
||||||
|
Date: Tue, 25 Aug 2020 11:32:48 +0200
|
||||||
|
Subject: [PATCH] enable support for JDTJavaCompiler and AntJavaCompiler
|
||||||
|
|
||||||
|
---
|
||||||
|
impl/pom.xml | 33 +++++++------------
|
||||||
|
.../jasper/compiler/JDTJavaCompiler.java | 4 +++
|
||||||
|
pom.xml | 1 +
|
||||||
|
3 files changed, 17 insertions(+), 21 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/impl/pom.xml b/impl/pom.xml
|
||||||
|
index 8cb08ca..7e6e2f3 100644
|
||||||
|
--- a/impl/pom.xml
|
||||||
|
+++ b/impl/pom.xml
|
||||||
|
@@ -149,18 +149,7 @@
|
||||||
|
<configuration>
|
||||||
|
<source>1.7</source>
|
||||||
|
<target>1.7</target>
|
||||||
|
- <compilerArgument>-Xlint:unchecked</compilerArgument>
|
||||||
|
<excludes>
|
||||||
|
- <exclude>
|
||||||
|
- org/apache/jasper/compiler/JDTJavaCompiler.java
|
||||||
|
- </exclude>
|
||||||
|
- <exclude>
|
||||||
|
- org/apache/jasper/compiler/AntJavaCompiler.java
|
||||||
|
- </exclude>
|
||||||
|
- <exclude>
|
||||||
|
- <!-- This is only used by AntJavaCompiler -->
|
||||||
|
- org/apache/jasper/util/SystemLogHandler.java
|
||||||
|
- </exclude>
|
||||||
|
<exclude>
|
||||||
|
<!-- We keep the source just in case -->
|
||||||
|
org/apache/jasper/runtime/PerThreadTagHandlerPool.java
|
||||||
|
@@ -270,15 +259,17 @@
|
||||||
|
<artifactId>jakarta.servlet.jsp-api</artifactId>
|
||||||
|
<version>2.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
-
|
||||||
|
-<!--
|
||||||
|
- Needed only if we include JDTJavaCompiler.java
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>eclipse</groupId>
|
||||||
|
- <artifactId>jdtcore</artifactId>
|
||||||
|
- <version>3.1.0</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
--->
|
||||||
|
+ <dependency>
|
||||||
|
+ <groupId>org.eclipse.jdt</groupId>
|
||||||
|
+ <artifactId>core</artifactId>
|
||||||
|
+ <version>3.1.0</version>
|
||||||
|
+ <scope>provided</scope>
|
||||||
|
+ </dependency>
|
||||||
|
+ <dependency>
|
||||||
|
+ <groupId>org.apache.ant</groupId>
|
||||||
|
+ <artifactId>ant</artifactId>
|
||||||
|
+ <version>1.10.8</version>
|
||||||
|
+ <scope>provided</scope>
|
||||||
|
+ </dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
diff --git a/impl/src/main/java/org/apache/jasper/compiler/JDTJavaCompiler.java b/impl/src/main/java/org/apache/jasper/compiler/JDTJavaCompiler.java
|
||||||
|
index d6d8b9e..0fa3d99 100644
|
||||||
|
--- a/impl/src/main/java/org/apache/jasper/compiler/JDTJavaCompiler.java
|
||||||
|
+++ b/impl/src/main/java/org/apache/jasper/compiler/JDTJavaCompiler.java
|
||||||
|
@@ -224,6 +224,10 @@ public class JDTJavaCompiler implements JavaCompiler {
|
||||||
|
return className.toCharArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public boolean ignoreOptionalProblems() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public char[] getContents() {
|
||||||
|
char[] result = null;
|
||||||
|
Reader reader = null;
|
||||||
|
diff --git a/pom.xml b/pom.xml
|
||||||
|
index 23203cc..9e4462f 100644
|
||||||
|
--- a/pom.xml
|
||||||
|
+++ b/pom.xml
|
||||||
|
@@ -53,6 +53,7 @@
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>api</module>
|
||||||
|
+ <module>impl</module>
|
||||||
|
<module>spec</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
62
0002-Port-to-latest-version-of-Servlet-API.patch
Normal file
62
0002-Port-to-latest-version-of-Servlet-API.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
From 9766baf4875526f85e613b26fa83d25b889552b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mat Booth <mat.booth@redhat.com>
|
||||||
|
Date: Wed, 19 Aug 2020 15:52:04 +0100
|
||||||
|
Subject: [PATCH 2/2] Port to latest version of Servlet API
|
||||||
|
|
||||||
|
---
|
||||||
|
.../jasper/servlet/JspCServletContext.java | 41 +++++++++++++++++++
|
||||||
|
1 file changed, 41 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/impl/src/main/java/org/apache/jasper/servlet/JspCServletContext.java b/impl/src/main/java/org/apache/jasper/servlet/JspCServletContext.java
|
||||||
|
index ff89225..3d41919 100644
|
||||||
|
--- a/impl/src/main/java/org/apache/jasper/servlet/JspCServletContext.java
|
||||||
|
+++ b/impl/src/main/java/org/apache/jasper/servlet/JspCServletContext.java
|
||||||
|
@@ -883,4 +883,45 @@ public class JspCServletContext implements ServletContext {
|
||||||
|
return this.jspPropertyGroups;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getVirtualServerName() {
|
||||||
|
+ // TODO new in 3.1
|
||||||
|
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public int getSessionTimeout() {
|
||||||
|
+ // TODO new in 4.0
|
||||||
|
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public void setSessionTimeout(int sessionTimeout) {
|
||||||
|
+ // TODO new in 4.0
|
||||||
|
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public String getRequestCharacterEncoding() {
|
||||||
|
+ // TODO new in 4.0
|
||||||
|
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public void setRequestCharacterEncoding(String encoding) {
|
||||||
|
+ // TODO new in 4.0
|
||||||
|
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public String getResponseCharacterEncoding() {
|
||||||
|
+ // TODO new in 4.0
|
||||||
|
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public void setResponseCharacterEncoding(String encoding) {
|
||||||
|
+ // TODO new in 4.0
|
||||||
|
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public ServletRegistration.Dynamic addJspFile(String servletName, String jspFile) {
|
||||||
|
+ // TODO new in 4.0
|
||||||
|
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
109
jakarta-server-pages.spec
Normal file
109
jakarta-server-pages.spec
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
%global srcname jsp-api
|
||||||
|
|
||||||
|
Name: jakarta-server-pages
|
||||||
|
Version: 2.3.6
|
||||||
|
Release: 1
|
||||||
|
Summary: Jakarta Server Pages (JSP)
|
||||||
|
License: (EPL-2.0 or GPLv2 with exceptions) and ASL 2.0
|
||||||
|
|
||||||
|
%global upstream_version IMPL-%{version}-RELEASE
|
||||||
|
|
||||||
|
URL: https://github.com/eclipse-ee4j/jsp-api
|
||||||
|
Source0: %{url}/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz
|
||||||
|
Patch1: 0001-enable-support-for-JDTJavaCompiler-and-AntJavaCompil.patch
|
||||||
|
Patch2: 0002-Port-to-latest-version-of-Servlet-API.patch
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
BuildRequires: maven-local
|
||||||
|
BuildRequires: mvn(jakarta.el:jakarta.el-api)
|
||||||
|
BuildRequires: mvn(jakarta.servlet:jakarta.servlet-api)
|
||||||
|
BuildRequires: mvn(javax.servlet:javax.servlet-api)
|
||||||
|
BuildRequires: mvn(org.apache.ant:ant)
|
||||||
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||||
|
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||||
|
BuildRequires: mvn(org.eclipse.jdt:core)
|
||||||
|
BuildRequires: mvn(org.glassfish:javax.el)
|
||||||
|
|
||||||
|
Provides: glassfish-jsp = %{version}-%{release}
|
||||||
|
Obsoletes: glassfish-jsp < 2.3.4-9
|
||||||
|
|
||||||
|
%description
|
||||||
|
Jakarta Server Pages provides a container-independent implementation of
|
||||||
|
the JSP API.
|
||||||
|
|
||||||
|
|
||||||
|
%package api
|
||||||
|
Summary: Jakarta Server Pages (JSP) API
|
||||||
|
|
||||||
|
Provides: glassfish-jsp-api = %{version}-%{release}
|
||||||
|
Obsoletes: glassfish-jsp-api < 2.3.3-6
|
||||||
|
|
||||||
|
%description api
|
||||||
|
Jakarta Server Pages provides a container-independent implementation of
|
||||||
|
the JSP API. This package contains the API only.
|
||||||
|
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: Javadoc for %{name}
|
||||||
|
|
||||||
|
Provides: glassfish-jsp-javadoc = %{version}-%{release}
|
||||||
|
Obsoletes: glassfish-jsp-javadoc < 2.3.4-9
|
||||||
|
Provides: glassfish-jsp-api-javadoc = %{version}-%{release}
|
||||||
|
Obsoletes: glassfish-jsp-api-javadoc < 2.3.3-6
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
This package contains the API documentation for %{name}.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{srcname}-%{upstream_version} -p1
|
||||||
|
|
||||||
|
%pom_remove_parent . api impl
|
||||||
|
|
||||||
|
%pom_disable_module spec
|
||||||
|
|
||||||
|
%mvn_package org.eclipse.ee4j.jsp:jsp-parent __noinstall
|
||||||
|
|
||||||
|
sed -i "s/2\.3\.7-SNAPSHOT/2.3.6/" api/pom.xml
|
||||||
|
|
||||||
|
%pom_xpath_inject "pom:dependency[pom:groupId='org.apache.ant']" "<optional>true</optional>" impl
|
||||||
|
%pom_xpath_inject "pom:dependency[pom:groupId='org.eclipse.jdt']" "<optional>true</optional>" impl
|
||||||
|
|
||||||
|
rm impl/src/main/java/org/apache/jasper/runtime/PerThreadTagHandlerPool.java
|
||||||
|
|
||||||
|
%mvn_alias org.glassfish.web:jakarta.servlet.jsp \
|
||||||
|
org.eclipse.jetty.orbit:org.apache.jasper.glassfish \
|
||||||
|
org.glassfish.web:javax.servlet.jsp
|
||||||
|
|
||||||
|
%mvn_alias jakarta.servlet.jsp:jakarta.servlet.jsp-api \
|
||||||
|
javax.servlet.jsp:javax.servlet.jsp-api \
|
||||||
|
javax.servlet.jsp:jsp-api \
|
||||||
|
javax.servlet:jsp-api
|
||||||
|
|
||||||
|
%mvn_file :jakarta.servlet.jsp %{name}/jakarta.servlet.jsp glassfish-jsp javax.servlet.jsp
|
||||||
|
%mvn_file :jakarta.servlet.jsp-api %{name}/jakarta.servlet.jsp-api glassfish-jsp-api
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
%mvn_build -s
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
%mvn_install
|
||||||
|
|
||||||
|
|
||||||
|
%files -f .mfiles-jakarta.servlet.jsp
|
||||||
|
%license LICENSE.md NOTICE.md
|
||||||
|
%doc README.md
|
||||||
|
|
||||||
|
%files api -f .mfiles-jakarta.servlet.jsp-api
|
||||||
|
%license LICENSE.md NOTICE.md
|
||||||
|
|
||||||
|
%files javadoc -f .mfiles-javadoc
|
||||||
|
%license LICENSE.md NOTICE.md
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Feb 09 2022 wangkai <wangkai385@huawei.com> - 2.3.6-1
|
||||||
|
- Package init
|
||||||
4
jakarta-server-pages.yaml
Normal file
4
jakarta-server-pages.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: eclipse-ee4j/jsp-api
|
||||||
|
tag_pattern: "(.*).-RELEASE"
|
||||||
|
seperator: "."
|
||||||
BIN
jsp-api-IMPL-2.3.6-RELEASE.tar.gz
Normal file
BIN
jsp-api-IMPL-2.3.6-RELEASE.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user