maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raf...@apache.org
Subject svn commit: r665879 - in /maven/archetype/trunk/archetype-common/src: main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java test/resources/projects/roundtrip-1-project/src/main/java/org/apache/maven/test/App.java
Date Mon, 09 Jun 2008 20:23:43 GMT
Author: rafale
Date: Mon Jun  9 13:23:43 2008
New Revision: 665879

URL: http://svn.apache.org/viewvc?rev=665879&view=rev
Log:
Fix archetype-183 archetype-180
Quick hack to change all pound # symbol in velocity template

Modified:
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/roundtrip-1-project/src/main/java/org/apache/maven/test/App.java

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java?rev=665879&r1=665878&r2=665879&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
Mon Jun  9 13:23:43 2008
@@ -2123,7 +2123,9 @@
                     "${" + propertyKey + "}"
                 );
         }
-        return result;
+        //TODO: Replace velocity to a better engine... 
+        return "#set( $symbol_pound = '#' )\n" + StringUtils.replace(
+                result, "#", "${symbol_pound}" );
     }
 
     private String getTemplateOutputDirectory()

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/roundtrip-1-project/src/main/java/org/apache/maven/test/App.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/roundtrip-1-project/src/main/java/org/apache/maven/test/App.java?rev=665879&r1=665878&r2=665879&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/roundtrip-1-project/src/main/java/org/apache/maven/test/App.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/roundtrip-1-project/src/main/java/org/apache/maven/test/App.java
Mon Jun  9 13:23:43 2008
@@ -9,5 +9,20 @@
     public static void main( String[] args )
     {
         System.out.println( "Hello World!" );
+        //A   #\{some}
+        //B   #{some}
+        //F   {some}
+        //C   #{some other}
+        //D   \#{some other}
+        //E   #{}
+        
+        /*
+        A   #\{some}
+        B   #{some}
+        F   {some}
+        C   #{some other}
+        D   \#{some other}
+        E   #{}
+         */
     }
 }



Mime
View raw message