[ http://jira.codehaus.org/browse/ARCHETYPE-39?page=comments#action_72772 ] 
            
Guillaume Nodet commented on ARCHETYPE-39:
------------------------------------------

I need to use resource filtering to build my archetype.
So I need a way to escape one velocity level, and a way to escape two verlocity 
levels.

So in my src/main/resources/archetype-resources/pom.xml, i have something like

   <artifactId>\${artifactId}</artifactId>
   ...
   <plugin>
    .  ..
       <version>${servicemix-version}</version>
   </plugin>
   ...
   <sourceRoot>\$${basedir}/target/generated-sources</sourceRoot>

When this file is bundled in the archtype, i want it to be

   <artifactId>${artifactId}</artifactId>
   ...
   <plugin>
    .  ..
       <version>3.0-SNAPSHOT</version>
   </plugin>
   ...
   <sourceRoot>\${basedir}/target/generated-sources</sourceRoot>

So that the project created using this archtype will be


   <artifactId>my-archetype</artifactId>
   ...
   <plugin>
    .  ..
       <version>3.0-SNAPSHOT</version>
   </plugin>
   ...
   <sourceRoot>${basedir}/target/generated-sources</sourceRoot>


The problem is that i found no way to have a ${artifactId} generated after the 
resource filtering,
because :
   $${artifactId}  => $${artifactId}
   ${artifactId}   => org.apache.servicemix.tooling.servicemix-archetype
   \${artifactId}  => \org.apache.servicemix.tooling.servicemix-archetype
   $\${artifactId} => $\org.apache.servicemix.tooling.servicemix-archetype
   \$${artifactId}  => \$${artifactId}




> Add tool for working with escaping in Velocity templates
> --------------------------------------------------------
>
>                 Key: ARCHETYPE-39
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-39
>             Project: Maven Archetype
>          Issue Type: Improvement
>          Components: Plugin
>    Affects Versions: 1.0-alpha-4
>            Reporter: Willie Vu
>
> e.g. I need to put ${archifactId} (without parameter replacement) into an 
> assembly descriptor.  I need to escape the dollar sign.
> This is the Escape Tool of Velocity - 
> http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tools/generic/EscapeTool.html.
>   The embedded Velocity engine will be configured to use it, or archetype 
> plugin allows further Velocity configuration.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to