msrb pushed to groovy18 (master). "Build with servlet 3.1"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon Mar 30 08:37:44 UTC 2015
>From ac3d8ff296571f7facfc7624a582b4070a316ef0 Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb at redhat.com>
Date: Mon, 30 Mar 2015 10:04:47 +0200
Subject: Build with servlet 3.1
diff --git a/groovy-servlet31.patch b/groovy-servlet31.patch
new file mode 100644
index 0000000..839d6bf
--- /dev/null
+++ b/groovy-servlet31.patch
@@ -0,0 +1,34 @@
+diff --git a/src/main/groovy/servlet/ServletBinding.java b/src/main/groovy/servlet/ServletBinding.java
+index 127d343..9d37592 100644
+--- a/src/main/groovy/servlet/ServletBinding.java
++++ b/src/main/groovy/servlet/ServletBinding.java
+@@ -24,6 +24,7 @@ import javax.servlet.ServletException;
+ import javax.servlet.ServletOutputStream;
+ import javax.servlet.http.HttpServletRequest;
+ import javax.servlet.http.HttpServletResponse;
++import javax.servlet.WriteListener;
+
+ import org.codehaus.groovy.GroovyBugError;
+ import org.codehaus.groovy.runtime.MethodClosure;
+@@ -150,6 +151,13 @@ public class ServletBinding extends Binding {
+ public void write(byte[] b, int off, int len) throws IOException {
+ getResponseStream().write(b, off, len);
+ }
++ public void setWriteListener(WriteListener writeListener) {
++ throw new UnsupportedOperationException("not implemented");
++ }
++
++ public boolean isReady() {
++ throw new UnsupportedOperationException("not implemented");
++ }
+ };
+ }
+ private PrintWriter getResponseWriter() {
+@@ -359,6 +367,6 @@ public class ServletBinding extends Binding {
+ public void redirect(String location) throws IOException {
+ HttpServletResponse response = (HttpServletResponse) super.getVariable("response");
+ response.sendRedirect(location);
+- }
++ }
+ }
+
diff --git a/groovy18-script b/groovy18-script
index b7465f2..45884fb 100644
--- a/groovy18-script
+++ b/groovy18-script
@@ -69,9 +69,9 @@ BASE_JARS="$BASE_JARS commons-logging"
BASE_JARS="$BASE_JARS groovy-1.8"
BASE_JARS="$BASE_JARS apache-ivy/ivy"
BASE_JARS="$BASE_JARS jline1/jline-1"
-BASE_JARS="$BASE_JARS jsp"
+BASE_JARS="$BASE_JARS glassfish-jsp-api/javax.servlet.jsp-api"
BASE_JARS="$BASE_JARS junit"
-BASE_JARS="$BASE_JARS servlet"
+BASE_JARS="$BASE_JARS glassfish-servlet-api"
BASE_JARS="$BASE_JARS xstream"
BASE_JARS="$BASE_JARS jansi"
BASE_JARS="$BASE_JARS gpars/gpars"
diff --git a/groovy18.spec b/groovy18.spec
index 97ff6da..d8f5f6c 100644
--- a/groovy18.spec
+++ b/groovy18.spec
@@ -2,9 +2,11 @@
# forget to ensure that sources 1 and 2 are up to date as well as
# the Requires list.
%global majorversion 1.8
+%global archiver 1_8_9
+
Name: groovy18
Version: 1.8.9
-Release: 18%{?dist}
+Release: 19%{?dist}
Summary: Dynamic language for the Java Platform
# Some of the files are licensed under BSD and CPL terms, but the CPL has been superceded
@@ -14,7 +16,7 @@ Summary: Dynamic language for the Java Platform
License: ASL 2.0 and BSD and EPL and Public Domain and CC-BY
URL: http://groovy-lang.org
-Source0: https://github.com/groovy/groovy-core/archive/GROOVY_1_8_9.zip
+Source0: https://github.com/groovy/groovy-core/archive/GROOVY_%{archiver}.zip
# thanks to Johannes Lips and Matt Spaulding
Source1: groovy18-script
Source2: groovy18-starter.conf
@@ -24,6 +26,7 @@ Source6: http://www.apache.org/licenses/LICENSE-2.0.txt
# thanks to Andy Grimm
Patch0: groovy-inner-interface-annotations.patch
Patch1: groovy-build-with-java8.patch
+Patch2: groovy-servlet31.patch
BuildRequires: ant
BuildRequires: antlr-tool
@@ -33,9 +36,9 @@ BuildRequires: bsf
BuildRequires: apache-ivy
BuildRequires: jansi
BuildRequires: jline1
-BuildRequires: tomcat-jsp-2.2-api
+BuildRequires: glassfish-jsp-api
BuildRequires: junit
-BuildRequires: tomcat-servlet-3.0-api
+BuildRequires: glassfish-servlet-api
BuildRequires: xstream
BuildRequires: java-devel >= 1.8
BuildRequires: desktop-file-utils
@@ -64,8 +67,8 @@ Requires: mvn(org.apache.ant:ant-junit)
Requires: mvn(bsf:bsf)
Requires: mvn(commons-logging:commons-logging)
# Used for servlet / gsp:
-Requires: mvn(javax.servlet:jsp-api)
-Requires: mvn(javax.servlet:servlet-api)
+Requires: glassfish-jsp-api
+Requires: glassfish-servlet-api
# Used to dump out the AST, xpp only needed for reading:
Requires: mvn(com.thoughtworks.xstream:xstream)
# Used for richer interactive groovysh support:
@@ -95,7 +98,7 @@ Summary: API Documentation for %{name}
JavaDoc documentation for %{name}
%prep
-%setup -q -n groovy-%{version}
+%setup -q -n groovy-core-GROOVY_%{archiver}
find . -name "*.class" -delete
find . -name "*.jar" -delete
@@ -103,6 +106,7 @@ cp %{SOURCE4} %{SOURCE5} %{SOURCE6} .
%patch0 -p1
%patch1 -p1
+%patch2 -p1
# We don't want to generate auto-R on optional dependencies
%pom_xpath_replace "pom:dependency[pom:optional[text()='true']]/pom:scope" "<scope>provided</scope>"
@@ -143,7 +147,7 @@ find . -name "*.groovy" -exec sed -i 's|org.objectweb.asm|org.objectweb.distrosh
mkdir -p target/lib/{compile,tools}
# Construct classpath
-build-jar-repository target/lib/compile servlet jsp \
+build-jar-repository target/lib/compile glassfish-servlet-api glassfish-jsp-api/javax.servlet.jsp-api \
objectweb-asm3/asm-tree-distroshaded objectweb-asm3/asm-distroshaded \
objectweb-asm3/asm-util-distroshaded objectweb-asm3/asm-analysis-distroshaded \
antlr ant/ant-antlr antlr \
@@ -190,6 +194,9 @@ install -p -m644 %{SOURCE2} \
%license LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
%changelog
+* Mon Mar 30 2015 Michal Srb <msrb at redhat.com> - 1.8.9-19
+- Build with servlet 3.1
+
* Fri Mar 13 2015 Michal Srb <msrb at redhat.com> - 1.8.9-18
- Fix URL and Source0 tag
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/groovy18.git/commit/?h=master&id=ac3d8ff296571f7facfc7624a582b4070a316ef0
More information about the scm-commits
mailing list