You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dean Hiller <de...@alvazan.com> on 2010/05/18 23:28:21 UTC

how to move folder from res to res${BUILD_NUMBER} in maven?

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

Re: how to move folder from res to res${BUILD_NUMBER} in maven?

Posted by Dean Hiller <de...@alvazan.com>.
I tried that yesterday I believe(and right now our repository ran out of
space so I can't retry that to make sure :( ).

hmmmmm, I think I know how to do it now though, and then my question is just
why my filtering is not working on the war plugin.....I think I can
1. copy from src/main/webapps/res to target/webdir-1.0.0/resBUILDNUMBER
2. then filter in war plugin....I may be back with why my filtering is not
working though for a next question because I was trying to do some filtering
the other day and could not get it to work except on resources outside of
the webapps directory.

a little bit closer to a solution now I think...thanks!!!

Dean

On Wed, May 19, 2010 at 8:41 AM, Moll, Jeff <JM...@glhec.org> wrote:

>
> Try running on the package goal instead, the test phase doesn't require
> the code to be packaged and thus isn't creating the folder structure you
> are looking for.
>
> Thanks,
>
> -Jeff
>
>
> -----Original Message-----
> From: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf Of
> Dean Hiller
> Sent: Wednesday, May 19, 2010 9:20 AM
> To: Maven Users List
> Subject: Re: how to move folder from res to res${BUILD_NUMBER} in maven?
>
> 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 <JM...@glhec.org> 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: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf
> > Of Dean Hiller
> > Sent: Wednesday, May 19, 2010 8:53 AM
> > To: users@maven.apache.org
> > 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 <de...@alvazan.com> 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: how to move folder from res to res${BUILD_NUMBER} in maven?

Posted by "Moll, Jeff" <JM...@glhec.org>.
Correction, package phase. 


Jeff Moll
E-Commerce Development
Great Lakes Educational Loan Services, Inc.
(608) 246-1460 x2256

-----Original Message-----
From: Moll, Jeff [mailto:JMoll@glhec.org] 
Sent: Wednesday, May 19, 2010 9:42 AM
To: Maven Users List
Subject: RE: how to move folder from res to res${BUILD_NUMBER} in maven?

 
Try running on the package goal instead, the test phase doesn't require
the code to be packaged and thus isn't creating the folder structure you
are looking for.

Thanks,

-Jeff


-----Original Message-----
From: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf Of
Dean Hiller
Sent: Wednesday, May 19, 2010 9:20 AM
To: Maven Users List
Subject: Re: how to move folder from res to res${BUILD_NUMBER} in maven?

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 <JM...@glhec.org> 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: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf 
> Of Dean Hiller
> Sent: Wednesday, May 19, 2010 8:53 AM
> To: users@maven.apache.org
> 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 <de...@alvazan.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



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





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


RE: how to move folder from res to res${BUILD_NUMBER} in maven?

Posted by "Moll, Jeff" <JM...@glhec.org>.
 
Try running on the package goal instead, the test phase doesn't require
the code to be packaged and thus isn't creating the folder structure you
are looking for.

Thanks,

-Jeff


-----Original Message-----
From: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf Of
Dean Hiller
Sent: Wednesday, May 19, 2010 9:20 AM
To: Maven Users List
Subject: Re: how to move folder from res to res${BUILD_NUMBER} in maven?

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 <JM...@glhec.org> 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: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf 
> Of Dean Hiller
> Sent: Wednesday, May 19, 2010 8:53 AM
> To: users@maven.apache.org
> 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 <de...@alvazan.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



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


Re: how to move folder from res to res${BUILD_NUMBER} in maven?

Posted by Dean Hiller <de...@alvazan.com>.
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 <rwheeler@artifact-software.com
> 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<JM...@glhec.org>  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: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf Of
>>> Dean Hiller
>>> Sent: Wednesday, May 19, 2010 8:53 AM
>>> To: users@maven.apache.org
>>> 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<de...@alvazan.com>  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: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: how to move folder from res to res${BUILD_NUMBER} in maven?

Posted by Ron Wheeler <rw...@artifact-software.com>.
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<JM...@glhec.org>  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: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf Of
>> Dean Hiller
>> Sent: Wednesday, May 19, 2010 8:53 AM
>> To: users@maven.apache.org
>> 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<de...@alvazan.com>  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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>      
>    


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


Re: how to move folder from res to res${BUILD_NUMBER} in maven?

Posted by Dean Hiller <de...@alvazan.com>.
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 <JM...@glhec.org> 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: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf Of
> Dean Hiller
> Sent: Wednesday, May 19, 2010 8:53 AM
> To: users@maven.apache.org
> 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 <de...@alvazan.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: how to move folder from res to res${BUILD_NUMBER} in maven?

Posted by "Moll, Jeff" <JM...@glhec.org>.
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: dean.hiller@gmail.com [mailto:dean.hiller@gmail.com] On Behalf Of
Dean Hiller
Sent: Wednesday, May 19, 2010 8:53 AM
To: users@maven.apache.org
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 <de...@alvazan.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: how to move folder from res to res${BUILD_NUMBER} in maven?

Posted by Dean Hiller <de...@alvazan.com>.
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 <de...@alvazan.com> 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
>
>
>
>
>
>