heh, I went that direction and that hosed my dev environment up/SCM such taht SCM wanted to check the changes in(I then figured it is really a bad idea to generate files at all during a build in the src or input directories).
but as in my last email, I think I am close to a solution. Just have to try it after we fix our artifactory from being filled up. Dean On Wed, May 19, 2010 at 8:49 AM, Ron Wheeler <[email protected] > wrote: > Can you not figure out a way to rename the source of the copy so that the > names are changed before maven moves them to the output? > > Ron > > > > On 19/05/2010 10:20 AM, Dean Hiller wrote: > >> actually, this pattern is very typical to release new versions of css, js, >> etc. Projects like richfaces and TinyMCE both use this pattern(not to >> mention many more). I don't know of any other way to get css, js fixes >> immediately out to customers without the renaming(in fact, I doubt a >> better >> solution exists here as this solution has worked great for our last 4 >> releases but I am open to ideas). >> >> As far as ${project.build.outputDirectory}, I did try that but that seems >> to >> deal with the target/classes directory which then goes to WEB-INF/classes >> when packaging a war file. I need the files in the base level of the >> war(and the property below references that correctly, BUT the directory >> doesn't exist yet). >> >> The only solution I am aware of for css, js, jpg fixes to go out in a new >> release is to rename the path to the file(or the file itself) as it is a >> very easy solution in build tools typically(at least it was in ant). >> >> Dean >> >> >> >> On Wed, May 19, 2010 at 8:06 AM, Moll, Jeff<[email protected]> wrote: >> >> >> >>> 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] >>> >>> >>> >>> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
