diff --git a/.velocity.metadata b/.velocity.metadata new file mode 100644 index 0000000..52daf08 --- /dev/null +++ b/.velocity.metadata @@ -0,0 +1 @@ +513c8a8c2aa4459d777a53634fc331bfd986e033 SOURCES/velocity-1.7.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Don-t-use-Werken-XPath.patch b/SOURCES/0001-Don-t-use-Werken-XPath.patch new file mode 100644 index 0000000..b754573 --- /dev/null +++ b/SOURCES/0001-Don-t-use-Werken-XPath.patch @@ -0,0 +1,165 @@ +From 8a9344f55d74a5b809051ae144b3c028499fec0d Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Sat, 27 Sep 2013 10:53:46 +0200 +Subject: [PATCH] Don't use Werken XPath + +--- + src/java/org/apache/velocity/anakia/AnakiaElement.java | 7 +++++-- + src/java/org/apache/velocity/anakia/NodeList.java | 6 ++++-- + src/java/org/apache/velocity/anakia/XPathCache.java | 9 ++++++--- + src/java/org/apache/velocity/anakia/XPathTool.java | 16 ++++++++++------ + 4 files changed, 25 insertions(+), 13 deletions(-) + +diff --git a/src/java/org/apache/velocity/anakia/AnakiaElement.java b/src/java/org/apache/velocity/anakia/AnakiaElement.java +index c72b653..df13153 100644 +--- a/src/java/org/apache/velocity/anakia/AnakiaElement.java ++++ b/src/java/org/apache/velocity/anakia/AnakiaElement.java +@@ -20,8 +20,10 @@ package org.apache.velocity.anakia; + */ + + import org.jdom.Element; ++import org.jdom.JDOMException; + import org.jdom.Namespace; + import org.jdom.output.XMLOutputter; ++ + import java.util.List; + + /** +@@ -126,10 +128,11 @@ public class AnakiaElement extends Element + * @param xpathExpression the XPath expression you wish to apply + * @return a NodeList representing the nodes that are the result of + * application of the XPath to the current element. It can be empty. ++ * @throws JDOMException + */ +- public NodeList selectNodes(String xpathExpression) ++ public NodeList selectNodes(String xpathExpression) throws JDOMException + { +- return new NodeList(XPathCache.getXPath(xpathExpression).applyTo(this), false); ++ return new NodeList(XPathCache.getXPath(xpathExpression).selectNodes(this), false); + } + + /** +diff --git a/src/java/org/apache/velocity/anakia/NodeList.java b/src/java/org/apache/velocity/anakia/NodeList.java +index daf611d..b303bda 100644 +--- a/src/java/org/apache/velocity/anakia/NodeList.java ++++ b/src/java/org/apache/velocity/anakia/NodeList.java +@@ -35,6 +35,7 @@ import org.jdom.DocType; + import org.jdom.Document; + import org.jdom.Element; + import org.jdom.EntityRef; ++import org.jdom.JDOMException; + import org.jdom.ProcessingInstruction; + import org.jdom.Text; + import org.jdom.output.XMLOutputter; +@@ -289,10 +290,11 @@ public class NodeList implements List, Cloneable + * @param xpathString the XPath expression you wish to apply + * @return a NodeList representing the nodes that are the result of + * application of the XPath to the current node list. It can be empty. ++ * @throws JDOMException + */ +- public NodeList selectNodes(String xpathString) ++ public NodeList selectNodes(String xpathString) throws JDOMException + { +- return new NodeList(XPathCache.getXPath(xpathString).applyTo(nodes), false); ++ return new NodeList(XPathCache.getXPath(xpathString).selectNodes(nodes), false); + } + + // List methods implemented hereafter +diff --git a/src/java/org/apache/velocity/anakia/XPathCache.java b/src/java/org/apache/velocity/anakia/XPathCache.java +index cef43d9..0d633b0 100644 +--- a/src/java/org/apache/velocity/anakia/XPathCache.java ++++ b/src/java/org/apache/velocity/anakia/XPathCache.java +@@ -19,7 +19,9 @@ package org.apache.velocity.anakia; + * under the License. + */ + +-import com.werken.xpath.XPath; ++import org.jdom.JDOMException; ++import org.jdom.xpath.XPath; ++ + import java.util.Map; + import java.util.WeakHashMap; + +@@ -46,8 +48,9 @@ class XPathCache + * A cached object is returned if it already exists for the requested expression. + * @param xpathString the XPath expression to parse + * @return the XPath object that represents the parsed XPath expression. ++ * @throws JDOMException + */ +- static XPath getXPath(String xpathString) ++ static XPath getXPath(String xpathString) throws JDOMException + { + XPath xpath = null; + synchronized(XPATH_CACHE) +@@ -55,7 +58,7 @@ class XPathCache + xpath = (XPath)XPATH_CACHE.get(xpathString); + if(xpath == null) + { +- xpath = new XPath(xpathString); ++ xpath = XPath.newInstance(xpathString); + XPATH_CACHE.put(xpathString, xpath); + } + } +diff --git a/src/java/org/apache/velocity/anakia/XPathTool.java b/src/java/org/apache/velocity/anakia/XPathTool.java +index c9e6178..f85d2c1 100644 +--- a/src/java/org/apache/velocity/anakia/XPathTool.java ++++ b/src/java/org/apache/velocity/anakia/XPathTool.java +@@ -23,6 +23,7 @@ import java.util.List; + + import org.jdom.Document; + import org.jdom.Element; ++import org.jdom.JDOMException; + + /** + * This class adds an entrypoint into XPath functionality, +@@ -88,12 +89,13 @@ public class XPathTool + * @param doc The Document context + * + * @return A list of selected nodes ++ * @throws JDOMException + */ + public NodeList applyTo(String xpathSpec, +- Document doc) ++ Document doc) throws JDOMException + { + //RuntimeSingleton.info("XPathTool::applyTo(String, Document)"); +- return new NodeList(XPathCache.getXPath(xpathSpec).applyTo( doc ), false); ++ return new NodeList(XPathCache.getXPath(xpathSpec).selectNodes( doc ), false); + } + + /** +@@ -103,12 +105,13 @@ public class XPathTool + * @param elem The Element context + * + * @return A list of selected nodes ++ * @throws JDOMException + */ + public NodeList applyTo(String xpathSpec, +- Element elem) ++ Element elem) throws JDOMException + { + //RuntimeSingleton.info("XPathTool::applyTo(String, Element)"); +- return new NodeList(XPathCache.getXPath(xpathSpec).applyTo( elem ), false); ++ return new NodeList(XPathCache.getXPath(xpathSpec).selectNodes( elem ), false); + } + + /** +@@ -118,12 +121,13 @@ public class XPathTool + * @param nodeSet The nodeset context + * + * @return A list of selected nodes ++ * @throws JDOMException + */ + public NodeList applyTo(String xpathSpec, +- List nodeSet) ++ List nodeSet) throws JDOMException + { + //RuntimeSingleton.info("XPathTool::applyTo(String, List)"); +- return new NodeList(XPathCache.getXPath(xpathSpec).applyTo( nodeSet ), false); ++ return new NodeList(XPathCache.getXPath(xpathSpec).selectNodes( nodeSet ), false); + } + } + +-- +1.8.3.1 + diff --git a/SOURCES/0001-Remove-avalon-logkit.patch b/SOURCES/0001-Remove-avalon-logkit.patch new file mode 100644 index 0000000..2f09b03 --- /dev/null +++ b/SOURCES/0001-Remove-avalon-logkit.patch @@ -0,0 +1,62 @@ +From 1d2f89cb3e954b943751fa8dd587fdb404eb9338 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +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 @@ + provided + + +- logkit +- logkit +- 2.0 +- provided +- +- + ant + ant + 1.6 +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/SOURCES/0003-Use-system-jars.patch b/SOURCES/0003-Use-system-jars.patch new file mode 100644 index 0000000..3d37ee8 --- /dev/null +++ b/SOURCES/0003-Use-system-jars.patch @@ -0,0 +1,197 @@ +From 813085c72e9906a53bec5954bcce7305a7c320d1 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +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 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + + +@@ -174,12 +152,11 @@ + + + +- ++ + + + +- + + + +@@ -210,10 +187,9 @@ + + + +- ++ + +- + + + +@@ -248,7 +224,7 @@ + + + +- + ++ optimize="${optimize}"/> + + + +@@ -268,7 +243,7 @@ + + + +- + + +- +- + + + +@@ -561,7 +534,7 @@ + + + +- + + +@@ -585,8 +558,7 @@ + encoding="UTF-8" + debug="${debug}" + deprecation="${deprecation}" +- optimize="${optimize}" +- classpathref="velocity.run.classpath"/> ++ optimize="${optimize}"/> + + + +@@ -604,7 +576,7 @@ + + + +- + + +@@ -620,8 +592,7 @@ + doctitle="${name} ${version} API" + encoding="UTF-8" + docencoding="UTF-8" +- bottom="Copyright © 2000-${build.year} <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved." +- classpathref="velocity.build.classpath"> ++ bottom="Copyright © 2000-${build.year} <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved."> + + + +@@ -1024,12 +995,11 @@ + + + +- + + ++ classname="org.apache.velocity.anakia.AnakiaTask"/> + + + ####################################################### +@@ -1231,7 +1201,7 @@ + + + +- + + +@@ -1264,8 +1234,6 @@ + + + +- +- + + + +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 @@ + + + +- +- +- +- +- +- + + + +-- +1.7.4 + diff --git a/SOURCES/0004-JDBC-41-compat.patch b/SOURCES/0004-JDBC-41-compat.patch new file mode 100644 index 0000000..c137bac --- /dev/null +++ b/SOURCES/0004-JDBC-41-compat.patch @@ -0,0 +1,19 @@ +--- a/src/test/org/apache/velocity/test/sql/HsqlDataSource.java 2012-02-15 19:49:20.202936454 -0500 ++++ b/src/test/org/apache/velocity/test/sql/HsqlDataSource.java 2012-02-15 19:52:35.062574871 -0500 +@@ -23,6 +23,7 @@ + import java.sql.Connection; + import java.sql.DriverManager; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + + import javax.sql.DataSource; + +@@ -73,5 +74,8 @@ + public Object unwrap(final Class iface) throws SQLException { + throw new SQLException("Not implemented"); + } ++ public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException("getParentLogger() not supported"); ++ } + + } diff --git a/SOURCES/velocity-1.7.pom b/SOURCES/velocity-1.7.pom new file mode 100644 index 0000000..77a8e38 --- /dev/null +++ b/SOURCES/velocity-1.7.pom @@ -0,0 +1,346 @@ + + + + + + + 4.0.0 + + + org.apache + apache + 4 + + + org.apache.velocity + velocity + 1.7 + + Apache Velocity + http://velocity.apache.org/engine/devel/ + Apache Velocity is a general purpose template engine. + 2000 + jar + + + 2.0.9 + + + + install + src/java + src/test + + + org.apache.maven.plugins + maven-site-plugin + + UTF-8 + UTF-8 + ${basedir}/xdocs/docs + + + + + + src/java + + **/*.java + + + + + + + + velocity.apache.org + scpexe://people.apache.org/www/velocity.apache.org/engine/releases/velocity-1.7 + + + apache.releases + Apache Release Distribution Repository + scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository + + + apache.snapshots + Apache Development Snapshot Repository + scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository + + + + + + Will Glass-Husain + wglass + wglass@forio.com + Forio Business Simulations + + Java Developer + + + + + Geir Magnusson Jr. + geirm + geirm@optonline.net + Independent (DVSL Maven) + + Java Developer + + + + + Daniel Rall + dlr + dlr@finemaltcoding.com + CollabNet, Inc. + + Java Developer + + + + + Henning P. Schmiedehausen + henning + hps@intermeta.de + INTERMETA - Gesellschaft für Mehrwertdienste mbH + + Java Developer + + 2 + + + + Nathan Bubna + nbubna + nathan@esha.com + ESHA Research + + Java Developer + + + + + + + + commons-collections + commons-collections + 3.2.1 + + + commons-lang + commons-lang + 2.4 + + + oro + oro + 2.0.8 + true + + + jdom + jdom + 1.0 + provided + + + commons-logging + commons-logging + 1.1 + provided + + + avalon-framework + avalon-framework + + + log4j + log4j + + + javax.servlet + servlet-api + + + + + log4j + log4j + 1.2.12 + provided + + + javax.servlet + servlet-api + 2.3 + provided + + + logkit + logkit + 2.0 + provided + + + ant + ant + 1.6 + provided + + + werken-xpath + werken-xpath + 0.9.4 + provided + + + junit + junit + 3.8.1 + test + + + hsqldb + hsqldb + 1.7.1 + test + + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.1 + + + + dependencies + issue-tracking + license + summary + scm + + + + + + org.apache.maven.plugins + maven-changes-plugin + 2.0 + + + + changes-report + jira-report + + + + + ${jira.browse.url}/%ISSUE% + + 12311337 + + fixfor=12310290&sorter/field=issuekey&sorter/order=ASC + 100 + http://velocity.apache.org/who-we-are.html + + + + org.codehaus.mojo + taglist-maven-plugin + 2.2 + + TODO + FIXME + + + + org.apache.maven.plugins + maven-jxr-plugin + 2.1 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.5 + + + http://java.sun.com/j2se/1.4.2/docs/api + http://jakarta.apache.org/oro/api + http://jakarta.apache.org/commons/lang/api-release + http://jakarta.apache.org/commons/collections/api-release + + http://www.jdom.org/docs/apidocs + http://logging.apache.org/log4j/docs/api + http://excalibur.apache.org/apidocs + http://tomcat.apache.org/tomcat-4.1-doc/servletapi + + + + + org.apache.maven.plugins + maven-changelog-plugin + 2.1 + + + org.codehaus.mojo + findbugs-maven-plugin + 1.2 + + true + Low + Max + build/findbugs-exclude.xml + xdocs + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.4 + 1.4 + + + + + + + scm:svn:http://svn.apache.org/repos/asf/velocity/engine/trunk + scm:svn:https://svn.apache.org/repos/asf/velocity/engine/trunk + HEAD + http://svn.apache.org/viewvc/velocity/engine/trunk + + + + https://issues.apache.org/jira/browse + + + + JIRA + ${jira.browse.url}/VELOCITY + + diff --git a/SPECS/velocity.spec b/SPECS/velocity.spec new file mode 100644 index 0000000..e92ad50 --- /dev/null +++ b/SPECS/velocity.spec @@ -0,0 +1,420 @@ +# Copyright (c) 2000-2005, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the +# distribution. +# 3. Neither the name of the JPackage Project nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +Name: velocity +Version: 1.7 +Release: 9%{?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}.tar.gz +Source1: http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}.pom +Patch0: 0001-Remove-avalon-logkit.patch +Patch2: 0003-Use-system-jars.patch +Patch3: 0004-JDBC-41-compat.patch +Group: Development/Libraries +Patch4: 0001-Don-t-use-Werken-XPath.patch +Requires: apache-commons-collections +Requires: apache-commons-logging +Requires: apache-commons-lang +Requires: servlet3 +Requires: jakarta-oro +Requires: junit +Requires: hsqldb +Requires: jaxen +Requires: jdom +Requires: bcel +Requires: log4j + +BuildRequires: ant +BuildRequires: antlr +BuildRequires: junit +BuildRequires: ant-junit +BuildRequires: hsqldb +BuildRequires: apache-commons-collections +BuildRequires: apache-commons-logging +BuildRequires: apache-commons-lang +BuildRequires: servlet3 +BuildRequires: jakarta-oro +BuildRequires: jaxen +BuildRequires: jdom +BuildRequires: bcel +BuildRequires: log4j +BuildRequires: jpackage-utils + +# It fails one of the arithmetic test cases with gcj +BuildRequires: java-devel >= 1:1.6.0 +BuildArch: noarch + +%description +Velocity is a Java-based template engine. It permits anyone to use the +simple yet powerful template language to reference objects defined in +Java code. +When Velocity is used for web development, Web designers can work in +parallel with Java programmers to develop web sites according to the +Model-View-Controller (MVC) model, meaning that web page designers can +focus solely on creating a site that looks good, and programmers can +focus solely on writing top-notch code. Velocity separates Java code +from the web pages, making the web site more maintainable over the long +run and providing a viable alternative to Java Server Pages (JSPs) or +PHP. +Velocity's capabilities reach well beyond the realm of web sites; for +example, it can generate SQL and PostScript and XML (see Anakia for more +information on XML transformations) from templates. It can be used +either as a standalone utility for generating source code and reports, +or as an integrated component of other systems. Velocity also provides +template services for the Turbine web application framework. +Velocity+Turbine provides a template service that will allow web +applications to be developed according to a true MVC model. + +%package manual +Summary: Manual for %{name} +Group: Documentation + +%description manual +Documentation for %{name}. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation +Requires: jpackage-utils + +%description javadoc +Javadoc for %{name}. + +%package demo +Summary: Demo for %{name} +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description demo +Demonstrations and samples for %{name}. + +# ----------------------------------------------------------------------------- + +%prep +%setup -q -n %{name}-%{version} + +# remove bundled libs/classes (except those used for testing) +find . -name '*.jar' -o -name '*.class' -not -path '*test*' -print -delete + +# Remove dependency on avalon-logkit +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 + +# Use system jar files instead of downloading from net +%patch2 -p1 + +%patch3 -p1 + +# Use jdom instead of werken-xpath +%patch4 -p1 +%pom_remove_dep werken-xpath: + +# ----------------------------------------------------------------------------- + +%build +export CLASSPATH=$(build-classpath \ +antlr \ +apache-commons-collections \ +commons-lang \ +commons-logging \ +tomcat-servlet-api \ +junit \ +jakarta-oro \ +log4j \ +jaxen \ +jdom \ +bcel \ +hsqldb \ +junit) +ant \ + -buildfile build/build.xml \ + -Dbuild.sysclasspath=first \ + jar javadocs test + +# fix line-endings in generated files +sed -i 's/\r//' docs/api/stylesheet.css docs/api/package-list + +# ----------------------------------------------------------------------------- + +%install + +# jars +install -d -m 755 %{buildroot}%{_javadir} +install -p -m 644 bin/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar + +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name} + +# data +install -d -m 755 %{buildroot}%{_datadir}/%{name} +cp -pr examples test %{buildroot}%{_datadir}/%{name} + +# Maven metadata +install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom + +%add_maven_depmap -a "%{name}:%{name}" + + +%files +%doc LICENSE NOTICE README.txt +%{_javadir}/*.jar +%{_mavendepmapfragdir}/%{name} +%{_mavenpomdir}/JPP-%{name}.pom + +%files manual +%doc LICENSE NOTICE +%doc docs/* + +%files javadoc +%doc LICENSE NOTICE +%{_javadocdir}/%{name} + +%files demo +%doc LICENSE NOTICE +%{_datadir}/%{name} + +%changelog +* Fri Sep 27 2013 Mikolaj Izdebski - 0:1.7-9 +- Port from werken-xpath to jdom +- Resolves: rhbz#875817 + +* Fri Jun 28 2013 Mikolaj Izdebski - 0:1.7-8 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Fri Feb 15 2013 Fedora Release Engineering - 0:1.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Nov 21 2012 Mikolaj Izdebski - 0:1.7-6 +- Install NOTICE files +- Resolves: rhbz#879021 + +* Sun Jul 22 2012 Fedora Release Engineering - 0:1.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jun 05 2012 Stanislav Ochotnicky - 0:1.7-4 +- Use new tomcat-servlet-api +- Update to latest guidelines + +* Fri Feb 17 2012 Deepak Bhole - 0:1.7-3 +- Resolved rhbz#791045 +- Added patch from Omaid Majid to fix build with Java 7 + +* Sat Jan 14 2012 Fedora Release Engineering - 0:1.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 21 2011 Stanislav Ochotnicky - 0:1.7-1 +- Update to latest version +- Drop old patches + +* Mon Feb 07 2011 Fedora Release Engineering - 0:1.6.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Dec 17 2010 Stanislav Ochotnicky - 0:1.6.4-2 +- Add compatibility depmap + +* Wed Nov 3 2010 Stanislav Ochotnicky - 0:1.6.4-1 +- Rebase to latest upstream +- Fix problems from bz#226525 + +* Thu Oct 14 2010 Stanislav Ochotnicky - 0:1.6.3-5 +- Use apache-commons-collections instead of jakarta name +- Use tomcat6 for dependency instead of tomcat5 (bz#640660) + +* Mon Jun 7 2010 Alexander Kurtakov 0:1.6.3-4 +- Fix BR/R for jakarta-commons-rename. + +* Sat Feb 13 2010 Mary Ellen Foster 0:1.6.3-3 +- Get (Build)Requires right + +* Sat Feb 13 2010 Mary Ellen Foster 0:1.6.3-2 +- Require all of the packages in the POM +- Add dist to version + +* Fri Jan 15 2010 Mary Ellen Foster 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 0:1.4-10.5 +- Drop gcj_support. +- Fix groups and url. +- Use upstream tarball. + +* Mon Aug 10 2009 Ville Skyttä - 0:1.4-10.4 +- Convert specfile to UTF-8. + +* Sun Jul 26 2009 Fedora Release Engineering - 0:1.4-9.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Apr 24 2009 Milos Jakubicek - 0:1.4-8.4 +- Fix FTBFS: added velocity-enum.patch (enum is a reserved keyword in java >= 1.5) + +* Wed Feb 25 2009 Fedora Release Engineering - 0:1.4-8.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Jul 10 2008 Tom "spot" Callaway - 0:1.4-7.3 +- drop repotag + +* Thu May 29 2008 Tom "spot" Callaway - 0:1.4-7jpp.2 +- fix license tag + +* Tue Feb 19 2008 Fedora Release Engineering - 0:1.4-7jpp.1 +- Autorebuild for GCC 4.3 + +* Tue Aug 08 2006 Vivek Lakshmanan - 0:1.4-6jpp.1 +- Resync with latest from JPP. +- Partially adopt new naming convention. + +* Sat Jul 22 2006 Vivek Lakshmanan - 0:1.4-5jpp_2fc +- Rebuilt + +* Sat Jul 22 2006 Vivek Lakshmanan - 0:1.4-5jpp_1fc +- Merge with latest from JPP. +- Remove fileversion and my_version macros. +- Remove notexentests patch and replace with a patch to disable +- failure on tests. + +* Sat Jul 22 2006 Jakub Jelinek - 0:1.4-3jpp_8fc +- Rebuilt + +* Tue Jul 18 2006 Deepak Bhole - 0:1.4-3jpp_7fc +- Build on all archs. + +* Wed Jul 12 2006 Jesse Keating - 0:1.4-3jpp_6fc +- rebuild + +* Wed Mar 8 2006 Rafael Schloming - 0:1.4-3jpp_5fc +- excluded s390[x] and ppc64 due to eclipse + +* Mon Mar 6 2006 Jeremy Katz - 0:1.4-3jpp_4fc +- stop scriptlet spew + +* Wed Dec 21 2005 Jesse Keating - 0:1.4-3jpp_3fc +- rebuilt again + +* Fri Dec 09 2005 Jesse Keating - 0:1.4-3jpp_2fc +- rebuilt + +* Tue Nov 8 2005 Vadim Nasardinov - 0:1.4-3jpp_1fc +- Converted from ISO-8859-1 to UTF-8 + +* Wed Jun 15 2005 Gary Benson 0:1.4-3jpp_1fc +- Build into Fedora. + +* Thu Jun 9 2005 Gary Benson +- Remove jarfiles from the tarball. + +* Mon Jun 6 2005 Gary Benson +- Build with servletapi5. +- Add NOTICE file as per Apache License version 2.0. +- Skip some failing tests. + +* Mon Oct 18 2004 Fernando Nasser 0:1.4-3jpp_1rh +- First Red Hat build + +* Thu Sep 23 2004 Ralph Apel 0:1.4-3jpp +- Adapt to jdom-1.0-1 replacing org.jdom.input.DefaultJDOMFactory + by org.jdom.DefaultJDOMFactory in AnakiaJDOMFactory.java + as well as using org.jdom.output.Format in AnakiaTask.java +- Therefore require jdom >= 0:1.0-1 + +* Thu Sep 02 2004 Ralph Apel 0:1.4-2jpp +- Build with ant-1.6.2 + +* Mon Jun 07 2004 Kaj J. Niemi 0:1.4-1jpp +- 1.4 final +- Patch #0 is unnecessary (upstream) +- We have to build velocity against servletapi3 + +* Wed Feb 18 2004 Kaj J. Niemi 0:1.4-0.rc1.2jpp +- Fix a few jpackage related .spec typos, oops. + +* Wed Feb 18 2004 Kaj J. Niemi 0:1.4-0.rc1.1jpp +- Added Patch #0 (velocity-1.4-rc1-ServletTest.patch) from CVS which fixes + build problems. + +* Sun May 25 2003 Ville Skyttä - 0:1.3.1-2jpp +- Add Epochs to dependencies. +- Add explicit defattrs. +- Add non-versioned javadoc symlinks. +- Use sed instead of bash 2 extension when symlinking jars during build. +- Use full URL in Source. +- Fix -javadoc Group tag. +- Drop patch in favour of ant options. +- BuildRequire jpackage-utils and antlr (latter needed for Anakia tests). + +* Sat May 24 2003 Richard Bullington-McGuire 1.3.1-1jpp +- 1.3.1 stable release + +* Fri May 23 2003 Richard Bullington-McGuire 1.3-1jpp +- 1.3 stable release +- Updated for JPackage 1.5 +- Run JUnit regression tests as part of the build process +- Added patch file to fix test case classpath for JUnit standard locations + +* Mon May 06 2002 Guillaume Rousse 1.3-0.rc1.1jpp +- 1.3.0rc1 +- dropped patch +- versioned dir for javadoc +- no dependencies for manual and javadoc packages +- stricter dependency for demo package + +* Wed Dec 12 2001 Guillaume Rousse 1.2-1jpp +- 1.2 +- regenerated patch and corrected manifest +- requires and buildrequires jdom >= 1.0-0.b7.1 + +* Wed Dec 5 2001 Guillaume Rousse 1.1-4jpp +- javadoc into javadoc package + +* Wed Nov 21 2001 Christian Zoffoli 1.1-3jpp +- removed packager tag +- new jpp extension + +* Thu Nov 1 2001 Guillaume Rousse 1.1-2jpp +- first unified release +- s/jPackage/JPackage + +* Fri Sep 14 2001 Guillaume Rousse 1.1-1jpp +- first Mandrake release