svn commit: r1804360 - in /velocity/tools/trunk: pom.xml velocity-tools-assembly/ velocity-tools-uberjar/

2017-08-07 Thread cbrisson
Author: cbrisson
Date: Mon Aug  7 21:09:37 2017
New Revision: 1804360

URL: http://svn.apache.org/viewvc?rev=1804360=rev
Log:
[tools] Getting rid of uberjar and assembly modules

Removed:
velocity/tools/trunk/velocity-tools-assembly/
velocity/tools/trunk/velocity-tools-uberjar/
Modified:
velocity/tools/trunk/pom.xml

Modified: velocity/tools/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/velocity/tools/trunk/pom.xml?rev=1804360=1804359=1804360=diff
==
--- velocity/tools/trunk/pom.xml (original)
+++ velocity/tools/trunk/pom.xml Mon Aug  7 21:09:37 2017
@@ -130,9 +130,7 @@
 velocity-tools-generic
 velocity-tools-view
 velocity-tools-view-jsp
-velocity-tools-uberjar
 velocity-tools-examples
-velocity-tools-assembly
 
 
 

svn commit: r1804359 - /velocity/tools/trunk/velocity-tools-generic/pom.xml

2017-08-07 Thread cbrisson
Author: cbrisson
Date: Mon Aug  7 21:04:40 2017
New Revision: 1804359

URL: http://svn.apache.org/viewvc?rev=1804359=rev
Log:
[tools] Tools 3.0-SNAPSHOT can now rely on engine 2.0

Modified:
velocity/tools/trunk/velocity-tools-generic/pom.xml

Modified: velocity/tools/trunk/velocity-tools-generic/pom.xml
URL: 
http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/pom.xml?rev=1804359=1804358=1804359=diff
==
--- velocity/tools/trunk/velocity-tools-generic/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-generic/pom.xml Mon Aug  7 21:04:40 2017
@@ -70,7 +70,7 @@
   
   org.apache.velocity
   velocity-engine-core
-  2.0-SNAPSHOT
+  2.0
   
   
   commons-beanutils




svn commit: r1804358 - in /velocity/site/production/engine: 2.0/build.html devel/build.html

2017-08-07 Thread cbrisson
Author: cbrisson
Date: Mon Aug  7 20:53:23 2017
New Revision: 1804358

URL: http://svn.apache.org/viewvc?rev=1804358=rev
Log:
[site] Fix deprecations in build page (production)

Modified:
velocity/site/production/engine/2.0/build.html
velocity/site/production/engine/devel/build.html

Modified: velocity/site/production/engine/2.0/build.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/build.html?rev=1804358=1804357=1804358=diff
==
--- velocity/site/production/engine/2.0/build.html (original)
+++ velocity/site/production/engine/2.0/build.html Mon Aug  7 20:53:23 2017
@@ -224,13 +224,11 @@ h2:hover > .headerlink, h3:hover > .head
 }
 h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }
 Installation
-Velocity runs on a variety of platforms that have installed the Java 
Virtual Machine. The Java Development Kit version 1.6 is required for users who 
want to compile Velocity from its source code.
+Velocity runs on a variety of platforms that have installed the Java 
Virtual Machine. A Java Development Kit version 1.7+ is required to compile 
Velocity from its source code (as it is to run it).
 Everything required to build Velocity comes with the distribution, which 
can be obtained from http://svn.apache.org/repos/asf/velocity/engine/;>Subversion or from 
the main distribution. However, you will 
need to install http://maven.apache.org/;>Maven to build the 
Velocity sources.
-http://maven.apache.org/;>Maven is also an Apache project. To 
build Apache Velocity, you need at least Version 2.2.1 of Apache Maven.
+http://maven.apache.org/;>Maven is also an Apache project. To 
build Apache Velocity, you need at least Version 3.0.5 of Apache Maven.
 Required Tools
-To build Velocity we require http://maven.apache.org/;>Maven 
version 2.2.1 or higher (Maven 3 can be used too) to perform the build process. 
We assume that you have followed Maven's installation instructions and have it 
properly installed.
-Velocity requires JDK 1.6 or greater to compile.
-Finally, if you wish to modify Velocity's grammar you will need to a tool 
called http://javacc.dev.java.net;>JavaCC. We recommend version 
3.2 or greater.
+To build Velocity we require http://maven.apache.org/;>Maven 
version 3.0.5 or higher to perform the build process. We assume that you have 
followed Maven's installation instructions and have it properly installed.
 Building
 In each case below, it is assumed that you were successful in getting the 
distribution from Subversion, and were successful in unpacking.  Also, it is 
assumed that you are starting in the 'velocity' directory, the root of the 
distribution tree. All directory references will be relative to 'velocity'.
 Change to the build directory (cd build). 
Then, to build the jar file, simply type:

Modified: velocity/site/production/engine/devel/build.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/devel/build.html?rev=1804358=1804357=1804358=diff
==
--- velocity/site/production/engine/devel/build.html (original)
+++ velocity/site/production/engine/devel/build.html Mon Aug  7 20:53:23 2017
@@ -224,13 +224,11 @@ h2:hover > .headerlink, h3:hover > .head
 }
 h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }
 Installation
