Use new tomcat-servlet-api
- Update to latest guidelines
This commit is contained in:
parent
f63d138ec4
commit
5cb802a506
@ -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
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
Name: velocity
|
||||
Version: 1.7
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Epoch: 0
|
||||
Summary: Java-based template engine
|
||||
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
|
||||
Source1: http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}.pom
|
||||
Patch0: 0001-Remove-avalon-logkit.patch
|
||||
Patch1: 0002-Fix-servlet25-testcase.patch
|
||||
Patch2: 0003-Use-system-jars.patch
|
||||
Patch3: 0004-JDBC-41-compat.patch
|
||||
Group: Development/Libraries
|
||||
Requires: apache-commons-collections
|
||||
Requires: apache-commons-logging
|
||||
Requires: apache-commons-lang
|
||||
Requires: tomcat6-servlet-2.5-api
|
||||
Requires: servlet3
|
||||
Requires: jakarta-oro
|
||||
Requires: werken-xpath
|
||||
Requires: junit
|
||||
@ -53,8 +52,6 @@ Requires: hsqldb
|
||||
Requires: jdom
|
||||
Requires: bcel
|
||||
Requires: log4j
|
||||
Requires(post): jpackage-utils
|
||||
Requires(postun): jpackage-utils
|
||||
|
||||
BuildRequires: werken-xpath
|
||||
BuildRequires: ant
|
||||
@ -65,7 +62,7 @@ BuildRequires: hsqldb
|
||||
BuildRequires: apache-commons-collections
|
||||
BuildRequires: apache-commons-logging
|
||||
BuildRequires: apache-commons-lang
|
||||
BuildRequires: tomcat6-servlet-2.5-api
|
||||
BuildRequires: servlet3
|
||||
BuildRequires: jakarta-oro
|
||||
BuildRequires: jdom
|
||||
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/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
|
||||
|
||||
# remove rest of avalon logkit refences
|
||||
%patch0 -p1
|
||||
|
||||
# Fix test cases for servlet25
|
||||
%patch1 -p1
|
||||
|
||||
# Use system jar files instead of downloading from net
|
||||
%patch2 -p1
|
||||
|
||||
@ -154,7 +151,7 @@ antlr \
|
||||
apache-commons-collections \
|
||||
commons-lang \
|
||||
commons-logging \
|
||||
tomcat6-servlet-2.5-api \
|
||||
tomcat-servlet-api \
|
||||
junit \
|
||||
jakarta-oro \
|
||||
log4j \
|
||||
@ -189,42 +186,33 @@ cp -pr examples test %{buildroot}%{_datadir}/%{name}
|
||||
|
||||
# Maven metadata
|
||||
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
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE NOTICE README.txt
|
||||
%{_javadir}/*.jar
|
||||
%{_mavendepmapfragdir}/*
|
||||
%{_mavenpomdir}/*
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
%{_mavenpomdir}/JPP-%{name}.pom
|
||||
|
||||
%files manual
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%doc docs/*
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files demo
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%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
|
||||
- Resolved rhbz#791045
|
||||
- Added patch from Omaid Majid <omajid@redhat.com> to fix build with Java 7
|
||||
|
Loading…
Reference in New Issue
Block a user