Author: cbrisson
Date: Fri Dec  9 13:22:32 2016
New Revision: 1773379

URL: http://svn.apache.org/viewvc?rev=1773379&view=rev
Log:
[engine] Remove shading of commons-lang3. Remove all references to 
ExtendedProperties, and dependency towards commons-collections.

Removed:
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java
Modified:
    velocity/engine/trunk/src/changes/changes.xml
    velocity/engine/trunk/velocity-engine-core/pom.xml
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/Velocity.java
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
    
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
    
velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java

Modified: velocity/engine/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/src/changes/changes.xml?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- velocity/engine/trunk/src/changes/changes.xml (original)
+++ velocity/engine/trunk/src/changes/changes.xml Fri Dec  9 13:22:32 2016
@@ -137,7 +137,6 @@
       
       <action type="add" dev="cbrisson" issue="VELOCITY-793">
         The ResourceLoader API now provides a Reader rather than an 
InputStream.
-        The InputStream getter method has been deprecated.
         Also fixes VELOCITY-599.
       </action>
       
@@ -213,10 +212,6 @@
         Add SLF4J logging option
       </action>
 
-      <action type="add" dev="apetrelli" issue="VELOCITY-789">
-        Shading of Commons Lang and Commons Collections
-      </action>
-
       <action type="add" dev="apetrelli">
         Use Maven 2 as build system
       </action>

Modified: velocity/engine/trunk/velocity-engine-core/pom.xml
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/pom.xml?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/pom.xml (original)
+++ velocity/engine/trunk/velocity-engine-core/pom.xml Fri Dec  9 13:22:32 2016
@@ -52,42 +52,6 @@
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>2.4.3</version>
-        <executions>
-          <execution>
-            <id>shade</id>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <artifactSet>
-                <includes>
-                  <include>commons-collections:commons-collections</include>
-                  <include>org.apache.commons:commons-lang3</include>
-                </includes>
-                <excludes>
-                  <exclude>org.slf4j:slf4j-api</exclude>
-                </excludes>
-              </artifactSet>
-              <relocations>
-                <relocation>
-                  <pattern>org.apache.commons.collections</pattern>
-                  
<shadedPattern>org.apache.velocity.shaded.commons.collections</shadedPattern>
-                </relocation>
-                <relocation>
-                  <pattern>org.apache.commons.lang3</pattern>
-                  
<shadedPattern>org.apache.velocity.shaded.commons.lang3</shadedPattern>
-                </relocation>
-              </relocations>
-              <minimizeJar>true</minimizeJar>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <version>${surefire.plugin.version}</version>
         <configuration>
@@ -218,11 +182,6 @@ Velocity AST Node classes created to src
 
   <dependencies>
     <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-      <version>3.2.2</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
       <version>3.5</version>

Modified: 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/Velocity.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/Velocity.java?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/Velocity.java
 (original)
+++ 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/Velocity.java
 Fri Dec  9 13:22:32 2016
@@ -19,7 +19,6 @@ package org.apache.velocity.app;
  * under the License.
  */
 
-import org.apache.commons.collections.ExtendedProperties;
 import org.apache.velocity.Template;
 import org.apache.velocity.context.Context;
 import org.apache.velocity.exception.MethodInvocationException;
@@ -137,25 +136,7 @@ public class Velocity implements Runtime
     }
 
     /**
-     * Set an entire configuration at once. This is
-     * useful in cases where the parent application uses
-     * the ExtendedProperties class and the velocity configuration
-     * is a subset of the parent application's configuration.
-     *
-     * @param configuration A configuration object.
-     * @deprecated use {@link setExtendedProperties(ExtProperties)}
-     *
-     */
-    public @Deprecated static void setExtendedProperties( ExtendedProperties 
configuration)
-    {
-        RuntimeSingleton.setConfiguration(configuration);
-    }
-
-    /**
-     * Set an entire configuration at once. This is
-     * useful in cases where the parent application uses
-     * the ExtendedProperties class and the velocity configuration
-     * is a subset of the parent application's configuration.
+     * Set an entire configuration at once.
      *
      * @param configuration A configuration object.
      * @since 2.0

Modified: 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java
 (original)
+++ 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java
 Fri Dec  9 13:22:32 2016
@@ -19,7 +19,6 @@ package org.apache.velocity.app;
  * under the License.
  */
 
