Use new tomcat-servlet-api

- Update to latest guidelines
This commit is contained in:
Stanislav Ochotnicky 2012-06-05 14:19:55 +02:00
parent f63d138ec4
commit 5cb802a506
2 changed files with 14 additions and 90 deletions

View File

@ -1,64 +0,0 @@
From 29a4b2d7cca447279d91cd7ff9a2ed13436f82a7 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Mon, 21 Feb 2011 15:56:54 +0100
Subject: [PATCH 2/3] Fix servlet25 testcase
---
.../velocity/test/VelocityServletTestCase.java | 21 +++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/src/test/org/apache/velocity/test/VelocityServletTestCase.java b/src/test/org/apache/velocity/test/VelocityServletTestCase.java
index 700a453..ac0ab5c 100644
--- a/src/test/org/apache/velocity/test/VelocityServletTestCase.java
+++ b/src/test/org/apache/velocity/test/VelocityServletTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
import java.io.IOException;
@@ -149,6 +149,11 @@ public class VelocityServletTestCase extends TestCase
return this;
}
+ public String getContextPath()
+ {
+ return "";
+ }
+
public String getServletContextName()
{
return "VelocityTestContext";
@@ -250,6 +255,11 @@ public class VelocityServletTestCase extends TestCase
public void setAttribute(String name, Object value)
{
}
+
+ public Set getResourcePath(String path)
+ {
+ return null;
+ }
}
static class MockHttpServletResponse implements HttpServletResponse
@@ -408,5 +418,14 @@ public class VelocityServletTestCase extends TestCase
public void setStatus(int i , String s)
{
}
+
+ public void setCharacterEncoding(String charset)
+ {
+ }
+
+ public String getContentType()
+ {
+ return null;
+ }
}
}
--
1.7.4

View File

@ -30,7 +30,7 @@
Name: velocity Name: velocity
Version: 1.7 Version: 1.7
Release: 3%{?dist} Release: 4%{?dist}
Epoch: 0 Epoch: 0
Summary: Java-based template engine Summary: Java-based template engine
License: ASL 2.0 License: ASL 2.0
@ -38,14 +38,13 @@ URL: http://velocity.apache.org/
Source0: http://www.apache.org/dist/%{name}/engine/%{version}/%{name}-%{version}.tar.gz Source0: http://www.apache.org/dist/%{name}/engine/%{version}/%{name}-%{version}.tar.gz
Source1: http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}.pom Source1: http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}.pom
Patch0: 0001-Remove-avalon-logkit.patch Patch0: 0001-Remove-avalon-logkit.patch
Patch1: 0002-Fix-servlet25-testcase.patch
Patch2: 0003-Use-system-jars.patch Patch2: 0003-Use-system-jars.patch
Patch3: 0004-JDBC-41-compat.patch Patch3: 0004-JDBC-41-compat.patch
Group: Development/Libraries Group: Development/Libraries
Requires: apache-commons-collections Requires: apache-commons-collections
Requires: apache-commons-logging Requires: apache-commons-logging
Requires: apache-commons-lang Requires: apache-commons-lang
Requires: tomcat6-servlet-2.5-api Requires: servlet3
Requires: jakarta-oro Requires: jakarta-oro
Requires: werken-xpath Requires: werken-xpath
Requires: junit Requires: junit
@ -53,8 +52,6 @@ Requires: hsqldb
Requires: jdom Requires: jdom
Requires: bcel Requires: bcel
Requires: log4j Requires: log4j
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
BuildRequires: werken-xpath BuildRequires: werken-xpath
BuildRequires: ant BuildRequires: ant
@ -65,7 +62,7 @@ BuildRequires: hsqldb
BuildRequires: apache-commons-collections BuildRequires: apache-commons-collections
BuildRequires: apache-commons-logging BuildRequires: apache-commons-logging
BuildRequires: apache-commons-lang BuildRequires: apache-commons-lang
BuildRequires: tomcat6-servlet-2.5-api BuildRequires: servlet3
BuildRequires: jakarta-oro BuildRequires: jakarta-oro
BuildRequires: jdom BuildRequires: jdom
BuildRequires: bcel BuildRequires: bcel
@ -133,14 +130,14 @@ rm -f src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
rm -f src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java rm -f src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java
rm -f src/java/org/apache/velocity/runtime/log/VelocityFormatter.java rm -f src/java/org/apache/velocity/runtime/log/VelocityFormatter.java
# need porting to new servlet API. We would just add a lot of empty functions
rm src/test/org/apache/velocity/test/VelocityServletTestCase.java
cp %{SOURCE1} ./pom.xml cp %{SOURCE1} ./pom.xml
# remove rest of avalon logkit refences # remove rest of avalon logkit refences
%patch0 -p1 %patch0 -p1
# Fix test cases for servlet25
%patch1 -p1
# Use system jar files instead of downloading from net # Use system jar files instead of downloading from net
%patch2 -p1 %patch2 -p1
@ -154,7 +151,7 @@ antlr \
apache-commons-collections \ apache-commons-collections \
commons-lang \ commons-lang \
commons-logging \ commons-logging \
tomcat6-servlet-2.5-api \ tomcat-servlet-api \
junit \ junit \
jakarta-oro \ jakarta-oro \
log4j \ log4j \
@ -189,42 +186,33 @@ cp -pr examples test %{buildroot}%{_datadir}/%{name}
# Maven metadata # Maven metadata
install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_to_maven_depmap org.apache.velocity %{name} %{version} JPP %{name}
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
# ----------------------------------------------------------------------------- %add_maven_depmap -a "%{name}:%{name}"
%post
%update_maven_depmap
%postun
%update_maven_depmap
# -----------------------------------------------------------------------------
%files %files
%defattr(-,root,root,-)
%doc LICENSE NOTICE README.txt %doc LICENSE NOTICE README.txt
%{_javadir}/*.jar %{_javadir}/*.jar
%{_mavendepmapfragdir}/* %{_mavendepmapfragdir}/%{name}
%{_mavenpomdir}/* %{_mavenpomdir}/JPP-%{name}.pom
%files manual %files manual
%defattr(-,root,root,-)
%doc LICENSE %doc LICENSE
%doc docs/* %doc docs/*
%files javadoc %files javadoc
%defattr(-,root,root,-)
%doc LICENSE %doc LICENSE
%{_javadocdir}/%{name} %{_javadocdir}/%{name}
%files demo %files demo
%defattr(-,root,root,-)
%doc LICENSE %doc LICENSE
%{_datadir}/%{name} %{_datadir}/%{name}
%changelog %changelog
* Tue Jun 05 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.7-4
- Use new tomcat-servlet-api
- Update to latest guidelines
* Fri Feb 17 2012 Deepak Bhole <dbhole@redhat.com> - 0:1.7-3 * Fri Feb 17 2012 Deepak Bhole <dbhole@redhat.com> - 0:1.7-3
- Resolved rhbz#791045 - Resolved rhbz#791045
- Added patch from Omaid Majid <omajid@redhat.com> to fix build with Java 7 - Added patch from Omaid Majid <omajid@redhat.com> to fix build with Java 7