velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r961765 - in /velocity/sandbox/maven-reorg/tools/trunk: ./ src/main/java/org/apache/velocity/tools/ src/main/java/org/apache/velocity/tools/config/ src/main/java/org/apache/velocity/tools/generic/ src/test/java/ src/test/java/org/apache/vel...
Date Thu, 08 Jul 2010 13:43:32 GMT
Author: apetrelli
Date: Thu Jul  8 13:43:31 2010
New Revision: 961765

URL: http://svn.apache.org/viewvc?rev=961765&view=rev
Log:
VELOCITYSB-5
Moved code to velocity-tools-generic.

Added:
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ClassUtils.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ClassUtils.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ConversionUtils.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ConversionUtils.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/OldToolInfo.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/OldToolInfo.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/Scope.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/Scope.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolContext.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ToolContext.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolInfo.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ToolInfo.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolManager.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ToolManager.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/Toolbox.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/Toolbox.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolboxFactory.java
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ToolboxFactory.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/
      - copied from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/config/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/
      - copied from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/generic/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/
      - copied from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/test/java/org/apache/velocity/tools/generic/
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/resources/file.xml
      - copied unchanged from r961747, velocity/sandbox/maven-reorg/tools/trunk/src/test/java/file.xml
Removed:
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ClassUtils.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ConversionUtils.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/OldToolInfo.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/Scope.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ToolContext.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ToolInfo.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ToolManager.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/Toolbox.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/ToolboxFactory.java
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/config/
    velocity/sandbox/maven-reorg/tools/trunk/src/main/java/org/apache/velocity/tools/generic/
    velocity/sandbox/maven-reorg/tools/trunk/src/test/java/file.xml
    velocity/sandbox/maven-reorg/tools/trunk/src/test/java/org/apache/velocity/tools/generic/
Modified:
    velocity/sandbox/maven-reorg/tools/trunk/pom.xml
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/pom.xml
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/ClassToolTests.java
    velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/XmlToolTests.java

Modified: velocity/sandbox/maven-reorg/tools/trunk/pom.xml
URL: http://svn.apache.org/viewvc/velocity/sandbox/maven-reorg/tools/trunk/pom.xml?rev=961765&r1=961764&r2=961765&view=diff
==============================================================================
--- velocity/sandbox/maven-reorg/tools/trunk/pom.xml (original)
+++ velocity/sandbox/maven-reorg/tools/trunk/pom.xml Thu Jul  8 13:43:31 2010
@@ -32,7 +32,7 @@
     <groupId>org.apache.velocity</groupId>
     <artifactId>velocity-tools-parent</artifactId>
     <name>VelocityTools</name>
-    <version>2.1-SNAPSHOT</version>
+    <version>2.1.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <url>http://velocity.apache.org/tools/devel/</url>

Modified: velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/pom.xml
URL: http://svn.apache.org/viewvc/velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/pom.xml?rev=961765&r1=961764&r2=961765&view=diff
==============================================================================
--- velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/pom.xml (original)
+++ velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/pom.xml Thu Jul  8 13:43:31
2010
@@ -3,11 +3,18 @@
   <parent>
     <artifactId>velocity-tools-parent</artifactId>
     <groupId>org.apache.velocity</groupId>
-    <version>2.1-SNAPSHOT</version>
+    <version>2.1.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.velocity</groupId>
   <artifactId>velocity-tools-generic</artifactId>
-  <version>2.1-SNAPSHOT</version>
+  <version>2.1.0-SNAPSHOT</version>
   <name>Apache Velocity Tools - Generic tools</name>
   <description>Generic tools that can be used in any context.</description>
+  <dependencies>
+  	<dependency>
+  		<groupId>org.apache.velocity</groupId>
+  		<artifactId>velocity-engine-core</artifactId>
+  		<version>2.0.0-SNAPSHOT</version>
+  	</dependency>
+  </dependencies>
 </project>
\ No newline at end of file

Modified: velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/ClassToolTests.java
URL: http://svn.apache.org/viewvc/velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/ClassToolTests.java?rev=961765&r1=961747&r2=961765&view=diff
==============================================================================
--- velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/ClassToolTests.java
(original)
+++ velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/ClassToolTests.java
Thu Jul  8 13:43:31 2010
@@ -19,18 +19,21 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
-import org.junit.*;
-import static org.junit.Assert.*;
-import java.lang.annotation.Annotation;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import org.apache.velocity.runtime.log.Log;
+
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.SkipSetters;
-import org.apache.velocity.tools.generic.ValueParser;
-import org.apache.velocity.tools.view.AbstractSearchTool;
+import org.junit.Test;
 
 /**
  * <p>Tests for {@link ClassTool}</p>
@@ -232,9 +235,14 @@ public class ClassToolTests {
         ClassTool classTool = new ClassTool();
         // default type is java.lang.Object
         assertFalse(classTool.isAbstract());
-        classTool.setType(AbstractSearchTool.class);
+        classTool.setType(MyAbstract.class);
         assertTrue(classTool.isAbstract());
     }
+    
+    protected static abstract class MyAbstract 
+    {
+        // do nothing
+    }
 
     public @Test void methodIsDeprecated() throws Exception
     {

Modified: velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/XmlToolTests.java
URL: http://svn.apache.org/viewvc/velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/XmlToolTests.java?rev=961765&r1=961747&r2=961765&view=diff
==============================================================================
--- velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/XmlToolTests.java
(original)
+++ velocity/sandbox/maven-reorg/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/XmlToolTests.java
Thu Jul  8 13:43:31 2010
@@ -19,15 +19,20 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
-import org.junit.*;
-import static org.junit.Assert.*;
-import java.net.URL;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
-import org.apache.velocity.tools.generic.ValueParser;
+
 import org.dom4j.Node;
+import org.junit.Test;
 
 /**
  * <p>Tests for XmlTool</p>
@@ -38,7 +43,7 @@ import org.dom4j.Node;
  */
 public class XmlToolTests {
 
-    private static final String XML_FILE = "@test.file.dir@/file.xml";
+    private static final String XML_FILE = "file.xml";
 
     private static final String XML_STRING =
 "<foo>\n  <bar name=\"a\"/>\n  <baz>woogie</baz>\n  <baz>wiggie</baz>\n</foo>";



Mime
View raw message