-import org.apache.commons.collections.ExtendedProperties;
 import org.apache.velocity.Template;
 import org.apache.velocity.context.Context;
 import org.apache.velocity.exception.MethodInvocationException;
@@ -155,24 +154,7 @@ public class VelocityEngine implements R
     }
 
     /**
-     * Set an entire configuration at once. This is
-     * useful in cases where the parent application uses
-     * the ExtendedProperties class and the velocity configuration
-     * is a subset of the parent application's configuration.
-     *
-     * @param  configuration
-     * @deprecated use {@link #setExtendedProperties(ExtProperties)}
-     */
-    public @Deprecated void setExtendedProperties( ExtendedProperties 
configuration)
-    {
-        ri.setConfiguration(configuration);
-    }
-
-    /**
-     * Set an entire configuration at once. This is
-     * useful in cases where the parent application uses
-     * the ExtendedProperties class and the velocity configuration
-     * is a subset of the parent application's configuration.
+     * Set an entire configuration at once.
      *
      * @param  configuration
      * @since 2.0

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=1773379&r1=1773378&r2=1773379&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 Dec  9 13:22:32 2016
@@ -19,7 +19,6 @@ package org.apache.velocity.runtime;
  * under the License.
  */
 
-import org.apache.commons.collections.ExtendedProperties;
 import org.apache.velocity.Template;
 import org.apache.velocity.app.event.EventCartridge;
 import org.apache.velocity.app.event.EventHandler;
@@ -546,35 +545,8 @@ public class RuntimeInstance implements
     }
 
     /**
-     * Allow an external system to set an ExtendedProperties
-     * object to use. This is useful where the external
-     * system also uses the ExtendedProperties class and
-     * the velocity configuration is a subset of
-     * parent application's configuration. This is
-     * the case with Turbine.
-     *
-     * @param  configuration
-     * @deprecated use {@link #setConfiguration(ExtProperties)}
-     */
-    public @Deprecated void setConfiguration( ExtendedProperties configuration)
-    {
-        if (overridingProperties == null)
-        {
-            overridingProperties = 
ExtProperties.convertProperties(configuration);
-        }
-        else
-        {
-            
overridingProperties.combine(ExtProperties.convertProperties(configuration));
-        }
-    }
-
-    /**
-     * Allow an external system to set an ExtendedProperties
-     * object to use. This is useful where the external
-     * system also uses the ExtendedProperties class and
-     * the velocity configuration is a subset of
-     * parent application's configuration. This is
-     * the case with Turbine.
+     * Allow an external system to set an ExtProperties
+     * object to use.
      *
      * @param  configuration
      * @since 2.0
@@ -725,8 +697,8 @@ public class RuntimeInstance implements
     }
 
     /**
-     * Initialize the Velocity Runtime with the name of
-     * ExtendedProperties object.
+     * Initialize the Velocity Runtime with a
+     * properties file path.
      *
      * @param configurationFile
      */

Modified: 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
 (original)
+++ 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
 Fri Dec  9 13:22:32 2016
@@ -19,7 +19,6 @@ package org.apache.velocity.runtime;
  * under the License.    
  */
 
-import org.apache.commons.collections.ExtendedProperties;
 import org.apache.velocity.Template;
 import org.apache.velocity.app.event.EventCartridge;
 import org.apache.velocity.context.Context;
@@ -84,25 +83,8 @@ public interface RuntimeServices
     public  void setProperty(String key, Object value);
 
     /**
-     * Allow an external system to set an ExtendedProperties
-     * object to use. This is useful where the external
-     * system also uses the ExtendedProperties class and
-     * the velocity configuration is a subset of
-     * parent application's configuration. This is
-     * the case with Turbine.
-     *
-     * @param configuration
-     * @deprecated use {@link setConfiguration(ExtProperties)}
-     */
-    public @Deprecated void setConfiguration( ExtendedProperties 
configuration);
-
-    /**
      * Allow an external system to set an ExtProperties
-     * object to use. This is useful where the external
-     * system also uses the ExtendedProperties class and
-     * the velocity configuration is a subset of
-     * parent application's configuration. This is
-     * the case with Turbine.
+     * object to use.
      *
      * @param configuration
      * @since 2.0

Modified: 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
 (original)
+++ 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
 Fri Dec  9 13:22:32 2016
@@ -19,7 +19,6 @@ package org.apache.velocity.runtime;
  * under the License.
  */
 
