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
>
>
>
>
>
>

Reply via email to