Update to new version; remove logkit dependency; add maven metadata
This commit is contained in:
parent
063989aeeb
commit
d7b1567aed
@ -1,31 +1,18 @@
|
|||||||
--- velocity-1.4/src/java/org/apache/velocity/test/VelocityServletTest.java~ 2004-04-14 13:26:41.000000000 +0100
|
--- velocity-1.6.3/src/test/org/apache/velocity/test/VelocityServletTestCase.java 2009-12-07 23:41:27.000000000 +0000
|
||||||
+++ velocity-1.4/src/java/org/apache/velocity/test/VelocityServletTest.java 2005-06-06 11:54:53.000000000 +0100
|
+++ velocity-1.6.3.mef/src/test/org/apache/velocity/test/VelocityServletTestCase.java 2010-01-15 13:03:56.465905895 +0000
|
||||||
@@ -22,6 +22,7 @@
|
@@ -250,6 +250,11 @@
|
||||||
import java.net.URL;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.Properties;
|
|
||||||
+import java.util.Set;
|
|
||||||
import javax.servlet.RequestDispatcher;
|
|
||||||
import javax.servlet.Servlet;
|
|
||||||
import javax.servlet.ServletConfig;
|
|
||||||
@@ -237,6 +238,16 @@
|
|
||||||
public void setAttribute(String name, Object value)
|
public void setAttribute(String name, Object value)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public Set getResourcePaths(String path)
|
+ public Set getResourcePath(String path)
|
||||||
+ {
|
|
||||||
+ return null;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public String getServletContextName()
|
|
||||||
+ {
|
+ {
|
||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
static class MockHttpServletResponse implements HttpServletResponse
|
static class MockHttpServletResponse implements HttpServletResponse
|
||||||
@@ -391,5 +402,18 @@
|
@@ -408,5 +413,14 @@
|
||||||
public void setStatus(int i , String s)
|
public void setStatus(int i , String s)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -37,10 +24,6 @@
|
|||||||
+ public String getContentType()
|
+ public String getContentType()
|
||||||
+ {
|
+ {
|
||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public void resetBuffer()
|
|
||||||
+ {
|
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,24 +32,22 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: velocity
|
Name: velocity
|
||||||
Version: 1.4
|
Version: 1.6.3
|
||||||
Release: 10.5%{?dist}
|
Release: 1
|
||||||
Epoch: 0
|
Epoch: 0
|
||||||
Summary: Java-based template engine
|
Summary: Java-based template engine
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Source: http://archive.apache.org/dist/velocity/engine/1.4/velocity-1.4.tar.gz
|
Source0: http://www.apache.org/dist/%{name}/engine/%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch0: velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch
|
Source1: http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}.pom
|
||||||
Patch1: velocity-AnakiaTask-jdom-XMLOutputter.patch
|
Patch0: velocity-remove-avalon-logkit.patch
|
||||||
|
Patch1: velocity-use-system-jars.patch
|
||||||
Patch2: velocity-servletapi5.patch
|
Patch2: velocity-servletapi5.patch
|
||||||
#Disable failure-on-tests rather than not running tests.
|
Patch3: velocity-cleanup-pom.patch
|
||||||
Patch3: velocity-build-testcases.patch
|
|
||||||
#Patch3: velocity-notexentests.patch
|
|
||||||
# Renames all "enum" variables to "enumer" because "enum" is a reserved word in java >= 1.5
|
|
||||||
# Not upstreamed, package outdated.
|
|
||||||
Patch4: velocity-enum.patch
|
|
||||||
URL: http://velocity.apache.org/
|
URL: http://velocity.apache.org/
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: jakarta-commons-collections
|
Requires: jakarta-commons-collections
|
||||||
|
Requires: jakarta-commons-logging
|
||||||
|
Requires: jakarta-commons-lang
|
||||||
# Use servletapi5 instead of servletapi3
|
# Use servletapi5 instead of servletapi3
|
||||||
Requires: servletapi5
|
Requires: servletapi5
|
||||||
Requires: oro
|
Requires: oro
|
||||||
@ -57,22 +55,27 @@ Requires: werken-xpath
|
|||||||
Requires: jdom >= 0:1.0-1
|
Requires: jdom >= 0:1.0-1
|
||||||
Requires: bcel
|
Requires: bcel
|
||||||
Requires: log4j >= 0:1.1
|
Requires: log4j >= 0:1.1
|
||||||
#FIXME replace with excalibur-avalon-logkit when available
|
Requires(post): jpackage-utils
|
||||||
Requires: avalon-logkit
|
Requires(postun): jpackage-utils
|
||||||
|
|
||||||
BuildRequires: werken-xpath
|
BuildRequires: werken-xpath
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: antlr
|
BuildRequires: antlr
|
||||||
BuildRequires: junit
|
BuildRequires: junit
|
||||||
|
BuildRequires: ant-junit
|
||||||
|
BuildRequires: hsqldb
|
||||||
BuildRequires: jakarta-commons-collections
|
BuildRequires: jakarta-commons-collections
|
||||||
|
BuildRequires: jakarta-commons-logging
|
||||||
|
BuildRequires: jakarta-commons-lang
|
||||||
# Use servletapi5 instead of servletapi3
|
# Use servletapi5 instead of servletapi3
|
||||||
BuildRequires: servletapi5
|
BuildRequires: servletapi5
|
||||||
BuildRequires: oro
|
BuildRequires: oro
|
||||||
BuildRequires: jdom >= 0:1.0-1
|
BuildRequires: jdom >= 0:1.0-1
|
||||||
BuildRequires: bcel
|
BuildRequires: bcel
|
||||||
BuildRequires: log4j >= 0:1.1
|
BuildRequires: log4j >= 0:1.1
|
||||||
#FIXME replace with excalibur-avalon-logkit when available
|
|
||||||
BuildRequires: avalon-logkit
|
|
||||||
BuildRequires: jpackage-utils >= 0:1.6
|
BuildRequires: jpackage-utils >= 0:1.6
|
||||||
|
# It fails one of the arithmetic test cases with gcj
|
||||||
|
BuildRequires: java-devel >= 1:1.6.0
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||||
|
|
||||||
@ -123,36 +126,42 @@ Demonstrations and samples for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
# Remove all binary libs used in compiling the package.
|
|
||||||
# Note that velocity has some jar files containing macros under
|
|
||||||
# examples and test that should not be removed.
|
|
||||||
find build -name '*.jar' -exec rm -f \{\} \;
|
|
||||||
|
|
||||||
%patch0 -b .sav
|
# Remove dependency on avalon-logkit
|
||||||
%patch1 -b .sav
|
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
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
# Use system jars instead of downloading
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
#Apply patch to remove explicit dependency on servletapi3
|
#Apply patch to remove explicit dependency on servletapi3
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
|
||||||
|
# Remove (unavailable) parent reference and avalon-logkit from POM
|
||||||
|
cp %{SOURCE1} ./pom.xml
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Use servletapi5 instead of servletapi3 in CLASSPATH
|
|
||||||
#FIXME Replace avalon-logkit with excalibur-avalon-logkit when ready
|
|
||||||
export CLASSPATH=$(build-classpath \
|
export CLASSPATH=$(build-classpath \
|
||||||
antlr \
|
antlr \
|
||||||
jakarta-commons-collections \
|
jakarta-commons-collections \
|
||||||
|
jakarta-commons-lang \
|
||||||
|
jakarta-commons-logging \
|
||||||
servletapi5 \
|
servletapi5 \
|
||||||
avalon-logkit \
|
|
||||||
junit \
|
junit \
|
||||||
oro \
|
oro \
|
||||||
log4j \
|
log4j \
|
||||||
jdom \
|
jdom \
|
||||||
bcel \
|
bcel \
|
||||||
werken.xpath)
|
werken.xpath \
|
||||||
|
hsqldb \
|
||||||
|
junit)
|
||||||
ant \
|
ant \
|
||||||
-buildfile build/build.xml \
|
-buildfile build/build.xml \
|
||||||
-Djunit.jar=%{_javadir}/junit.jar \
|
|
||||||
-Dbuild.sysclasspath=first \
|
-Dbuild.sysclasspath=first \
|
||||||
jar javadocs test
|
jar javadocs test
|
||||||
|
|
||||||
@ -175,8 +184,18 @@ rm -rf docs/api
|
|||||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||||
cp -pr convert examples test $RPM_BUILD_ROOT%{_datadir}/%{name}
|
cp -pr convert examples test $RPM_BUILD_ROOT%{_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}
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
%post
|
||||||
|
%update_maven_depmap
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%update_maven_depmap
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
@ -186,6 +205,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%doc LICENSE NOTICE README.txt
|
%doc LICENSE NOTICE README.txt
|
||||||
%{_javadir}/*.jar
|
%{_javadir}/*.jar
|
||||||
|
%{_mavendepmapfragdir}/*
|
||||||
|
%{_mavenpomdir}/*
|
||||||
|
|
||||||
%files manual
|
%files manual
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
@ -200,6 +221,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 15 2010 Mary Ellen Foster <mefoster at gmail.com> 0:1.6.3-1
|
||||||
|
- Update to 1.6.3
|
||||||
|
- Remove dependency on avalon-logkit
|
||||||
|
- Add maven metadata and pom
|
||||||
|
|
||||||
* Sun Jan 10 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.4-10.5
|
* Sun Jan 10 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.4-10.5
|
||||||
- Drop gcj_support.
|
- Drop gcj_support.
|
||||||
- Fix groups and url.
|
- Fix groups and url.
|
||||||
|
Loading…
Reference in New Issue
Block a user