-import org.apache.commons.collections.ExtendedProperties;
 import org.apache.velocity.Template;
 import org.apache.velocity.app.event.EventCartridge;
 import org.apache.velocity.exception.ParseErrorException;
@@ -147,29 +146,8 @@ public class RuntimeSingleton implements
     }
 
     /**
-     * Allow an external system to set an ExtendedProperties
-     * object to use. This is useful where the external
-     * system also uses the ExtendedProperties class and
-     * the velocity configuration is a subset of
-     * parent application's configuration. This is
-     * the case with Turbine.
-     *
-     * @param configuration
-     * @deprecated use {@link #setConfiguration(ExtProperties)}
-     * @see RuntimeInstance#setConfiguration(ExtendedProperties)
-     */
-    public @Deprecated static void setConfiguration( ExtendedProperties 
configuration)
-    {
-        ri.setConfiguration(configuration);
-    }
-
-    /**
      * Allow an external system to set an ExtProperties
-     * object to use. This is useful where the external
-     * system also uses the ExtProperties class and
-     * the velocity configuration is a subset of
-     * parent application's configuration. This is
-     * the case with Turbine.
+     * object to use.
      *
      * @param configuration
      * @see RuntimeInstance#setConfiguration(ExtProperties)

Modified: 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
 (original)
+++ 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
 Fri Dec  9 13:22:32 2016
@@ -140,7 +140,6 @@ public class VelocimacroProxy extends Di
         rsvc = rs;
         log = rs.getLog("macro");
       
-        // this is a very expensive call (ExtendedProperties is very slow)
         strictArguments = rsvc.getConfiguration().getBoolean(
             RuntimeConstants.VM_ARGUMENTS_STRICT, false);
 

Modified: 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
 (original)
+++ 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
 Fri Dec  9 13:22:32 2016
@@ -232,7 +232,7 @@ public class ResourceManagerImpl
                        rsvc.getConfiguration().subset(loaderID.toString());
 
             /*
-             *  we can't really count on ExtendedProperties to give us an 
empty set
+             *  we can't really count on ExtProperties to give us an empty set
              */
             if (loaderConfiguration == null)
             {

Modified: 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
 (original)
+++ 
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
 Fri Dec  9 13:22:32 2016
@@ -127,7 +127,7 @@ import java.util.Vector;
  * it, go ahead and tune it up!
  *
  * This class is a clone of org.apache.commons.collections.ExtendedProperties
- * (which has been removed from commons-collections-4.0)
+ * (which has been removed from commons-collections-4.x)
  *
  * @since 2.0
  * @version $Revision: $

Modified: 
velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java?rev=1773379&r1=1773378&r2=1773379&view=diff
==============================================================================
--- 
velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java
 (original)
+++ 
velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java
 Fri Dec  9 13:22:32 2016
@@ -20,7 +20,7 @@ package org.apache.velocity.test;
  */
 
 import junit.framework.TestSuite;
-import org.apache.commons.collections.ExtendedProperties;
+import org.apache.velocity.util.ExtProperties;
 
 import java.io.FileWriter;
 import java.util.Iterator;
@@ -28,7 +28,7 @@ import java.util.Vector;
 
 
 /**
- * Tests for the Commons ExtendedProperties class. This is an identical
+ * Tests for the ExtProperties class. This is an identical
  *  copy of the ConfigurationTestCase, which will disappear when
  *  the Configuration class does
  *
@@ -78,7 +78,7 @@ public class CommonsExtPropTestCase exte
     {
             assureResultsDirectoryExists(RESULTS_DIR);
 
-            ExtendedProperties c = new ExtendedProperties(TEST_CONFIG);
+            ExtProperties c = new ExtProperties(TEST_CONFIG);
 
             FileWriter result = new FileWriter(
                 getFileName(RESULTS_DIR, "output", "res"));
@@ -90,7 +90,7 @@ public class CommonsExtPropTestCase exte
             showVector(result, c.getVector("resource.loader"));
 
             message(result, "Testing subset(prefix).getKeys() ...");
-            ExtendedProperties subset = c.subset("file.resource.loader");
+            ExtProperties subset = c.subset("file.resource.loader");
             showIterator(result, subset.getKeys());
 
             message(result, "Testing getVector(prefix) ...");


Reply via email to