velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1869271 - in /velocity/engine/trunk: ./ velocity-engine-core/ velocity-engine-core/src/main/java/org/apache/velocity/runtime/ velocity-engine-core/src/main/resources/org/apache/velocity/runtime/ velocity-engine-scripting/src/main/java/org/...
Date Fri, 01 Nov 2019 17:05:19 GMT
Author: cbrisson
Date: Fri Nov  1 17:05:18 2019
New Revision: 1869271

URL: http://svn.apache.org/viewvc?rev=1869271&view=rev
Log:
[engine] Fix versions issues and README

 - fix engine and dependency versions in README and mention the parser customization feature
in building section
 - nicify README links
 - upgrade surfire plugin version from 2.19.1 to 2.22.1
 - upgrade maven-jar-plugin from 3.1.1 to 3.2.2
 - add version 1.2 for extra-enforcer-rules
 - upgrade maven-javadoc-plugin from 3.1.0 to 3.1.1
 - upgrade findbugs-maven-plugin from 3.0.4 to 3.0.5
 - add a new static class org.apache.velocity.runtime.VelocityEngineVersion.java
   (see changes in velocity-engine-core/pom.xml)



Added:
    velocity/engine/trunk/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/VelocityEngineVersion.java
Modified:
    velocity/engine/trunk/README.md
    velocity/engine/trunk/pom.xml
    velocity/engine/trunk/velocity-engine-core/pom.xml
    velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
    velocity/engine/trunk/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java

Modified: velocity/engine/trunk/README.md
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/README.md?rev=1869271&r1=1869270&r2=1869271&view=diff
==============================================================================
--- velocity/engine/trunk/README.md (original)
+++ velocity/engine/trunk/README.md Fri Nov  1 17:05:18 2019
@@ -3,9 +3,7 @@
 
 Welcome to Apache Velocity Engine! Apache Velocity is a general purpose
 template engine written in Java. For more information about Velocity,
