Revert "Update to upstream version 2.1"
This reverts commit982f6ca327
. This reverts commitfcf964c067
. This reverts commitd5b08e3229
. This reverts commit181e17359c
. This reverts commit400fd08b90
.
This commit is contained in:
parent
400fd08b90
commit
34fb8566e6
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
velocity-1.6.3.tar.gz
|
velocity-1.6.3.tar.gz
|
||||||
/velocity-1.6.4.tar.gz
|
/velocity-1.6.4.tar.gz
|
||||||
/velocity-1.7.tar.gz
|
/velocity-1.7.tar.gz
|
||||||
/velocity-engine-parent-2.1-source-release.zip
|
|
||||||
|
165
0001-Don-t-use-Werken-XPath.patch
Normal file
165
0001-Don-t-use-Werken-XPath.patch
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
From 8a9344f55d74a5b809051ae144b3c028499fec0d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
|
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
|
||||||
|
|
62
0001-Remove-avalon-logkit.patch
Normal file
62
0001-Remove-avalon-logkit.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
From 1d2f89cb3e954b943751fa8dd587fdb404eb9338 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stanislav Ochotnicky <sochotnicky@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
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From f324b264d31a0225566f9e2a33fd7ffe661c866b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marian Koncek <mkoncek@redhat.com>
|
|
||||||
Date: Fri, 7 Jun 2019 08:52:02 +0200
|
|
||||||
Subject: [PATCH] Remove parent velocity-master
|
|
||||||
|
|
||||||
---
|
|
||||||
pom.xml | 8 +-------
|
|
||||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
|
||||||
index ee7b1e5..7c408cc 100644
|
|
||||||
--- a/pom.xml
|
|
||||||
+++ b/pom.xml
|
|
||||||
@@ -23,13 +23,7 @@
|
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
- <parent>
|
|
||||||
- <groupId>org.apache.velocity</groupId>
|
|
||||||
- <artifactId>velocity-master</artifactId>
|
|
||||||
- <version>2</version>
|
|
||||||
- <relativePath />
|
|
||||||
- </parent>
|
|
||||||
-
|
|
||||||
+ <groupId>org.apache.velocity</groupId>
|
|
||||||
<artifactId>velocity-engine-parent</artifactId>
|
|
||||||
<version>2.1</version>
|
|
||||||
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From 3244501d1dd7906a9421ed3acba1fc5e2d1ac21c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marian Koncek <mkoncek@redhat.com>
|
|
||||||
Date: Fri, 7 Jun 2019 09:47:34 +0200
|
|
||||||
Subject: [PATCH 2/2] Fix javacc template keyword
|
|
||||||
|
|
||||||
---
|
|
||||||
velocity-engine-core/src/main/parser/Parser.jjt | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/velocity-engine-core/src/main/parser/Parser.jjt b/velocity-engine-core/src/main/parser/Parser.jjt
|
|
||||||
index 720643d..2e7f6b3 100644
|
|
||||||
--- a/velocity-engine-core/src/main/parser/Parser.jjt
|
|
||||||
+++ b/velocity-engine-core/src/main/parser/Parser.jjt
|
|
||||||
@@ -211,12 +211,12 @@ public class Parser
|
|
||||||
* method and re-initializing the lexer with
|
|
||||||
* the new stream that we want parsed.
|
|
||||||
*/
|
|
||||||
- public SimpleNode parse( Reader reader, Template template )
|
|
||||||
+ public SimpleNode parse( Reader reader, Template templateInput )
|
|
||||||
throws ParseException
|
|
||||||
{
|
|
||||||
SimpleNode sn = null;
|
|
||||||
|
|
||||||
- currentTemplate = template;
|
|
||||||
+ currentTemplate = templateInput;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
@@ -244,7 +244,7 @@ public class Parser
|
|
||||||
* thrown by the Macro class when something is amiss in the
|
|
||||||
* Macro specification
|
|
||||||
*/
|
|
||||||
- log.error("{}: {}", template.getName(), mee.getMessage(), mee);
|
|
||||||
+ log.error("{}: {}", templateInput.getName(), mee.getMessage(), mee);
|
|
||||||
throw mee;
|
|
||||||
}
|
|
||||||
catch (ParseException pe)
|
|
||||||
@@ -259,7 +259,7 @@ public class Parser
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
- String msg = template.getName() + ": " + e.getMessage();
|
|
||||||
+ String msg = templateInput.getName() + ": " + e.getMessage();
|
|
||||||
log.error(msg, e);
|
|
||||||
throw new VelocityException(msg, e);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
197
0003-Use-system-jars.patch
Normal file
197
0003-Use-system-jars.patch
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
From 813085c72e9906a53bec5954bcce7305a7c320d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stanislav Ochotnicky <sochotnicky@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) -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
- <target name="build-prepare">
|
||||||
|
- <ant antfile="${velocity.build.dir}/download.xml" target="build-download" />
|
||||||
|
-
|
||||||
|
- <!-- Build classpath -->
|
||||||
|
- <path id="velocity.build.classpath">
|
||||||
|
- <fileset dir="${build.lib}">
|
||||||
|
- <include name="**/*.jar"/>
|
||||||
|
- </fileset>
|
||||||
|
- </path>
|
||||||
|
-
|
||||||
|
- <!-- Test classpath, contains dependencies needed only for Testing -->
|
||||||
|
- <path id="velocity.test.classpath">
|
||||||
|
- <fileset dir="${build.test.lib}">
|
||||||
|
- <include name="**/*.jar"/>
|
||||||
|
- </fileset>
|
||||||
|
- </path>
|
||||||
|
-
|
||||||
|
- <path id="velocity.run.classpath">
|
||||||
|
- <path refid="velocity.build.classpath"/>
|
||||||
|
- <pathelement location="${build.dir}/${final.name}.jar"/>
|
||||||
|
- </path>
|
||||||
|
- </target>
|
||||||
|
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<!-- checks for the existence/non-existence of various java features -->
|
||||||
|
@@ -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"/>
|
||||||
|
|
||||||
|
- <target name="check-jdbc" depends="build-prepare">
|
||||||
|
+ <target name="check-jdbc">
|
||||||
|
<!-- note: check to see if required class is available. -->
|
||||||
|
<!-- might be j2ee.jar, jdbc2_0-stdext.jar, or simply JDK 1.4+ -->
|
||||||
|
<available classname="javax.sql.DataSource"
|
||||||
|
property="jdbc.present">
|
||||||
|
- <classpath refid="velocity.build.classpath"/>
|
||||||
|
</available>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
@@ -210,10 +187,9 @@
|
||||||
|
</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
- <target name="check-jdk14" depends="build-prepare">
|
||||||
|
+ <target name="check-jdk14">
|
||||||
|
<available classname="java.util.logging.Logger"
|
||||||
|
property="jdk14.present">
|
||||||
|
- <classpath refid="velocity.build.classpath"/>
|
||||||
|
</available>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
@@ -248,7 +224,7 @@
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<target name="compile" depends="compile-src,compile-test"/>
|
||||||
|
|
||||||
|
- <target name="compile-src" depends="prepare,build-prepare,check-jdbc,check-jdk14"
|
||||||
|
+ <target name="compile-src" depends="prepare,check-jdbc,check-jdk14"
|
||||||
|
description="Compiles the Velocity source">
|
||||||
|
<javac srcdir="${build.src}"
|
||||||
|
destdir="${build.dest}"
|
||||||
|
@@ -257,8 +233,7 @@
|
||||||
|
target="${javac.target}"
|
||||||
|
source="${javac.source}"
|
||||||
|
deprecation="${deprecation}"
|
||||||
|
- optimize="${optimize}"
|
||||||
|
- classpathref="velocity.build.classpath"/>
|
||||||
|
+ optimize="${optimize}"/>
|
||||||
|
|
||||||
|
<copy todir="${build.dest}" filtering="yes">
|
||||||
|
<fileset dir="${src.java.dir}">
|
||||||
|
@@ -268,7 +243,7 @@
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
- <target name="compile-test" depends="prepare,build-prepare,compile-src"
|
||||||
|
+ <target name="compile-test" depends="prepare,compile-src"
|
||||||
|
description="Compiles the Velocity test classes">
|
||||||
|
<javac srcdir="${build.test.src}"
|
||||||
|
destdir="${build.test.dest}"
|
||||||
|
@@ -279,8 +254,6 @@
|
||||||
|
|
||||||
|
<!-- Don't use the run classpath, build using the exploded class tree -->
|
||||||
|
<classpath>
|
||||||
|
- <path refid="velocity.build.classpath"/>
|
||||||
|
- <path refid="velocity.test.classpath" />
|
||||||
|
<pathelement location="${build.dest}"/>
|
||||||
|
</classpath>
|
||||||
|
</javac>
|
||||||
|
@@ -561,7 +534,7 @@
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<!-- Compiles the example code -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
- <target name="examples" depends="build-prepare,jar"
|
||||||
|
+ <target name="examples"
|
||||||
|
description="Compiles the Velocity Example code">
|
||||||
|
|
||||||
|
<echo>
|
||||||
|
@@ -585,8 +558,7 @@
|
||||||
|
encoding="UTF-8"
|
||||||
|
debug="${debug}"
|
||||||
|
deprecation="${deprecation}"
|
||||||
|
- optimize="${optimize}"
|
||||||
|
- classpathref="velocity.run.classpath"/>
|
||||||
|
+ optimize="${optimize}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="examples-clean" depends="examples-clean-anakia">
|
||||||
|
@@ -604,7 +576,7 @@
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<!-- Creates the API documentation -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
- <target name="javadocs" depends="prepare,build-prepare"
|
||||||
|
+ <target name="javadocs" depends="prepare"
|
||||||
|
description="Creates the Javadoc API documentation">
|
||||||
|
|
||||||
|
<mkdir dir="${build.javadoc}"/>
|
||||||
|
@@ -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.">
|
||||||
|
|
||||||
|
<link href="${javadocs.ref.jsdk}"/>
|
||||||
|
<link href="http://www.jdom.org/docs/apidocs"/>
|
||||||
|
@@ -1024,12 +995,11 @@
|
||||||
|
<!-- Make HTML version of Velocity documentation -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
|
||||||
|
- <target name="docs" depends="build-prepare,jar"
|
||||||
|
+ <target name="docs" depends="jar"
|
||||||
|
description="Generates the Velocity HTML documentation">
|
||||||
|
|
||||||
|
<taskdef name="anakia"
|
||||||
|
- classname="org.apache.velocity.anakia.AnakiaTask"
|
||||||
|
- classpathref="velocity.run.classpath"/>
|
||||||
|
+ classname="org.apache.velocity.anakia.AnakiaTask"/>
|
||||||
|
|
||||||
|
<echo>
|
||||||
|
#######################################################
|
||||||
|
@@ -1231,7 +1201,7 @@
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<!-- JUnit Tests for Velocity -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
- <target name="test-main" depends="build-prepare,compile-test"
|
||||||
|
+ <target name="test-main" depends="compile-test"
|
||||||
|
description="Run the Velocity testcases">
|
||||||
|
|
||||||
|
<!-- Require ant 1.7+ for Junit compatibility -->
|
||||||
|
@@ -1264,8 +1234,6 @@
|
||||||
|
|
||||||
|
<!-- Don't use the run classpath, test using the exploded class tree -->
|
||||||
|
<classpath>
|
||||||
|
- <path refid="velocity.build.classpath" />
|
||||||
|
- <path refid="velocity.test.classpath" />
|
||||||
|
<pathelement path="${build.dest}"/>
|
||||||
|
<pathelement path="${build.test.dest}"/>
|
||||||
|
</classpath>
|
||||||
|
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 -->
|
||||||
|
<path id="velocity.test.classpath">
|
||||||
|
- <fileset dir="${build.lib}">
|
||||||
|
- <include name="**/*.jar"/>
|
||||||
|
- </fileset>
|
||||||
|
- <fileset dir="${build.test.lib}">
|
||||||
|
- <include name="**/*.jar"/>
|
||||||
|
- </fileset>
|
||||||
|
<pathelement location="${build.dest}"/>
|
||||||
|
<pathelement location="${build.test.dest}"/>
|
||||||
|
</path>
|
||||||
|
--
|
||||||
|
1.7.4
|
||||||
|
|
19
0004-JDBC-41-compat.patch
Normal file
19
0004-JDBC-41-compat.patch
Normal file
@ -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");
|
||||||
|
+ }
|
||||||
|
|
||||||
|
}
|
25
0004-Use-log4j-1.2.17.patch
Normal file
25
0004-Use-log4j-1.2.17.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From cec42bf7ae8b4b72850c3cdea74a07603f11786f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
|
Date: Wed, 18 Jun 2014 07:25:12 +0200
|
||||||
|
Subject: [PATCH 4/4] Use log4j 1.2.17
|
||||||
|
|
||||||
|
---
|
||||||
|
pom.xml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/pom.xml b/pom.xml
|
||||||
|
index e35d72d..c8d48fd 100644
|
||||||
|
--- a/pom.xml
|
||||||
|
+++ b/pom.xml
|
||||||
|
@@ -187,7 +187,7 @@
|
||||||
|
<dependency>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
- <version>1.2.12</version>
|
||||||
|
+ <version>1.2.17</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
26
0006-Skip-Java-8-incompatible-test.patch
Normal file
26
0006-Skip-Java-8-incompatible-test.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 6060e6ef497bddc4a9aeac343e584ff324746d58 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
|
Date: Wed, 18 Jun 2014 08:11:48 +0200
|
||||||
|
Subject: [PATCH 6/6] Skip Java 8 incompatible test
|
||||||
|
|
||||||
|
---
|
||||||
|
src/test/org/apache/velocity/test/issues/VelTools66TestCase.java | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/test/org/apache/velocity/test/issues/VelTools66TestCase.java b/src/test/org/apache/velocity/test/issues/VelTools66TestCase.java
|
||||||
|
index 00bb0b1..6fb7260 100644
|
||||||
|
--- a/src/test/org/apache/velocity/test/issues/VelTools66TestCase.java
|
||||||
|
+++ b/src/test/org/apache/velocity/test/issues/VelTools66TestCase.java
|
||||||
|
@@ -87,7 +87,8 @@ public class VelTools66TestCase
|
||||||
|
|
||||||
|
Method testMethod = introspector.getMethod(TestObject.class, "getTestValue", new Object[0]);
|
||||||
|
assertNotNull(testMethod);
|
||||||
|
- assertEquals("Method object does not match!", verifyMethod, testMethod);
|
||||||
|
+ // Java 8 incompatibility
|
||||||
|
+ // assertEquals("Method object does not match!", verifyMethod, testMethod);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static interface TestInterface
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
21
generate-tarball.sh
Executable file
21
generate-tarball.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
name=velocity
|
||||||
|
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
||||||
|
|
||||||
|
# RETRIEVE
|
||||||
|
wget "http://www.apache.org/dist/${name}/engine/${version}/${name}-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
|
||||||
|
|
||||||
|
rm -rf tarball-tmp
|
||||||
|
mkdir tarball-tmp
|
||||||
|
cd tarball-tmp
|
||||||
|
tar xf "../${name}-${version}.orig.tar.gz"
|
||||||
|
|
||||||
|
# CLEAN TARBALL
|
||||||
|
rm -r */*.jar
|
||||||
|
rm -r */lib
|
||||||
|
|
||||||
|
tar cf "../${name}-${version}.tar.gz" *
|
||||||
|
cd ..
|
||||||
|
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (velocity-engine-parent-2.1-source-release.zip) = ee5969e62fb1e32816dbfe34ee96edcb569414df4fcf2fbbef4cba34a96eead59e4f173b558eff23d308f9b62ee5c5cec79104054b2e32f3bf0e6e5aed95ccdc
|
SHA512 (velocity-1.7.tar.gz) = d305642aab3c837ad250deaa46b516561fb68f92d04fc205fd4f40eb774ba6286ed3b239ee6352bc4411bd11cb4d1d5b39ce9ab8467f0e1ffceed9f9fc5a228d
|
||||||
|
11
velocity-1.7-doclint.patch
Normal file
11
velocity-1.7-doclint.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -Nru velocity-1.7/build/build.xml velocity-1.7.doclint/build/build.xml
|
||||||
|
--- velocity-1.7/build/build.xml 2015-07-22 12:13:51.566920750 +0200
|
||||||
|
+++ velocity-1.7.doclint/build/build.xml 2015-07-22 12:13:14.929703544 +0200
|
||||||
|
@@ -592,6 +592,7 @@
|
||||||
|
doctitle="${name} ${version} API"
|
||||||
|
encoding="UTF-8"
|
||||||
|
docencoding="UTF-8"
|
||||||
|
+ additionalparam="-Xdoclint:none"
|
||||||
|
bottom="Copyright © 2000-${build.year} <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved.">
|
||||||
|
|
||||||
|
<link href="${javadocs.ref.jsdk}"/>
|
43
velocity-1.7-osgi.patch
Normal file
43
velocity-1.7-osgi.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
diff -Nru velocity-1.7/build/build.properties velocity-1.7.osgi/build/build.properties
|
||||||
|
--- velocity-1.7/build/build.properties 2010-11-19 21:16:21.000000000 +0100
|
||||||
|
+++ velocity-1.7.osgi/build/build.properties 2015-07-22 12:21:19.627117810 +0200
|
||||||
|
@@ -166,8 +166,7 @@
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# OSGi stuff
|
||||||
|
-import=com.werken.xpath;resolution:=optional,\
|
||||||
|
- javax.naming,\
|
||||||
|
+import=javax.naming,\
|
||||||
|
javax.servlet;resolution:=optional,\
|
||||||
|
javax.servlet.http;resolution:=optional,\
|
||||||
|
javax.sql,\
|
||||||
|
@@ -188,8 +187,7 @@
|
||||||
|
org.jdom.input;resolution:=optional,\
|
||||||
|
org.jdom.output;resolution:=optional,\
|
||||||
|
org.xml.sax
|
||||||
|
-dep.import=com.werken.xpath;resolution:=optional,\
|
||||||
|
- javax.naming,\
|
||||||
|
+dep.import=javax.naming,\
|
||||||
|
javax.servlet;resolution:=optional,\
|
||||||
|
javax.servlet.http;resolution:=optional,\
|
||||||
|
javax.sql,\
|
||||||
|
@@ -207,8 +205,7 @@
|
||||||
|
export=org.apache.velocity;uses:="org.apache.velocity.context,\
|
||||||
|
org.apache.velocity.exception,\
|
||||||
|
org.apache.velocity.runtime.resource",\
|
||||||
|
- org.apache.velocity.anakia;uses:="com.werken.xpath,\
|
||||||
|
- org.apache.tools.ant,\
|
||||||
|
+ org.apache.velocity.anakia;uses:="org.apache.tools.ant,\
|
||||||
|
org.apache.tools.ant.taskdefs,\
|
||||||
|
org.jdom,\
|
||||||
|
org.jdom.output",\
|
||||||
|
@@ -327,8 +324,7 @@
|
||||||
|
org.apache.velocity;uses:="org.apache.velocity.context,\
|
||||||
|
org.apache.velocity.exception,\
|
||||||
|
org.apache.velocity.runtime.resource",\
|
||||||
|
- org.apache.velocity.anakia;uses:="com.werken.xpath,\
|
||||||
|
- org.apache.tools.ant,\
|
||||||
|
+ org.apache.velocity.anakia;uses:="org.apache.tools.ant,\
|
||||||
|
org.apache.tools.ant.taskdefs,\
|
||||||
|
org.jdom,\
|
||||||
|
org.jdom.output",\
|
346
velocity-1.7.pom
Normal file
346
velocity-1.7.pom
Normal file
@ -0,0 +1,346 @@
|
|||||||
|
<?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
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>apache</artifactId>
|
||||||
|
<version>4</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
<artifactId>velocity</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
|
||||||
|
<name>Apache Velocity</name>
|
||||||
|
<url>http://velocity.apache.org/engine/devel/</url>
|
||||||
|
<description>Apache Velocity is a general purpose template engine.</description>
|
||||||
|
<inceptionYear>2000</inceptionYear>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<prerequisites>
|
||||||
|
<maven>2.0.9</maven>
|
||||||
|
</prerequisites>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<defaultGoal>install</defaultGoal>
|
||||||
|
<sourceDirectory>src/java</sourceDirectory>
|
||||||
|
<testSourceDirectory>src/test</testSourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<inputEncoding>UTF-8</inputEncoding>
|
||||||
|
<outputEncoding>UTF-8</outputEncoding>
|
||||||
|
<xdocDirectory>${basedir}/xdocs/docs</xdocDirectory>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/java</directory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/*.java</exclude>
|
||||||
|
</excludes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<site>
|
||||||
|
<id>velocity.apache.org</id>
|
||||||
|
<url>scpexe://people.apache.org/www/velocity.apache.org/engine/releases/velocity-1.7</url>
|
||||||
|
</site>
|
||||||
|
<repository>
|
||||||
|
<id>apache.releases</id>
|
||||||
|
<name>Apache Release Distribution Repository</name>
|
||||||
|
<url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
|
||||||
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>apache.snapshots</id>
|
||||||
|
<name>Apache Development Snapshot Repository</name>
|
||||||
|
<url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>Will Glass-Husain</name>
|
||||||
|
<id>wglass</id>
|
||||||
|
<email>wglass@forio.com</email>
|
||||||
|
<organization>Forio Business Simulations</organization>
|
||||||
|
<roles>
|
||||||
|
<role>Java Developer</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
|
||||||
|
<developer>
|
||||||
|
<name>Geir Magnusson Jr.</name>
|
||||||
|
<id>geirm</id>
|
||||||
|
<email>geirm@optonline.net</email>
|
||||||
|
<organization>Independent (DVSL Maven)</organization>
|
||||||
|
<roles>
|
||||||
|
<role>Java Developer</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
|
||||||
|
<developer>
|
||||||
|
<name>Daniel Rall</name>
|
||||||
|
<id>dlr</id>
|
||||||
|
<email>dlr@finemaltcoding.com</email>
|
||||||
|
<organization>CollabNet, Inc.</organization>
|
||||||
|
<roles>
|
||||||
|
<role>Java Developer</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
|
||||||
|
<developer>
|
||||||
|
<name>Henning P. Schmiedehausen</name>
|
||||||
|
<id>henning</id>
|
||||||
|
<email>hps@intermeta.de</email>
|
||||||
|
<organization>INTERMETA - Gesellschaft für Mehrwertdienste mbH</organization>
|
||||||
|
<roles>
|
||||||
|
<role>Java Developer</role>
|
||||||
|
</roles>
|
||||||
|
<timezone>2</timezone>
|
||||||
|
</developer>
|
||||||
|
|
||||||
|
<developer>
|
||||||
|
<name>Nathan Bubna</name>
|
||||||
|
<id>nbubna</id>
|
||||||
|
<email>nathan@esha.com</email>
|
||||||
|
<organization>ESHA Research</organization>
|
||||||
|
<roles>
|
||||||
|
<role>Java Developer</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-collections</groupId>
|
||||||
|
<artifactId>commons-collections</artifactId>
|
||||||
|
<version>3.2.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-lang</groupId>
|
||||||
|
<artifactId>commons-lang</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>oro</groupId>
|
||||||
|
<artifactId>oro</artifactId>
|
||||||
|
<version>2.0.8</version>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jdom</groupId>
|
||||||
|
<artifactId>jdom</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
<version>1.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>avalon-framework</groupId>
|
||||||
|
<artifactId>avalon-framework</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
<version>1.2.12</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.3</version>
|
||||||
|
<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>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>werken-xpath</groupId>
|
||||||
|
<artifactId>werken-xpath</artifactId>
|
||||||
|
<version>0.9.4</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>hsqldb</groupId>
|
||||||
|
<artifactId>hsqldb</artifactId>
|
||||||
|
<version>1.7.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>issue-tracking</report>
|
||||||
|
<report>license</report>
|
||||||
|
<report>summary</report>
|
||||||
|
<report>scm</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-changes-plugin</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>changes-report</report>
|
||||||
|
<report>jira-report</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<issueLinkTemplate>${jira.browse.url}/%ISSUE%</issueLinkTemplate>
|
||||||
|
<!-- Apache JIRA, Component Engine -->
|
||||||
|
<component>12311337</component>
|
||||||
|
<!-- FixFor 1.6 -->
|
||||||
|
<filter>fixfor=12310290&sorter/field=issuekey&sorter/order=ASC</filter>
|
||||||
|
<maxEntries>100</maxEntries>
|
||||||
|
<teamlist>http://velocity.apache.org/who-we-are.html</teamlist>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>taglist-maven-plugin</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
<configuration>
|
||||||
|
<tag>TODO</tag>
|
||||||
|
<tag>FIXME</tag>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<configuration>
|
||||||
|
<links>
|
||||||
|
<link>http://java.sun.com/j2se/1.4.2/docs/api</link>
|
||||||
|
<link>http://jakarta.apache.org/oro/api</link>
|
||||||
|
<link>http://jakarta.apache.org/commons/lang/api-release</link>
|
||||||
|
<link>http://jakarta.apache.org/commons/collections/api-release</link>
|
||||||
|
|
||||||
|
<link>http://www.jdom.org/docs/apidocs</link>
|
||||||
|
<link>http://logging.apache.org/log4j/docs/api</link>
|
||||||
|
<link>http://excalibur.apache.org/apidocs</link>
|
||||||
|
<link>http://tomcat.apache.org/tomcat-4.1-doc/servletapi</link>
|
||||||
|
</links>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-changelog-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<configuration>
|
||||||
|
<xmlOutput>true</xmlOutput>
|
||||||
|
<threshold>Low</threshold>
|
||||||
|
<effort>Max</effort>
|
||||||
|
<excludeFilterFile>build/findbugs-exclude.xml</excludeFilterFile>
|
||||||
|
<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/trunk</connection>
|
||||||
|
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/velocity/engine/trunk</developerConnection>
|
||||||
|
<tag>HEAD</tag>
|
||||||
|
<url>http://svn.apache.org/viewvc/velocity/engine/trunk</url>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<jira.browse.url>https://issues.apache.org/jira/browse</jira.browse.url>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<issueManagement>
|
||||||
|
<system>JIRA</system>
|
||||||
|
<url>${jira.browse.url}/VELOCITY</url>
|
||||||
|
</issueManagement>
|
||||||
|
</project>
|
159
velocity.spec
159
velocity.spec
@ -1,21 +1,45 @@
|
|||||||
|
|
||||||
Name: velocity
|
Name: velocity
|
||||||
Version: 2.1
|
Version: 1.7
|
||||||
Release: 1%{?dist}
|
Release: 25%{?dist}
|
||||||
Summary: Java-based template engine
|
Summary: Java-based template engine
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://velocity.apache.org/
|
URL: http://velocity.apache.org/
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
Source0: http://central.maven.org/maven2/org/apache/velocity/velocity-engine-parent/%{version}/velocity-engine-parent-%{version}-source-release.zip
|
# ./generate-tarball.sh
|
||||||
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Source1: http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}.pom
|
||||||
|
# Remove bundled binaries which cannot be easily verified for licensing
|
||||||
|
Source2: generate-tarball.sh
|
||||||
|
|
||||||
Patch0: 0001-Remove-parent-velocity-master.patch
|
Patch0: 0001-Remove-avalon-logkit.patch
|
||||||
Patch1: 0002-Fix-javacc-template-keyword.patch
|
Patch1: 0004-Use-log4j-1.2.17.patch
|
||||||
|
Patch2: 0003-Use-system-jars.patch
|
||||||
|
Patch3: 0004-JDBC-41-compat.patch
|
||||||
|
Patch4: 0001-Don-t-use-Werken-XPath.patch
|
||||||
|
Patch5: 0006-Skip-Java-8-incompatible-test.patch
|
||||||
|
Patch6: velocity-1.7-doclint.patch
|
||||||
|
Patch7: velocity-1.7-osgi.patch
|
||||||
|
|
||||||
BuildRequires: maven-local
|
BuildRequires: javapackages-local
|
||||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
BuildRequires: ant
|
||||||
BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin)
|
BuildRequires: antlr
|
||||||
BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin)
|
BuildRequires: junit
|
||||||
BuildRequires: mvn(org.jdom:jdom)
|
BuildRequires: ant-junit
|
||||||
|
BuildRequires: apache-commons-collections
|
||||||
|
BuildRequires: apache-commons-logging
|
||||||
|
BuildRequires: apache-commons-lang
|
||||||
|
BuildRequires: glassfish-servlet-api
|
||||||
|
BuildRequires: jakarta-oro
|
||||||
|
BuildRequires: jaxen
|
||||||
|
BuildRequires: jdom
|
||||||
|
BuildRequires: bcel
|
||||||
|
BuildRequires: log4j12
|
||||||
|
BuildRequires: apache-parent
|
||||||
|
|
||||||
|
# It fails one of the arithmetic test cases with gcj
|
||||||
|
BuildRequires: java-devel >= 1:1.6.0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Velocity is a Java-based template engine. It permits anyone to use the
|
Velocity is a Java-based template engine. It permits anyone to use the
|
||||||
@ -38,41 +62,132 @@ template services for the Turbine web application framework.
|
|||||||
Velocity+Turbine provides a template service that will allow web
|
Velocity+Turbine provides a template service that will allow web
|
||||||
applications to be developed according to a true MVC model.
|
applications to be developed according to a true MVC model.
|
||||||
|
|
||||||
|
%package manual
|
||||||
|
Summary: Manual for %{name}
|
||||||
|
|
||||||
|
%description manual
|
||||||
|
Documentation for %{name}.
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadoc for %{name}
|
Summary: Javadoc for %{name}
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
Javadoc for %{name}.
|
Javadoc for %{name}.
|
||||||
|
|
||||||
|
%package demo
|
||||||
|
Summary: Demo for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description demo
|
||||||
|
Demonstrations and samples for %{name}.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n velocity-engine-parent-%{version}
|
%setup -q
|
||||||
|
|
||||||
|
# remove bundled libs/classes (except those used for testing)
|
||||||
|
find . -name '*.jar' ! -name 'test*.jar' -print -delete
|
||||||
|
find . -name '*.class' ! -name 'Foo.class' -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
|
||||||
|
|
||||||
|
# This test doesn't work with new hsqldb
|
||||||
|
rm src/test/org/apache/velocity/test/sql/DataSourceResourceLoaderTestCase.java
|
||||||
|
|
||||||
|
cp %{SOURCE1} ./pom.xml
|
||||||
|
|
||||||
|
# remove rest of avalon logkit refences
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
|
# Use log4j 1.2.17
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
|
||||||
%pom_remove_plugin :maven-javadoc-plugin
|
# Use system jar files instead of downloading from net
|
||||||
%pom_remove_plugin :maven-enforcer-plugin
|
%patch2 -p1
|
||||||
%pom_remove_plugin :maven-shade-plugin velocity-engine-core
|
|
||||||
|
|
||||||
%mvn_alias :velocity-engine-core :velocity
|
%patch3 -p1
|
||||||
|
|
||||||
|
# Use jdom instead of werken-xpath
|
||||||
|
%patch4 -p1
|
||||||
|
%pom_remove_dep werken-xpath:
|
||||||
|
|
||||||
|
# Skip Java 8 incompatible test
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
|
# Disable Java8 doclint
|
||||||
|
%patch6 -p1
|
||||||
|
|
||||||
|
# Remove werken-xpath Import/Export refences in OSGi manifest file
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
|
rm -r src/test/org/apache/velocity/test/sql
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Tests require hsqldb
|
|
||||||
%mvn_build -f
|
export CLASSPATH=$(build-classpath \
|
||||||
|
antlr \
|
||||||
|
apache-commons-collections \
|
||||||
|
commons-lang \
|
||||||
|
commons-logging \
|
||||||
|
glassfish-servlet-api \
|
||||||
|
junit \
|
||||||
|
jakarta-oro \
|
||||||
|
log4j:log4j:1.2.17 \
|
||||||
|
jaxen \
|
||||||
|
jdom \
|
||||||
|
bcel \
|
||||||
|
hsqldb \
|
||||||
|
junit)
|
||||||
|
ant \
|
||||||
|
-buildfile build/build.xml \
|
||||||
|
-Dbuild.sysclasspath=first \
|
||||||
|
-Djavac.target=1.6 \
|
||||||
|
-Djavac.source=1.6 \
|
||||||
|
jar javadocs test
|
||||||
|
|
||||||
|
# fix line-endings in generated files
|
||||||
|
sed -i 's/\r//' docs/api/stylesheet.css docs/api/package-list
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%mvn_install
|
%mvn_file : %{name}
|
||||||
|
%mvn_alias : %{name}:%{name}
|
||||||
|
%mvn_artifact pom.xml bin/%{name}-%{version}.jar
|
||||||
|
%mvn_install -J docs/api
|
||||||
|
|
||||||
|
# zero-length file
|
||||||
|
rm -r test/issues/velocity-537/compare/velocity537.vm.cmp
|
||||||
|
# data
|
||||||
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||||
|
cp -pr examples test %{buildroot}%{_datadir}/%{name}
|
||||||
|
|
||||||
|
|
||||||
%files -f .mfiles
|
%files -f .mfiles
|
||||||
%doc README.md
|
%doc README.txt
|
||||||
%license LICENSE NOTICE
|
%license LICENSE NOTICE
|
||||||
|
|
||||||
|
%files manual
|
||||||
|
%license LICENSE NOTICE
|
||||||
|
%doc docs/*
|
||||||
|
|
||||||
%files javadoc -f .mfiles-javadoc
|
%files javadoc -f .mfiles-javadoc
|
||||||
%license LICENSE NOTICE
|
%license LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%files demo
|
||||||
* Thu Jun 06 2019 Marian Koncek <mkoncek@redhat.com> - 2.1-1
|
%license LICENSE NOTICE
|
||||||
- Update to upstream version 2.1
|
%{_datadir}/%{name}
|
||||||
|
|
||||||
|
%changelog
|
||||||
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-25
|
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-25
|
||||||
- Mass rebuild for javapackages-tools 201901
|
- Mass rebuild for javapackages-tools 201901
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user