-Velocity runs on a variety of platforms that have installed the Java 
Virtual Machine. The Java Development Kit version 1.6 is required for users who 
want to compile Velocity from its source code.
+Velocity runs on a variety of platforms that have installed the Java 
Virtual Machine. A Java Development Kit version 1.7+ is required to compile 
Velocity from its source code (as it is to run it).
 Everything required to build Velocity comes with the distribution, which 
can be obtained from http://svn.apache.org/repos/asf/velocity/engine/;>Subversion or from 
the main distribution. However, you will 
need to install http://maven.apache.org/;>Maven to build the 
Velocity sources.
-http://maven.apache.org/;>Maven is also an Apache project. To 
build Apache Velocity, you need at least Version 2.2.1 of Apache Maven.
+http://maven.apache.org/;>Maven is also an Apache project. To 
build Apache Velocity, you need at least Version 3.0.5 of Apache Maven.
 Required Tools
-To build Velocity we require http://maven.apache.org/;>Maven 
version 2.2.1 or higher (Maven 3 can be used too) to perform the build process. 
We assume that you have followed Maven's installation instructions and have it 
properly installed.
-Velocity requires JDK 1.6 or greater to compile.
-Finally, if you wish to modify 

svn commit: r1804318 - in /velocity/tools/trunk/velocity-tools-generic: pom.xml src/main/java/org/apache/velocity/tools/generic/JsonTool.java src/test/java/org/apache/velocity/tools/generic/JsonToolTe

2017-08-07 Thread cbrisson
Author: cbrisson
Date: Mon Aug  7 10:11:20 2017
New Revision: 1804318

URL: http://svn.apache.org/viewvc?rev=1804318=rev
Log:
[tools] Switch JSON tool to org.json.simple

Modified:
velocity/tools/trunk/velocity-tools-generic/pom.xml

velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java

velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/JsonToolTests.java

Modified: velocity/tools/trunk/velocity-tools-generic/pom.xml
URL: 
http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/pom.xml?rev=1804318=1804317=1804318=diff
==
--- velocity/tools/trunk/velocity-tools-generic/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-generic/pom.xml Mon Aug  7 10:11:20 2017
@@ -46,13 +46,17 @@
   
   
   
-  org.json
+  
com.googlecode.json-simple:json-simple
   
   
   
   
-  org.json
-  
org.apache.velocity.tools.shaded.org.json
+  org.json.simple
+  
org.apache.velocity.tools.shaded.org.json.simple
+  
+  
+  org.json.simple.parser
+  
org.apache.velocity.tools.shaded.org.json.simple.parser
   
   
   true
@@ -96,9 +100,9 @@
   test
   
   
-  org.json
-  json
-  20160810
+  com.googlecode.json-simple
+  json-simple
+  1.1.1
   
   
 

Modified: 
velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java
URL: 
http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java?rev=1804318=1804317=1804318=diff
==
--- 
velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java
 (original)
+++ 
velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java
 Mon Aug  7 10:11:20 2017
@@ -30,9 +30,9 @@ import java.util.Set;
 
 import org.apache.velocity.tools.ConversionUtils;
 import org.apache.velocity.tools.XmlUtils;
-import org.json.JSONArray;
-import org.json.JSONObject;
-import org.json.JSONTokener;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
 
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.DefaultKey;
@@ -139,11 +139,11 @@ public class JsonTool extends ImportSupp
 Object ret = null;
 if (jsonArray != null)
 {
-ret = wrapIfNeeded(jsonArray.opt(index));
+ret = wrapIfNeeded(jsonArray.get(index));
 }
 else if (jsonObject != null)
 {
-ret = wrapIfNeeded(jsonObject.opt(String.valueOf(index)));
+ret = wrapIfNeeded(jsonObject.get(String.valueOf(index)));
 }
 return ret;
 }
@@ -166,7 +166,7 @@ public class JsonTool extends ImportSupp
 }
 else if (jsonObject != null)
 {
-ret = wrapIfNeeded(jsonObject.opt(key));
+ret = wrapIfNeeded(jsonObject.get(key));
 }
 return ret;
 }
@@ -177,7 +177,7 @@ public class JsonTool extends ImportSupp
  */
 public Iterator keys()
 {
-return jsonObject == null ? null : jsonObject.keys();
+return jsonObject == null ? null : jsonObject.keySet().iterator();
 }
 
 /**
@@ -198,7 +198,7 @@ public class JsonTool extends ImportSupp
 {
 if (jsonObject != null)
 {
-return jsonObject.keys();
+return jsonObject.keySet().iterator();
 }
 else if (jsonArray != null)
 {
@@ -211,28 +211,9 @@ public class JsonTool extends ImportSupp
  * Get size of root object or array.
  * @return size
  */
-public int length()
+public int size()
 {
-return jsonObject == null ? jsonArray == null ? null : 
jsonArray.length() : jsonObject.length();
-}
-
-/**
- * Get array of root object keys.
- * @return array of keys
- */
-public JSONArray names()
-{
-return jsonObject == null ? null