commit cf428fb9fc8a050043d588b96ca5d094029c5267
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Mon Feb 21 16:48:54 2011 +0100
Update to latest version
- Drop old/unused patches
.gitignore | 1 +
0001-Remove-avalon-logkit.patch | 62 ++++++++
0002-Fix-servlet25-testcase.patch | 64 +++++++++
...system-jars.patch => 0003-Use-system-jars.patch | 59 +++++---
sources | 2 +-
velocity-1.6.4.pom => velocity-1.7.pom | 29 +++-
...AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch | 11 --
velocity-AnakiaTask-jdom-XMLOutputter.patch | 21 ---
velocity-build-testcases.patch | 11 --
velocity-cleanup-pom.patch | 35 -----
velocity-enum.patch | 150 --------------------
velocity-legacy-tests.patch | 15 --
velocity-remove-avalon-logkit.patch | 31 ----
velocity-servletapi5.patch | 29 ----
velocity-tomcat6.patch | 37 -----
velocity.spec | 43 +++---
16 files changed, 208 insertions(+), 392 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4c5a55f..57d2359 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
velocity-1.6.3.tar.gz
/velocity-1.6.4.tar.gz
+/velocity-1.7.tar.gz
diff --git a/0001-Remove-avalon-logkit.patch b/0001-Remove-avalon-logkit.patch
new file mode 100644
index 0000000..2f09b03
--- /dev/null
+++ b/0001-Remove-avalon-logkit.patch
@@ -0,0 +1,62 @@
+From 1d2f89cb3e954b943751fa8dd587fdb404eb9338 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
+Date: Mon, 21 Feb 2011 15:53:34 +0100
+Subject: [PATCH 1/3] Remove avalon-logkit
+
+we don't have it packaged so change defaults and remove it from pom.xml
+---
+ pom.xml | 6 ------
+ .../velocity/runtime/defaults/velocity.properties | 4 ++--
+ .../apache/velocity/runtime/log/LogManager.java | 2 +-
+ 3 files changed, 3 insertions(+), 9 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index 77a8e38..f453208 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -197,12 +197,6 @@
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+- <groupId>logkit</groupId>
+- <artifactId>logkit</artifactId>
+- <version>2.0</version>
+- <scope>provided</scope>
+- </dependency>
+- <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6</version>
+diff --git a/src/java/org/apache/velocity/runtime/defaults/velocity.properties
b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
+index 750a59a..7fac119 100644
+--- a/src/java/org/apache/velocity/runtime/defaults/velocity.properties
++++ b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
+@@ -20,10 +20,10 @@
+ # ----------------------------------------------------------------------------
+
+ # ----------------------------------------------------------------------------
+-# default LogChute to use: default: AvalonLogChute, Log4JLogChute, CommonsLogLogChute,
ServletLogChute, JdkLogChute
++# default LogChute to use: default: Log4JLogChute, CommonsLogLogChute, ServletLogChute,
JdkLogChute
+ # ----------------------------------------------------------------------------
+
+-runtime.log.logsystem.class =
org.apache.velocity.runtime.log.AvalonLogChute,org.apache.velocity.runtime.log.Log4JLogChute,org.apache.velocity.runtime.log.CommonsLogLogChute,org.apache.velocity.runtime.log.ServletLogChute,org.apache.velocity.runtime.log.JdkLogChute
++runtime.log.logsystem.class =
org.apache.velocity.runtime.log.Log4JLogChute,org.apache.velocity.runtime.log.CommonsLogLogChute,org.apache.velocity.runtime.log.ServletLogChute,org.apache.velocity.runtime.log.JdkLogChute
+
+ # ---------------------------------------------------------------------------
+ # This is the location of the Velocity Runtime log.
+diff --git a/src/java/org/apache/velocity/runtime/log/LogManager.java
b/src/java/org/apache/velocity/runtime/log/LogManager.java
+index 19d1016..97dceef 100644
+--- a/src/java/org/apache/velocity/runtime/log/LogManager.java
++++ b/src/java/org/apache/velocity/runtime/log/LogManager.java
+@@ -119,7 +119,7 @@ public class LogManager
+ * classes, and we use the first one we find.
+ *
+ * Note that the default value of this property contains the
+- * AvalonLogChute, the Log4JLogChute, CommonsLogLogChute,
++ * Log4JLogChute, CommonsLogLogChute,
+ * ServletLogChute, and the JdkLogChute for
+ * convenience - so we use whichever we works first.
+ */
+--
+1.7.4
+
diff --git a/0002-Fix-servlet25-testcase.patch b/0002-Fix-servlet25-testcase.patch
new file mode 100644
index 0000000..c4d3454
--- /dev/null
+++ b/0002-Fix-servlet25-testcase.patch
@@ -0,0 +1,64 @@
+From 29a4b2d7cca447279d91cd7ff9a2ed13436f82a7 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky(a)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
+
diff --git a/velocity-use-system-jars.patch b/0003-Use-system-jars.patch
similarity index 85%
rename from velocity-use-system-jars.patch
rename to 0003-Use-system-jars.patch
index 8ce6ba6..3d37ee8 100644
--- a/velocity-use-system-jars.patch
+++ b/0003-Use-system-jars.patch
@@ -1,6 +1,18 @@
---- velocity-1.6.3.mef/build/build.xml.orig 2010-01-15 12:53:01.344906711 +0000
-+++ velocity-1.6.3.mef/build/build.xml 2010-01-15 12:53:07.537915055 +0000
-@@ -138,28 +138,6 @@
+From 813085c72e9906a53bec5954bcce7305a7c320d1 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
+Date: Mon, 21 Feb 2011 17:58:39 +0100
+Subject: [PATCH 3/3] Use system jars
+
+---
+ build/build.xml | 56 +++++++++++----------------------------------------
+ build/testcases.xml | 6 -----
+ 2 files changed, 12 insertions(+), 50 deletions(-)
+
+diff --git a/build/build.xml b/build/build.xml
+index c667553..479ef2d 100644
+--- a/build/build.xml
++++ b/build/build.xml
+@@ -140,28 +140,6 @@
<!-- =================================================================== -->
<!-- sets up the build environment (classpath and libs) -->
<!-- =================================================================== -->
@@ -29,7 +41,7 @@
<!-- =================================================================== -->
<!-- checks for the existence/non-existence of various java features -->
-@@ -172,12 +150,11 @@
+@@ -174,12 +152,11 @@
<target name="prepare-jdbc"
depends="check-jdbc,check-jdbc-true,check-jdbc-false"/>
<target name="prepare-jdk14"
depends="check-jdk14,check-jdk14-true,check-jdk14-false"/>
@@ -43,7 +55,7 @@
</available>
</target>
-@@ -208,10 +185,9 @@
+@@ -210,10 +187,9 @@
</echo>
</target>
@@ -55,7 +67,7 @@
</available>
</target>
-@@ -246,7 +222,7 @@
+@@ -248,7 +224,7 @@
<!-- =================================================================== -->
<target name="compile" depends="compile-src,compile-test"/>
@@ -64,7 +76,7 @@
description="Compiles the Velocity source">
<javac srcdir="${build.src}"
destdir="${build.dest}"
-@@ -255,8 +231,7 @@
+@@ -257,8 +233,7 @@
target="${javac.target}"
source="${javac.source}"
deprecation="${deprecation}"
@@ -74,7 +86,7 @@
<copy todir="${build.dest}" filtering="yes">
<fileset dir="${src.java.dir}">
-@@ -266,7 +241,7 @@
+@@ -268,7 +243,7 @@
</target>
@@ -83,7 +95,7 @@
description="Compiles the Velocity test classes">
<javac srcdir="${build.test.src}"
destdir="${build.test.dest}"
-@@ -277,8 +252,6 @@
+@@ -279,8 +254,6 @@
<!-- Don't use the run classpath, build using the exploded class tree
-->
<classpath>
@@ -92,7 +104,7 @@
<pathelement location="${build.dest}"/>
</classpath>
</javac>
-@@ -503,7 +476,7 @@
+@@ -561,7 +534,7 @@
<!-- =================================================================== -->
<!-- Compiles the example code -->
<!-- =================================================================== -->
@@ -101,7 +113,7 @@
description="Compiles the Velocity Example code">
<echo>
-@@ -527,8 +500,7 @@
+@@ -585,8 +558,7 @@
encoding="UTF-8"
debug="${debug}"
deprecation="${deprecation}"
@@ -111,7 +123,7 @@
</target>
<target name="examples-clean"
depends="examples-clean-anakia">
-@@ -546,7 +518,7 @@
+@@ -604,7 +576,7 @@
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
@@ -120,7 +132,7 @@
description="Creates the Javadoc API documentation">
<mkdir dir="${build.javadoc}"/>
-@@ -562,8 +534,7 @@
+@@ -620,8 +592,7 @@
doctitle="${name} ${version} API"
encoding="UTF-8"
docencoding="UTF-8"
@@ -130,7 +142,7 @@
<link href="${javadocs.ref.jsdk}"/>
<link
href="http://www.jdom.org/docs/apidocs"/>
-@@ -918,12 +889,11 @@
+@@ -1024,12 +995,11 @@
<!-- Make HTML version of Velocity documentation -->
<!-- =================================================================== -->
@@ -145,16 +157,16 @@
<echo>
#######################################################
-@@ -1106,7 +1076,7 @@
+@@ -1231,7 +1201,7 @@
<!-- =================================================================== -->
<!-- JUnit Tests for Velocity -->
<!-- =================================================================== -->
-- <target name="test" depends="build-prepare,compile-test"
-+ <target name="test" depends="compile-test"
+- <target name="test-main" depends="build-prepare,compile-test"
++ <target name="test-main" depends="compile-test"
description="Run the Velocity testcases">
- <mkdir dir="${build.test.reports}"/>
-@@ -1120,8 +1090,6 @@
+ <!-- Require ant 1.7+ for Junit compatibility -->
+@@ -1264,8 +1234,6 @@
<!-- Don't use the run classpath, test using the exploded class tree
-->
<classpath>
@@ -163,8 +175,10 @@
<pathelement path="${build.dest}"/>
<pathelement path="${build.test.dest}"/>
</classpath>
---- velocity-1.6.3.mef/build/testcases.xml.orig 2010-01-15 13:09:06.265907075 +0000
-+++ velocity-1.6.3.mef/build/testcases.xml 2010-01-15 13:09:08.356067618 +0000
+diff --git a/build/testcases.xml b/build/testcases.xml
+index 06bb36e..f3749bc 100644
+--- a/build/testcases.xml
++++ b/build/testcases.xml
@@ -36,12 +36,6 @@
<!-- Build classpath -->
@@ -178,3 +192,6 @@
<pathelement location="${build.dest}"/>
<pathelement location="${build.test.dest}"/>
</path>
+--
+1.7.4
+
diff --git a/sources b/sources
index 8f5d166..1e62099 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1ba4363ac104301db59075dae0c9e7d0 velocity-1.6.4.tar.gz
+6af13ea297dee7ddbabeaa8e3963c184 velocity-1.7.tar.gz
diff --git a/velocity-1.6.4.pom b/velocity-1.7.pom
similarity index 92%
rename from velocity-1.6.4.pom
rename to velocity-1.7.pom
index 18aa4f5..77a8e38 100644
--- a/velocity-1.6.4.pom
+++ b/velocity-1.7.pom
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,7 +18,10 @@
specific language governing permissions and limitations
under the License.
-->
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -29,10 +33,10 @@
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
- <version>1.6.4</version>
+ <version>1.7</version>
<name>Apache Velocity</name>
- <
url>http://velocity.apache.org/engine/releases/velocity-1.6.2/</url...
+ <
url>http://velocity.apache.org/engine/devel/</url>
<description>Apache Velocity is a general purpose template
engine.</description>
<inceptionYear>2000</inceptionYear>
<packaging>jar</packaging>
@@ -69,7 +73,7 @@
<distributionManagement>
<site>
<id>velocity.apache.org</id>
-
<
url>scpexe://people.apache.org/www/velocity.apache.org/engine/releases...
+
<
url>scpexe://people.apache.org/www/velocity.apache.org/engine/releases...
</site>
<repository>
<id>apache.releases</id>
@@ -152,6 +156,7 @@
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>jdom</groupId>
@@ -312,14 +317,22 @@
<findbugsXmlOutputDirectory>xdocs</findbugsXmlOutputDirectory>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
</plugins>
</reporting>
<scm>
-
<
connection>scm:svn:http://svn.apache.org/repos/asf/velocity/engine/bra...
-
<
developerConnection>scm:svn:https://svn.apache.org/repos/asf/velocity/...
+
<
connection>scm:svn:http://svn.apache.org/repos/asf/velocity/engine/tru...
+
<
developerConnection>scm:svn:https://svn.apache.org/repos/asf/velocity/...
<tag>HEAD</tag>
- <
url>http://svn.apache.org/viewvc/velocity/engine/branches/1.6.x</ur...
+ <
url>http://svn.apache.org/viewvc/velocity/engine/trunk</url>
</scm>
<properties>
@@ -330,4 +343,4 @@
<system>JIRA</system>
<url>${jira.browse.url}/VELOCITY</url>
</issueManagement>
-</project>
\ No newline at end of file
+</project>
diff --git a/velocity.spec b/velocity.spec
index 1d761c5..9933474 100644
--- a/velocity.spec
+++ b/velocity.spec
@@ -29,26 +29,24 @@
#
Name: velocity
-Version: 1.6.4
-Release: 3%{?dist}
+Version: 1.7
+Release: 1%{?dist}
Epoch: 0
Summary: Java-based template engine
License: ASL 2.0
URL:
http://velocity.apache.org/
Source0:
http://www.apache.org/dist/%{name}/engine/%{version}/%{name}-%{version}.t...
Source1:
http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{nam...
-Patch0: velocity-remove-avalon-logkit.patch
-Patch1: velocity-use-system-jars.patch
-Patch2: velocity-servletapi5.patch
-Patch3: velocity-cleanup-pom.patch
-Patch4: velocity-tomcat6.patch
+Patch0: 0001-Remove-avalon-logkit.patch
+Patch1: 0002-Fix-servlet25-testcase.patch
+Patch2: 0003-Use-system-jars.patch
Group: Development/Libraries
Requires: apache-commons-collections
Requires: apache-commons-logging
Requires: apache-commons-lang
Requires: tomcat6-servlet-2.5-api
-Requires: oro
-Requires: werken-xpath
+Requires: jakarta-oro
+Requires: werken-xpath
Requires: junit
Requires: hsqldb
Requires: jdom
@@ -67,7 +65,7 @@ BuildRequires: apache-commons-collections
BuildRequires: apache-commons-logging
BuildRequires: apache-commons-lang
BuildRequires: tomcat6-servlet-2.5-api
-BuildRequires: oro
+BuildRequires: jakarta-oro
BuildRequires: jdom
BuildRequires: bcel
BuildRequires: log4j
@@ -133,20 +131,18 @@ find . -name '*.jar' -o -name '*.class' -not -path
'*test*' -print -delete
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
+
+cp %{SOURCE1} ./pom.xml
+
+# remove rest of avalon logkit refences
%patch0 -p1
-# Use system jars instead of downloading
+# Fix test cases for servlet25
%patch1 -p1
-#Apply patch to remove explicit dependency on servletapi3
+# Use system jar files instead of downloading from net
%patch2 -p1
-# Remove (unavailable) parent reference and avalon-logkit from POM
-cp %{SOURCE1} ./pom.xml
-%patch3 -p1
-
-# fix test for servlet api 2.5
-%patch4 -p1
# -----------------------------------------------------------------------------
@@ -158,11 +154,11 @@ commons-lang \
commons-logging \
tomcat6-servlet-2.5-api \
junit \
-oro \
+jakarta-oro \
log4j \
jdom \
bcel \
-werken.xpath \
+werken-xpath \
hsqldb \
junit)
ant \
@@ -176,7 +172,6 @@ sed -i 's/\r//' docs/api/stylesheet.css docs/api/package-list
# -----------------------------------------------------------------------------
%install
-rm -rf %{buildroot}
# jars
install -d -m 755 %{buildroot}%{_javadir}
@@ -188,7 +183,7 @@ cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name}
# data
install -d -m 755 %{buildroot}%{_datadir}/%{name}
-cp -pr convert examples test %{buildroot}%{_datadir}/%{name}
+cp -pr examples test %{buildroot}%{_datadir}/%{name}
# Maven metadata
install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
@@ -228,6 +223,10 @@ install -pD -T -m 644 pom.xml
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%{_datadir}/%{name}
%changelog
+* Mon Feb 21 2011 Stanislav Ochotnicky <sochotnicky(a)redhat.com> - 0:1.7-1
+- Update to latest version
+- Drop old patches
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
0:1.6.4-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild