Sync from SUSE:SLFO:Main velocity-engine revision 53718264dcb236a1eb2dbb41697fc78c
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
@@ -0,0 +1,28 @@
|
||||
From 0cdb34e94619854c13abb4a098ea76b760dae68a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Sat, 28 Sep 2024 22:54:18 +0200
|
||||
Subject: [PATCH] Implement the new method from StandardParserVisitor interface
|
||||
|
||||
---
|
||||
.../org/apache/velocity/runtime/visitor/BaseVisitor.java | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java
|
||||
index 326e5a78..a9f142ba 100644
|
||||
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java
|
||||
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java
|
||||
@@ -491,4 +491,11 @@ public Object visit(ASTIntegerRange node, Object data)
|
||||
data = node.childrenAccept(this, data);
|
||||
return data;
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public Object visit(ASTNegateNode node, Object data)
|
||||
+ {
|
||||
+ data = node.childrenAccept(this, data);
|
||||
+ return data;
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.46.1
|
||||
|
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>core</package>
|
||||
</multibuild>
|
13
_service
Normal file
13
_service
Normal file
@@ -0,0 +1,13 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/apache/velocity-engine.git</param>
|
||||
<param name="revision">2.4</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
</services>
|
BIN
velocity-engine-2.4.tar.xz
(Stored with Git LFS)
Normal file
BIN
velocity-engine-2.4.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
219
velocity-engine-core-build.xml
Normal file
219
velocity-engine-core-build.xml
Normal file
@@ -0,0 +1,219 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="velocity-engine-core" default="package" basedir=".">
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Build environment properties -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<!-- properties needed for replacement by filtering in template files -->
|
||||
<property name="parser.basename" value="Standard"/>
|
||||
<property name="parser.char.asterisk" value="*"/>
|
||||
<property name="parser.char.at" value="@"/>
|
||||
<property name="parser.char.dollar" value="$"/>
|
||||
<property name="parser.char.hash" value="#"/>
|
||||
<property name="parser.debug" value="false"/>
|
||||
<property name="parser.package" value="org.apache.velocity.runtime.parser"/>
|
||||
|
||||
<property name="compiler.release" value="8"/>
|
||||
<property name="compiler.source" value="1.${compiler.release}"/>
|
||||
<property name="compiler.target" value="${compiler.source}"/>
|
||||
|
||||
<property name="project.groupId" value="org.apache.velocity"/>
|
||||
<property name="project.artifactId" value="velocity-engine-core"/>
|
||||
|
||||
<property name="project.version" value="2.4"/>
|
||||
<property name="spec.version" value="${project.version}"/>
|
||||
<property name="bundle.version" value="${project.version}.0"/>
|
||||
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||
<property name="build.dir" value="target"/>
|
||||
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||
<property name="build.srcDir" value="src/main/java"/>
|
||||
<property name="build.resourceDir" value="src/main/resources"/>
|
||||
|
||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||
|
||||
<property name="build.parserSrcDir" value="src/main/parser"/>
|
||||
<property name="build.parserOutputDir" value="${build.dir}/parser"/>
|
||||
<property name="build.jjtreeOutputDir" value="${build.dir}/generated-sources/jjtree"/>
|
||||
<property name="build.javaccOutputDir" value="${build.dir}/generated-sources/javacc"/>
|
||||
<property name="build.templateSrcDir" value="src/main/java-templates"/>
|
||||
<property name="build.templateOutputDir" value="${build.dir}/generated-sources/java-templates"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Defining classpaths -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<path id="build.classpath">
|
||||
<fileset dir="lib">
|
||||
<include name="**/*"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Cleaning up target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="clean" description="Clean the output directory">
|
||||
<delete dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Source generation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="gen-sources" description="Generate the sources">
|
||||
<mkdir dir="${build.templateOutputDir}"/>
|
||||
<copy todir="${build.templateOutputDir}">
|
||||
<fileset dir="${build.templateSrcDir}"/>
|
||||
<filterchain>
|
||||
<expandproperties/>
|
||||
</filterchain>
|
||||
</copy>
|
||||
<mkdir dir="${build.parserOutputDir}"/>
|
||||
<copy todir="${build.parserOutputDir}">
|
||||
<fileset dir="${build.parserSrcDir}"/>
|
||||
<filterchain>
|
||||
<expandproperties/>
|
||||
</filterchain>
|
||||
</copy>
|
||||
<mkdir dir="${build.outputDir}/org/apache/velocity/runtime/parser"/>
|
||||
<copy todir="${build.outputDir}/org/apache/velocity/runtime/parser">
|
||||
<fileset dir="${build.parserSrcDir}"/>
|
||||
</copy>
|
||||
<mkdir dir="${build.jjtreeOutputDir}"/>
|
||||
<exec executable="jjtree">
|
||||
<arg value="-GRAMMAR_ENCODING=UTF-8"/>
|
||||
<arg value="-BUILD_NODE_FILES=false"/>
|
||||
<arg value="-MULTI=true"/>
|
||||
<arg value="-NODE_PACKAGE=org.apache.velocity.runtime.parser.node"/>
|
||||
<arg value="-NODE_USES_PARSER=true"/>
|
||||
<arg value="-STATIC=false"/>
|
||||
<arg value="-OUTPUT_DIRECTORY=${build.jjtreeOutputDir}"/>
|
||||
<arg value="${build.parserOutputDir}/Parser.jjt"/>
|
||||
</exec>
|
||||
<delete>
|
||||
<fileset dir="${build.jjtreeOutputDir}">
|
||||
<include name="**/Node.java"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
<mkdir dir="${build.javaccOutputDir}"/>
|
||||
<exec executable="javacc">
|
||||
<arg value="-GRAMMAR_ENCODING=UTF-8"/>
|
||||
<arg value="-STATIC=false"/>
|
||||
<arg value="-DEBUG_PARSER=${parser.debug}"/>
|
||||
<arg value="-DEBUG_LOOKAHEAD=${parser.debug}"/>
|
||||
<arg value="-DEBUG_TOKEN_MANAGER=${parser.debug}"/>
|
||||
<arg value="-BUILD_PARSER=true"/>
|
||||
<arg value="-TOKEN_MANAGER_USES_PARSER=true"/>
|
||||
<arg value="-OUTPUT_DIRECTORY=${build.javaccOutputDir}"/>
|
||||
<arg value="${build.jjtreeOutputDir}/Parser.jj"/>
|
||||
</exec>
|
||||
<delete>
|
||||
<fileset dir="${build.javaccOutputDir}">
|
||||
<include name="**/ParseException.java"/>
|
||||
<include name="**/CharStream.java"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Compilation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="compile" depends="gen-sources" description="Compile the code">
|
||||
<mkdir dir="${build.outputDir}"/>
|
||||
<javac destdir="${build.outputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
release="${compiler.release}"
|
||||
target="${compiler.target}"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
source="${compiler.source}">
|
||||
<src>
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
<pathelement location="${build.templateOutputDir}"/>
|
||||
<pathelement location="${build.jjtreeOutputDir}"/>
|
||||
<pathelement location="${build.javaccOutputDir}"/>
|
||||
</src>
|
||||
<classpath refid="build.classpath"/>
|
||||
</javac>
|
||||
<copy todir="${build.outputDir}">
|
||||
<fileset dir="${build.resourceDir}"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="javadoc" description="Generates the Javadoc of the application">
|
||||
<javadoc packagenames="*"
|
||||
destdir="${reporting.outputDirectory}/apidocs"
|
||||
access="protected"
|
||||
encoding="utf-8"
|
||||
verbose="false"
|
||||
version="true"
|
||||
use="true"
|
||||
author="true"
|
||||
splitindex="false"
|
||||
nodeprecated="false"
|
||||
nodeprecatedlist="false"
|
||||
notree="false"
|
||||
noindex="false"
|
||||
nohelp="false"
|
||||
nonavbar="false"
|
||||
serialwarn="false"
|
||||
linksource="false"
|
||||
source="${compiler.source}"
|
||||
breakiterator="false">
|
||||
<classpath refid="build.classpath"/>
|
||||
<fileset dir="${build.srcDir}"/>
|
||||
<fileset dir="${build.templateOutputDir}"/>
|
||||
<fileset dir="${build.jjtreeOutputDir}"/>
|
||||
<fileset dir="${build.javaccOutputDir}"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Package target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="package" depends="compile" description="Package the application">
|
||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||
compress="true"
|
||||
index="false"
|
||||
basedir="${build.outputDir}"
|
||||
excludes="**/package.html">
|
||||
<manifest>
|
||||
<attribute name="Bundle-Description" value="Apache Velocity is a general purpose template engine."/>
|
||||
<attribute name="Bundle-DocURL" value="https://www.apache.org/"/>
|
||||
<attribute name="Bundle-License" value="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
|
||||
<attribute name="Bundle-ManifestVersion" value="2"/>
|
||||
<attribute name="Bundle-Name" value="Apache Velocity - Engine"/>
|
||||
<attribute name="Bundle-SymbolicName" value="org.apache.velocity.engine-core"/>
|
||||
<attribute name="Bundle-Vendor" value="The Apache Software Foundation"/>
|
||||
<attribute name="Bundle-Version" value="${bundle.version}"/>
|
||||
<attribute name="Export-Package" value="org.apache.velocity.app.event.implement;uses:="org.apache.velocity.app.event,org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.util,org.apache.velocity.util.introspection,org.slf4j";version="${bundle.version}",org.apache.velocity.app.event;uses:="org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.util.introspection,org.slf4j";version="${bundle.version}",org.apache.velocity.app;uses:="org.apache.velocity,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.slf4j";version="${bundle.version}",org.apache.velocity.context;uses:="org.apache.velocity,org.apache.velocity.app.event,org.apache.velocity.runtime.resource,org.apache.velocity.util.introspection";version="${bundle.version}",org.apache.velocity.exception;uses:="org.apache.velocity.runtime.parser,org.apache.velocity.util.introspection";version="${bundle.version}",org.apache.velocity.io;version="${bundle.version}",org.apache.velocity.runtime.defaults;version="${bundle.version}",org.apache.velocity.runtime.directive.contrib;uses:="org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser,org.apache.velocity.runtime.parser.node";version="${bundle.version}",org.apache.velocity.runtime.directive;uses:="org.apache.velocity,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.parser,org.apache.velocity.runtime.parser.node,org.apache.velocity.runtime.resource,org.apache.velocity.util.introspection,org.slf4j";version="${bundle.version}",org.apache.velocity.runtime.parser.node;uses:="org.apache.velocity,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.parser,org.apache.velocity.util.introspection,org.slf4j";version="${bundle.version}",org.apache.velocity.runtime.parser;uses:="org.apache.velocity,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser.node,org.apache.velocity.util.introspection,org.slf4j";version="${bundle.version}",org.apache.velocity.runtime.resource.loader;uses:="javax.sql,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.resource,org.apache.velocity.runtime.resource.util,org.apache.velocity.util,org.slf4j";version="${bundle.version}",org.apache.velocity.runtime.resource.util;version="${bundle.version}",org.apache.velocity.runtime.resource;uses:="org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.resource.loader,org.slf4j";version="${bundle.version}",org.apache.velocity.runtime.visitor;uses:="org.apache.velocity.context,org.apache.velocity.runtime.parser.node";version="${bundle.version}",org.apache.velocity.runtime;uses:="org.apache.velocity,org.apache.velocity.app.event,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser,org.apache.velocity.runtime.parser.node,org.apache.velocity.runtime.resource,org.apache.velocity.util,org.apache.velocity.util.introspection,org.slf4j";version="${bundle.version}",org.apache.velocity.util.introspection;uses:="org.apache.velocity.runtime,org.apache.velocity.runtime.parser.node,org.apache.velocity.util,org.slf4j";version="${bundle.version}",org.apache.velocity.util;uses:="org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser.node,org.apache.velocity.util.introspection,org.slf4j";version="${bundle.version}",org.apache.velocity;uses:="org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime.resource";version="${bundle.version}""/>
|
||||
<attribute name="Implementation-Title" value="Apache Velocity - Engine"/>
|
||||
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
|
||||
<attribute name="Implementation-Version" value="${project.version}"/>
|
||||
<attribute name="Import-Package" value="javax.naming,javax.sql,org.apache.commons.lang3.reflect;version="[3.17,4)",org.apache.commons.lang3.tuple;version="[3.17,4)",org.apache.commons.lang3;version="[3.17,4)",org.apache.velocity,org.apache.velocity.app.event,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.io,org.apache.velocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser,org.apache.velocity.runtime.parser.node,org.apache.velocity.runtime.resource,org.apache.velocity.runtime.resource.loader,org.apache.velocity.runtime.resource.util,org.apache.velocity.util,org.apache.velocity.util.introspection,org.slf4j;version="[1.7,2)""/>
|
||||
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||
<attribute name="Specification-Title" value="Apache Velocity - Engine"/>
|
||||
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
|
||||
<attribute name="Specification-Version" value="${spec.version}"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- A dummy target for the package named after the type it creates -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="jar" depends="package" description="Builds the jar for the application"/>
|
||||
|
||||
</project>
|
86
velocity-engine.changes
Normal file
86
velocity-engine.changes
Normal file
@@ -0,0 +1,86 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 2 16:43:05 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Version 2.4:
|
||||
* Fixes:
|
||||
+ Drop CachingDatabaseObjectsFactory class
|
||||
+ Clarify template reuse in RuntimeInstance javadoc
|
||||
+ Make commons-pool2 dependency optional
|
||||
+ Fix overzealous string to number conversion in comparison
|
||||
+ Unclosed #[[ ]]# statement should give a parsing error
|
||||
+ Add a new compatibility flag for integer ranges immutability
|
||||
+ VELOCITY-981: Upgrade to Parent 7
|
||||
+ Support Java 16 records in property lookup
|
||||
+ VELOCITY-977: Upgrade Java Compiler Compiler to Version 7.0.13
|
||||
+ VELOCITY-976: Remove obsolete VelTools66TestCase
|
||||
+ VELOCITY-974: Use non-deprecated config property for resource
|
||||
loaders in VelocityEngineFactory
|
||||
+ VELOCITY-973: Upgrade dependencies
|
||||
+ VELOCITY-951: DataSourceResourceLoader: property
|
||||
datasource_url wrong
|
||||
+ VELOCITY-972: Remove Commons IO
|
||||
+ VELOCITY-971: Upgrade to Parent 6
|
||||
+ Easier #include and #parse directives subclassing - fixes
|
||||
VELOCITY-959
|
||||
+ Make templates cloneable - fixes VELOCITY-958
|
||||
+ Fixes VELOCITY-953 where VelocimacroProxy polutes context
|
||||
stack due to wrong handling of #break or exceptions
|
||||
- Split into two _multibuild flavours, so that the
|
||||
velocity-engine-core can be used early.
|
||||
* generate and customize ant build system
|
||||
- Fetch sources using a source service from git tag
|
||||
- Removed patch:
|
||||
* build.patch
|
||||
+ not needed with this version
|
||||
- Added patch:
|
||||
* 0001-Implement-the-new-method-from-StandardParserVisitor-.patch
|
||||
+ implement one missing method from StandardParserVisitor
|
||||
interface that renders the BaseVisitor class uninstantiable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 13:17:21 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Use %autosetup macro. Allows to eliminate the usage of deprecated
|
||||
%patchN
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 16 08:27:27 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Reproducible builds: use SOURCE_DATE_EPOCH for timestamp
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 5 10:02:28 UTC 2022 - Stefan Bluhm <stefan.bluhm@clacee.eu>
|
||||
|
||||
- Create javadoc packages for Enterprise Linux builds.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 15 18:24:25 UTC 2022 - Stefan Bluhm <stefan.bluhm@clacee.eu>
|
||||
|
||||
- Adapted for Enterprise Linux build.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 14 10:38:40 UTC 2021 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Version 2.3:
|
||||
* Fixes:
|
||||
+ Fix parser bug (newline and space inside an empty inline map
|
||||
definition). Fixes VELOCITY-927.
|
||||
+ Backported Spring framework Velocity Engine integration
|
||||
classes from Spring 4.x, in the new module spring-velocity-support.
|
||||
Fixes VELOCITY-933.
|
||||
+ Let SecureUberspector block methods on ClassLoader and subclasses.
|
||||
Fixes VELOCITY-931.
|
||||
+ Added Travis CI.
|
||||
+ Don't leak classes via Stop.STOP_ALL stack trace.
|
||||
- Removed patch:
|
||||
* velocity-engine-2.2-CVE-2020-13936.patch
|
||||
+ Integrated upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 25 11:34:21 UTC 2021 - Cédric Bosdonnat <cbosdonnat@suse.com>
|
||||
|
||||
- Version 2.2:
|
||||
* see changes on https://velocity.apache.org/news.html
|
||||
- Added patches:
|
||||
* velocity-2.2-CVE-2020-13936.patch
|
||||
* build.patch
|
203
velocity-engine.spec
Normal file
203
velocity-engine.spec
Normal file
@@ -0,0 +1,203 @@
|
||||
#
|
||||
# spec file for package velocity-engine
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "core"
|
||||
%bcond_without core
|
||||
%else
|
||||
%bcond_with core
|
||||
%endif
|
||||
%global base_name velocity-engine
|
||||
%global desc \
|
||||
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.
|
||||
Version: 2.4
|
||||
Release: 0
|
||||
Summary: Apache Velocity - Engine
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://velocity.apache.org/
|
||||
Source0: %{base_name}-%{version}.tar.xz
|
||||
Patch0: 0001-Implement-the-new-method-from-StandardParserVisitor-.patch
|
||||
BuildRequires: fdupes
|
||||
BuildArch: noarch
|
||||
%if %{with core}
|
||||
Name: %{base_name}-core
|
||||
%else
|
||||
Name: %{base_name}
|
||||
%endif
|
||||
%if %{with core}
|
||||
Source100: %{base_name}-core-build.xml
|
||||
BuildRequires: ant
|
||||
BuildRequires: apache-commons-lang3
|
||||
BuildRequires: javacc
|
||||
BuildRequires: javapackages-local >= 6
|
||||
BuildRequires: slf4j
|
||||
%else
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
|
||||
BuildRequires: mvn(org.apache.velocity:velocity-engine-core)
|
||||
BuildRequires: mvn(org.apache.velocity:velocity-master:pom:)
|
||||
BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin)
|
||||
BuildRequires: mvn(org.dom4j:dom4j)
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
||||
%package parent
|
||||
Summary: Apache Velocity - Engine parent pom
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description parent
|
||||
%{desc}
|
||||
|
||||
This packages contains a parent pom needed for maven build
|
||||
|
||||
%package examples
|
||||
Summary: Apache Velocity Engine - Examples
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description examples
|
||||
%{desc}
|
||||
|
||||
This package contains very simple examples to use Velocity.
|
||||
|
||||
%package scripting
|
||||
Summary: Apache Velocity - JSR 223 Scripting
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description scripting
|
||||
%{desc}
|
||||
|
||||
This package contains JSR 223 scripting support.
|
||||
|
||||
%package -n velocity-custom-parser-example
|
||||
Summary: Apache Velocity Custom Parser Example
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description -n velocity-custom-parser-example
|
||||
%{desc}
|
||||
|
||||
This package contains Custom Parser Example for Apache Velocity.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
%{desc}
|
||||
|
||||
This package contains Javadoc documentation
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{base_name}-%{version}
|
||||
|
||||
%if %{with core}
|
||||
cp %{SOURCE100} %{name}/build.xml
|
||||
%endif
|
||||
|
||||
%pom_disable_module spring-velocity-support
|
||||
%pom_disable_module velocity-engine-core
|
||||
|
||||
%pom_remove_plugin :maven-clean-plugin velocity-custom-parser-example
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin
|
||||
|
||||
%build
|
||||
%if %{with core}
|
||||
|
||||
mkdir -p %{name}/lib
|
||||
build-jar-repository -s %{name}/lib commons-lang3 slf4j/api
|
||||
ant -f %{name}/build.xml package javadoc
|
||||
|
||||
%else
|
||||
|
||||
%{mvn_build} -f -s -- \
|
||||
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
|
||||
-Dmaven.compiler.release=8 \
|
||||
%endif
|
||||
-Dsource=8
|
||||
|
||||
%endif
|
||||
|
||||
%install
|
||||
|
||||
%if %{with core}
|
||||
install -dm 0755 %{buildroot}%{_javadir}/%{base_name}
|
||||
install -pm 0644 %{name}/target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{base_name}/%{name}.jar
|
||||
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{base_name}
|
||||
%{mvn_install_pom} %{name}/pom.xml %{buildroot}%{_mavenpomdir}/%{base_name}/%{name}.pom
|
||||
%add_maven_depmap %{base_name}/%{name}.pom %{base_name}/%{name}.jar
|
||||
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -r %{name}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
|
||||
%else
|
||||
|
||||
%mvn_install
|
||||
|
||||
%endif
|
||||
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%if %{with core}
|
||||
%files -f .mfiles
|
||||
%license LICENSE NOTICE
|
||||
%doc README.md
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%else
|
||||
|
||||
%files parent -f .mfiles-%{name}-parent
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%files examples -f .mfiles-%{name}-examples
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%files scripting -f .mfiles-%{name}-scripting
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%files -n velocity-custom-parser-example -f .mfiles-velocity-custom-parser-example
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user