You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by kalebral <ka...@gmail.com> on 2007/11/03 06:03:30 UTC

Using assembly to change file names

Using maven 2.0.7 I'm trying to use an assembly to rename .js files based the
build number.  Below are snippets from my pom.xml and assembly.xml files

from my pom.xml file

  <groupId>com.trovix</groupId>
        <artifactId>cp</artifactId>
        <version>TRUNK-SNAPSHOT</version>
        <packaging>war</packaging>
        <name>${project.artifactId}</name>

        <properties>
                <currentVersion>900</currentVersion>
        </properties>

My assembly looks like 

 <files>
        <file>
            <source>src/main/webapp/scripts/shared.js</source>  
<destName>src/main/webapp/scripts/shared-${project.properties.currentVersion}.js</destName>
            <filtered>true</filtered>
        </file>
        <file>
            <source>src/main/webapp/scripts/global.js</source>
           
<destName>src/main/webapp/scripts/global-${project.version}.js</destName>
            <filtered>true</filtered>
        </file>
         </files>

It works for the second file when I used ${project.version}, but not for the
first when i tried using ${project.properties.currentVersion}, unzipping the
distribution file I see:


cp-TRUNK-SNAPSHOT/src/main/webapp/scripts/shared-${project.properties.currentVersion}.js
 cp-TRUNK-SNAPSHOT/src/main/webapp/scripts/global-TRUNK-SNAPSHOT.js

Any ideas on what I am doing wrong??

Thanks, Lee

-- 
View this message in context: http://www.nabble.com/Using-assembly-to-change-file-names-tf4741934s177.html#a13560102
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org