-please look at the HTML documentation on the Velocity web site:
-
-  [http://velocity.apache.org/index.html](http://velocity.apache.org/index.html)
+please look at the HTML documentation on the [Velocity web site](http://velocity.apache.org/index.html).
 
 Here's a description of the top level directories:
 
@@ -16,22 +14,22 @@ Here's a description of the top level di
 
 ## REQUIREMENTS
 
-Apache Velocity 2.1 will run with any Java runtime engine v1.8 or greater.
+Apache Velocity 2.2 will run with any Java runtime engine v1.8 or greater.
 
 Building from source requires Java development kit v1.8 or greater and Maven 3 (3.0.5+).
 
 At compile time, Maven should fetch all needed dependencies, which are:
-* commons-lang v3.8.1
-* slf4j-api v1.7.26
+* commons-lang v3.9
+* slf4j-api v1.7.28
 plus the following ones, needed for the integrated tests:
-* slf4j-simple v1.7.26
+* slf4j-simple v1.7.28
 * junit v4.12
-* hsqldb v2.3.4
+* hsqldb v2.5.0
 * commons-io 2.6
 
 At runtime, Velocity only needs:
-* commons-lang v3.8.1+
-* slf4j-api and an slf4j binding, v1.7.26+
+* commons-lang v3.9+
+* slf4j-api and an slf4j binding, v1.7.28+
 
 ## BUILDING APACHE VELOCITY
 
@@ -40,10 +38,8 @@ build it.
 
 Building is easy.  All components necessary to build are included or
 get downloaded from the internet during the build, except for the Java
- SDK and the Maven build tool.  You can find details on how to build
-Velocity online at:
-
-[http://velocity.apache.org/engine/devel/build.html](http://velocity.apache.org/engine/devel/build.html)
+ SDK and the Maven build tool. You can find details online on [how to build
+Velocity](http://velocity.apache.org/engine/devel/build.html).
 
 *IMPORTANT* As the Apache Velocity build process wants to download a
 number of jars from the internet, you must be online when you are
@@ -60,6 +56,10 @@ Be sure to update your classpath to incl
 file, or when using a modern servlet container, put it in the
 WEB-INF/lib directory.
 
+## CUSTOMIZING THE PARSER
+
+Since 2.2, it's possible to (build a custom parser)[http://velocity.apache.org/engine/2.2/developer-guide.html#customizing-the-vtl-parser],
to change some of the characters used by in the VTL syntax: `*`, `@`, `$` and `#`. Let's say
you want to merge some templatized jQuery code full of `$` characters, you can for instance
build you own parser which will use the `§` character for references instead of `$`.
+
 ## TRYING THE EXAMPLES
 
 After building Velocity, you can also build the examples that are
@@ -70,3 +70,4 @@ For more information, please see the REA
 velocity-engine-examples/src/etc/ directory.
 
 - The Apache Velocity Team
+

Modified: velocity/engine/trunk/pom.xml
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/pom.xml?rev=1869271&r1=1869270&r2=1869271&view=diff
==============================================================================
--- velocity/engine/trunk/pom.xml (original)
+++ velocity/engine/trunk/pom.xml Fri Nov  1 17:05:18 2019
@@ -43,7 +43,7 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <junit.version>4.12</junit.version>
         <slf4j.version>1.7.28</slf4j.version>
-        <surefire.plugin.version>2.19.1</surefire.plugin.version>
+        <surefire.plugin.version>2.22.1</surefire.plugin.version>
         <jira.browse.url>https://issues.apache.org/jira/browse</jira.browse.url>
         <maven.compiler.source>1.8</maven.compiler.source>
         <maven.compiler.target>1.8</maven.compiler.target>
@@ -65,17 +65,17 @@
                 </plugin>
                 <plugin>
                     <artifactId>maven-jar-plugin</artifactId>
-                    <version>3.1.1</version>
+                    <version>3.1.2</version>
                     <configuration>
-                        <archive>  
+                        <archive>
                             <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-                        </archive> 
+                        </archive>
                     </configuration>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.felix</groupId>
                     <artifactId>maven-bundle-plugin</artifactId>
-                    <version>3.5.0</version>
+                    <version>3.5.1</version>
                     <executions>
                         <execution>
                             <id>bundle-manifest</id>
@@ -122,6 +122,11 @@
                         </execution>
                     </executions>
                 </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>extra-enforcer-rules</artifactId>
+                    <version>1.2</version>
+                </plugin>
             </plugins>
         </pluginManagement>
         <plugins>
@@ -138,7 +143,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>3.1.0</version>
+                <version>3.1.1</version>
                 <configuration>
                     <!-- full checking is left disabled
                          <doclint>html,missing,reference,syntax</doclint>

Modified: velocity/engine/trunk/velocity-engine-core/pom.xml
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/pom.xml?rev=1869271&r1=1869270&r2=1869271&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/pom.xml (original)
+++ velocity/engine/trunk/velocity-engine-core/pom.xml Fri Nov  1 17:05:18 2019
@@ -66,6 +66,26 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-resources-plugin</artifactId>
                 <executions>
+                    <!-- put engine version in class org.apache.velocity.runtime.VelocityEngineVersion
-->
+                    <execution>
+                        <id>filter-engine-version</id>
+                        <phase>process-sources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/resources</directory>
+                                    <includes>
+                                        <include>**/*.java</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                            <outputDirectory>${project.build.directory}/generated-sources/version</outputDirectory>
+                        </configuration>
+                    </execution>
                     <!-- prepare parser grammar file -->
                     <execution>
                         <id>generate-parser-grammar</id>
@@ -75,7 +95,6 @@
                         </goals>
                         <configuration>
                             <useDefaultDelimiters>false</useDefaultDelimiters>
-
                             <delimiters>
                                 <delimiter>${*}</delimiter>
                             </delimiters>
@@ -200,6 +219,27 @@
                 </executions>
             </plugin>
 
+            <!-- add VelocityEngineVersion source root -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${project.build.directory}/generated-sources/version</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>            
+
             <!-- handle OSGi information -->
             <plugin>
                 <groupId>org.apache.felix</groupId>
@@ -276,8 +316,17 @@
                     </execution>
                 </executions>
             </plugin>
-
         </plugins>
+
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+        </resources>
+
     </build>
 
     <dependencies>
@@ -321,7 +370,7 @@
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
-                <version>3.0.4</version>
+                <version>3.0.5</version>
                 <configuration>
                     <xmlOutput>true</xmlOutput>
                     <threshold>Low</threshold>

Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=1869271&r1=1869270&r2=1869271&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
Fri Nov  1 17:05:18 2019
@@ -273,7 +273,7 @@ public class RuntimeInstance implements
                 initializing = true;
 
                 log.trace("*****************************");
-                log.debug("Starting Apache Velocity v2.0");
+                log.debug("Starting Apache Velocity v" + VelocityEngineVersion.VERSION);
                 log.trace("RuntimeInstance initializing.");
 
                 initializeProperties();

Added: velocity/engine/trunk/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/VelocityEngineVersion.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/VelocityEngineVersion.java?rev=1869271&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/VelocityEngineVersion.java
(added)
+++ velocity/engine/trunk/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/VelocityEngineVersion.java
Fri Nov  1 17:05:18 2019
@@ -0,0 +1,6 @@
+package org.apache.velocity.runtime;
+
+public class VelocityEngineVersion
+{
+    public static final String VERSION = "${project.version}";
+}

Modified: velocity/engine/trunk/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java?rev=1869271&r1=1869270&r2=1869271&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java
(original)
+++ velocity/engine/trunk/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java
Fri Nov  1 17:05:18 2019
@@ -40,11 +40,13 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.velocity.runtime.VelocityEngineVersion;
+
 public class VelocityScriptEngineFactory implements ScriptEngineFactory
 {
 
     private static final String VELOCITY_NAME = "Velocity";
-    private static final String VELOCITY_VERSION = "2.0";
+    private static final String VELOCITY_VERSION = VelocityEngineVersion.VERSION;
     private static final String VELOCITY_LANGUAGE = "VTL";
 
     private static List<String> names;



Mime
View raw message