The correct property for accessing the target directory is
${project.build.outputDirectory}. So if you change in your "todir" to
use ${project.build.outputDirectory} that should work. I would suggest
investigating another approach though, there has to be a simpler
solution to resolve .css caching.

Thanks

-Jeff

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Dean Hiller
Sent: Wednesday, May 19, 2010 8:53 AM
To: [email protected]
Subject: Re: how to move folder from res to res${BUILD_NUMBER} in maven?

Is there no way of doing the below?  This is like the most typical thing
in web applications so the browser will get the newest css, js, jpg
files when a new release comes out.

thanks,
Dean

On Tue, May 18, 2010 at 3:28 PM, Dean Hiller <[email protected]> wrote:

> Our resource folder in webapps named res(which has images, js, css, 
> etc) is renamed every release.  This then makes it so when we fix a 
> css, customers get the fresh one instead of the old stale one from 
> their cache(ie. they get the fix we made since this folder is always 
> renamed).
>
> So, in maven, I had
>             <plugin>
>                 <artifactId>maven-antrun-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <phase>test</phase>
>                         <goals>
>                             <goal>run</goal>
>                         </goals>
>                         <configuration>
>                             <tasks>
>                                 <move 
> file="${project.build.directory}/${
> project.name}-${project.version}/res"
>                                     
> todir="${project.build.directory}/${
> project.name}-${project.version}/res${BUILD_NUMBER}" />
>                                 <delete
>                                     
> file="${project.build.directory}/${
> project.name}-${project.version}/WEB-INF/components.xml" />
>                                 <copy
> file="src/main/descriptors/jboss/WEB-INF/components.xml"
>                                     
> tofile="${project.build.directory}/${
> project.name}-${project.version}/WEB-INF/components.xml" />
>                             </tasks>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
>
> but the staging area for the webapp in target directory seems not to 
> exist when my ant tasks run :( and so our build keeps on failing.
> 1. How do I move the target/webappstaging/res folder to 
> target/webappstaging/resBUILDNUMBER folder OR 2. How do I move the 
> src/main/webapp/res folder to target/webappstaging/resBUILD_NUMBER 
> folder and delete target/webappstaging/res folder
>
> thanks,
> Dean
>
>
>
>
>
>

--------------------------------------------------------------------------------
The information contained in this communication may be confidential, is intended
only for the use of the recipient(s) named above, and may be legally privileged.
If the reader of this message is not the intended recipient, you are hereby
notified that any dissemination, distribution, or copying of this communication,
or any of its contents, is strictly prohibited. If you have received this
communication in error, please notify the sender immediately and destroy or
delete the original message and any copy of it from your computer system. If
you have any questions concerning this message, please contact the sender.
================================================================================



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to