Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-06 Thread Ken Egervari
I hope someone can help too. This one has me stuck.

I put a post up on stackoverflow.com if anyone wants to answer it there for
credit:

http://stackoverflow.com/questions/8373941/maven-yui-compressor-plugin-cannot-create-aggregation-given-a-longer-path

Ken


On Mon, Dec 5, 2011 at 8:07 AM, Stephen Connolly 
stephen.alan.conno...@gmail.com wrote:

 I know nothing about yuicompressor or it's maven plugin

 Hopefully somebody else can help you make some progress there, glad you
 have made progresss from where you were!

 -S

 On 5 December 2011 12:54, Ken Egervari ken.egerv...@gmail.com wrote:

  Thanks for the response Stephen!
 
  I didn't think we could exclude the copying of the actual sources
  themselves. That makes good sense! I changed it to
  `scripts/**/*.js,css/**/*.css` instead of what you had, and this finally
  seems to get the behaviour I want ;) I really had no idea this existed. I
  was looking at the regular excludes tags. Those didn't seem to solve
 the
  problem for me.
 
  I have one last problem that maybe you can help solve too? It concerns
 the
  yuicompressor:compress goal again, but this time it's about css.
 
  I'm trying to create two css aggregations - one for the public site and
 one
  for the application part of the site.
 
  If I make the output file
  ${project.build.directory}/${project.build.finalName}/css/public-all.css,
  everything works.
 
 [INFO] generate aggregation :
 
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public-all.css
 [INFO] public-all.css (32029b)
 [INFO] generate aggregation :
 
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application-all.css
 [INFO] application-all.css (50446b)
 
  But if I try and output the aggregated file to another subdirectory, such
  as
  ${project.build.directory}/${project.build.finalName}/css/public/all.css,
  it gives the following warning (which should honestly be an error...):
 
 [INFO] generate aggregation :
 
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public\all.css
 [WARNING] all.css not created
 [INFO] generate aggregation :
 
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application\all.css
 [WARNING] all.css not created
 
  Here is the pom.xml part where I am specifying the aggregations. Why on
  earth is this not working?
 
 aggregation
 removeIncludedfalse/removeIncluded
 insertNewLinetrue/insertNewLine
 
 
 
 output${project.build.directory}/${project.build.finalName}/css/public/all.css/output
 includes
 include**/public/base.css/include
 include**/public/jquery.fancybox-1.3.4.css/include
 /includes
 /aggregation
 aggregation
 removeIncludedfalse/removeIncluded
 insertNewLinetrue/insertNewLine
 
 
 
 output${project.build.directory}/${project.build.finalName}/css/application/all.css/output
 includes
 include**/application/reset.css/include
 include**/application/text.css/include
 include**/application/960.css/include
 include**/application/jquery-ui-1.8.11.custom.css/include
 include**/application/base.css/include
 include**/application/jquery.jcrop.css/include
 include**/application/farbtastic.css/include
 /includes
 /aggregation
 
  I checked and these directories exist too. If I try and point to a
  directory that doesn't exist, the yuicompressor:compress goal will fail.
 I
  just don't understand why the build process actually succeeds given valid
  directories, but it doesn't create the files in those directories. It
 makes
  no sense :(
 
  I thought that maybe it was a filesystem security problem, but that isn't
  it either.
 
  I am genuinely baffled as to why this doesn't work. I would appreciate
 any
  assistance on this little problem too. After this, I'm good to go ;)
 
  Ken
 
 
  On Mon, Dec 5, 2011 at 4:39 AM, Stephen Connolly 
  stephen.alan.conno...@gmail.com wrote:
 
   project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
   http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
   http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
groupIdlocaldomain.localhost/groupId
artifactIdexample/artifactId
packagingwar/packaging
version1.0-SNAPSHOT/version
build
  finalNameexample/finalName
  pluginManagement
plugins
  plugin
artifactIdmaven-release-plugin/artifactId
version2.2.1/version
configuration
  releaseProfilesrelease/releaseProfiles
/configuration
  /plugin
  plugin
artifactIdmaven-war-plugin/artifactId
version2.1.1/version
  /plugin
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdtomcat-maven-plugin/artifactId

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-06 Thread Stephen Connolly
I personally despise this habit people have of posting on stackoverflow
rather than emailing users@maven.a.o first...

Seriously, forget karma on stackoverflow, if the answer is important to
you, ask on users@maven.a.o first

-Stephen

On 6 December 2011 09:40, Ken Egervari ken.egerv...@gmail.com wrote:

 I hope someone can help too. This one has me stuck.

 I put a post up on stackoverflow.com if anyone wants to answer it there
 for
 credit:


 http://stackoverflow.com/questions/8373941/maven-yui-compressor-plugin-cannot-create-aggregation-given-a-longer-path

 Ken


 On Mon, Dec 5, 2011 at 8:07 AM, Stephen Connolly 
 stephen.alan.conno...@gmail.com wrote:

  I know nothing about yuicompressor or it's maven plugin
 
  Hopefully somebody else can help you make some progress there, glad you
  have made progresss from where you were!
 
  -S
 
  On 5 December 2011 12:54, Ken Egervari ken.egerv...@gmail.com wrote:
 
   Thanks for the response Stephen!
  
   I didn't think we could exclude the copying of the actual sources
   themselves. That makes good sense! I changed it to
   `scripts/**/*.js,css/**/*.css` instead of what you had, and this
 finally
   seems to get the behaviour I want ;) I really had no idea this
 existed. I
   was looking at the regular excludes tags. Those didn't seem to solve
  the
   problem for me.
  
   I have one last problem that maybe you can help solve too? It concerns
  the
   yuicompressor:compress goal again, but this time it's about css.
  
   I'm trying to create two css aggregations - one for the public site and
  one
   for the application part of the site.
  
   If I make the output file
  
 ${project.build.directory}/${project.build.finalName}/css/public-all.css,
   everything works.
  
  [INFO] generate aggregation :
  
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public-all.css
  [INFO] public-all.css (32029b)
  [INFO] generate aggregation :
  
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application-all.css
  [INFO] application-all.css (50446b)
  
   But if I try and output the aggregated file to another subdirectory,
 such
   as
  
 ${project.build.directory}/${project.build.finalName}/css/public/all.css,
   it gives the following warning (which should honestly be an error...):
  
  [INFO] generate aggregation :
  
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public\all.css
  [WARNING] all.css not created
  [INFO] generate aggregation :
  
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application\all.css
  [WARNING] all.css not created
  
   Here is the pom.xml part where I am specifying the aggregations. Why on
   earth is this not working?
  
  aggregation
  removeIncludedfalse/removeIncluded
  insertNewLinetrue/insertNewLine
  
  
  
 
 output${project.build.directory}/${project.build.finalName}/css/public/all.css/output
  includes
  include**/public/base.css/include
  include**/public/jquery.fancybox-1.3.4.css/include
  /includes
  /aggregation
  aggregation
  removeIncludedfalse/removeIncluded
  insertNewLinetrue/insertNewLine
  
  
  
 
 output${project.build.directory}/${project.build.finalName}/css/application/all.css/output
  includes
  include**/application/reset.css/include
  include**/application/text.css/include
  include**/application/960.css/include
  
  include**/application/jquery-ui-1.8.11.custom.css/include
  include**/application/base.css/include
  include**/application/jquery.jcrop.css/include
  include**/application/farbtastic.css/include
  /includes
  /aggregation
  
   I checked and these directories exist too. If I try and point to a
   directory that doesn't exist, the yuicompressor:compress goal will
 fail.
  I
   just don't understand why the build process actually succeeds given
 valid
   directories, but it doesn't create the files in those directories. It
  makes
   no sense :(
  
   I thought that maybe it was a filesystem security problem, but that
 isn't
   it either.
  
   I am genuinely baffled as to why this doesn't work. I would appreciate
  any
   assistance on this little problem too. After this, I'm good to go ;)
  
   Ken
  
  
   On Mon, Dec 5, 2011 at 4:39 AM, Stephen Connolly 
   stephen.alan.conno...@gmail.com wrote:
  
project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 groupIdlocaldomain.localhost/groupId
 artifactIdexample/artifactId
 packagingwar/packaging
 version1.0-SNAPSHOT/version
 build
   finalNameexample/finalName
   pluginManagement
 plugins
   plugin
 

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-06 Thread Ken Egervari
Well, I apologize for not putting this new question here first. I didn't
want to have two concurrent questions going on at the same time here, and I
was thinking that perhaps I would figure this css problem before then.

Ken


On Tue, Dec 6, 2011 at 5:08 AM, Stephen Connolly 
stephen.alan.conno...@gmail.com wrote:

 I personally despise this habit people have of posting on stackoverflow
 rather than emailing users@maven.a.o first...

 Seriously, forget karma on stackoverflow, if the answer is important to
 you, ask on users@maven.a.o first

 -Stephen

 On 6 December 2011 09:40, Ken Egervari ken.egerv...@gmail.com wrote:

  I hope someone can help too. This one has me stuck.
 
  I put a post up on stackoverflow.com if anyone wants to answer it there
  for
  credit:
 
 
 
 http://stackoverflow.com/questions/8373941/maven-yui-compressor-plugin-cannot-create-aggregation-given-a-longer-path
 
  Ken
 
 
  On Mon, Dec 5, 2011 at 8:07 AM, Stephen Connolly 
  stephen.alan.conno...@gmail.com wrote:
 
   I know nothing about yuicompressor or it's maven plugin
  
   Hopefully somebody else can help you make some progress there, glad you
   have made progresss from where you were!
  
   -S
  
   On 5 December 2011 12:54, Ken Egervari ken.egerv...@gmail.com wrote:
  
Thanks for the response Stephen!
   
I didn't think we could exclude the copying of the actual sources
themselves. That makes good sense! I changed it to
`scripts/**/*.js,css/**/*.css` instead of what you had, and this
  finally
seems to get the behaviour I want ;) I really had no idea this
  existed. I
was looking at the regular excludes tags. Those didn't seem to
 solve
   the
problem for me.
   
I have one last problem that maybe you can help solve too? It
 concerns
   the
yuicompressor:compress goal again, but this time it's about css.
   
I'm trying to create two css aggregations - one for the public site
 and
   one
for the application part of the site.
   
If I make the output file
   
  ${project.build.directory}/${project.build.finalName}/css/public-all.css,
everything works.
   
   [INFO] generate aggregation :
   
   
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public-all.css
   [INFO] public-all.css (32029b)
   [INFO] generate aggregation :
   
   
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application-all.css
   [INFO] application-all.css (50446b)
   
But if I try and output the aggregated file to another subdirectory,
  such
as
   
  ${project.build.directory}/${project.build.finalName}/css/public/all.css,
it gives the following warning (which should honestly be an
 error...):
   
   [INFO] generate aggregation :
   
   
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public\all.css
   [WARNING] all.css not created
   [INFO] generate aggregation :
   
   
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application\all.css
   [WARNING] all.css not created
   
Here is the pom.xml part where I am specifying the aggregations. Why
 on
earth is this not working?
   
   aggregation
   removeIncludedfalse/removeIncluded
   insertNewLinetrue/insertNewLine
   
   
   
  
 
 output${project.build.directory}/${project.build.finalName}/css/public/all.css/output
   includes
   include**/public/base.css/include
   include**/public/jquery.fancybox-1.3.4.css/include
   /includes
   /aggregation
   aggregation
   removeIncludedfalse/removeIncluded
   insertNewLinetrue/insertNewLine
   
   
   
  
 
 output${project.build.directory}/${project.build.finalName}/css/application/all.css/output
   includes
   include**/application/reset.css/include
   include**/application/text.css/include
   include**/application/960.css/include
   
   include**/application/jquery-ui-1.8.11.custom.css/include
   include**/application/base.css/include
   include**/application/jquery.jcrop.css/include
   include**/application/farbtastic.css/include
   /includes
   /aggregation
   
I checked and these directories exist too. If I try and point to a
directory that doesn't exist, the yuicompressor:compress goal will
  fail.
   I
just don't understand why the build process actually succeeds given
  valid
directories, but it doesn't create the files in those directories. It
   makes
no sense :(
   
I thought that maybe it was a filesystem security problem, but that
  isn't
it either.
   
I am genuinely baffled as to why this doesn't work. I would
 appreciate
   any
assistance on this little problem too. After this, I'm good to go ;)
   
Ken
   
   
On Mon, Dec 5, 2011 at 4:39 AM, Stephen Connolly 
stephen.alan.conno...@gmail.com wrote:
   
 project 

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-06 Thread Stephen Connolly
Well it's more this kind of thing:
http://stackoverflow.com/questions/2620961/maven-plugin-for-generating-iso-file

[Bart if you are actually subscribed to users@m.a.o shame on you for not
asking here]

If you want to know the true level of insanity w.r.t. that question...

Bart, at the time he asked that question, was sitting about 5 desks away
from me... BTW, that's my maven plugin too...

-Stephen

On 6 December 2011 10:17, Ken Egervari ken.egerv...@gmail.com wrote:

 Well, I apologize for not putting this new question here first. I didn't
 want to have two concurrent questions going on at the same time here, and I
 was thinking that perhaps I would figure this css problem before then.

 Ken


 On Tue, Dec 6, 2011 at 5:08 AM, Stephen Connolly 
 stephen.alan.conno...@gmail.com wrote:

  I personally despise this habit people have of posting on stackoverflow
  rather than emailing users@maven.a.o first...
 
  Seriously, forget karma on stackoverflow, if the answer is important to
  you, ask on users@maven.a.o first
 
  -Stephen
 
  On 6 December 2011 09:40, Ken Egervari ken.egerv...@gmail.com wrote:
 
   I hope someone can help too. This one has me stuck.
  
   I put a post up on stackoverflow.com if anyone wants to answer it
 there
   for
   credit:
  
  
  
 
 http://stackoverflow.com/questions/8373941/maven-yui-compressor-plugin-cannot-create-aggregation-given-a-longer-path
  
   Ken
  
  
   On Mon, Dec 5, 2011 at 8:07 AM, Stephen Connolly 
   stephen.alan.conno...@gmail.com wrote:
  
I know nothing about yuicompressor or it's maven plugin
   
Hopefully somebody else can help you make some progress there, glad
 you
have made progresss from where you were!
   
-S
   
On 5 December 2011 12:54, Ken Egervari ken.egerv...@gmail.com
 wrote:
   
 Thanks for the response Stephen!

 I didn't think we could exclude the copying of the actual sources
 themselves. That makes good sense! I changed it to
 `scripts/**/*.js,css/**/*.css` instead of what you had, and this
   finally
 seems to get the behaviour I want ;) I really had no idea this
   existed. I
 was looking at the regular excludes tags. Those didn't seem to
  solve
the
 problem for me.

 I have one last problem that maybe you can help solve too? It
  concerns
the
 yuicompressor:compress goal again, but this time it's about css.

 I'm trying to create two css aggregations - one for the public site
  and
one
 for the application part of the site.

 If I make the output file

  
 ${project.build.directory}/${project.build.finalName}/css/public-all.css,
 everything works.

[INFO] generate aggregation :


   
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public-all.css
[INFO] public-all.css (32029b)
[INFO] generate aggregation :


   
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application-all.css
[INFO] application-all.css (50446b)

 But if I try and output the aggregated file to another
 subdirectory,
   such
 as

  
 ${project.build.directory}/${project.build.finalName}/css/public/all.css,
 it gives the following warning (which should honestly be an
  error...):

[INFO] generate aggregation :


   
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public\all.css
[WARNING] all.css not created
[INFO] generate aggregation :


   
  
 
 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application\all.css
[WARNING] all.css not created

 Here is the pom.xml part where I am specifying the aggregations.
 Why
  on
 earth is this not working?

aggregation
removeIncludedfalse/removeIncluded
insertNewLinetrue/insertNewLine



   
  
 
 output${project.build.directory}/${project.build.finalName}/css/public/all.css/output
includes
include**/public/base.css/include
include**/public/jquery.fancybox-1.3.4.css/include
/includes
/aggregation
aggregation
removeIncludedfalse/removeIncluded
insertNewLinetrue/insertNewLine



   
  
 
 output${project.build.directory}/${project.build.finalName}/css/application/all.css/output
includes
include**/application/reset.css/include
include**/application/text.css/include
include**/application/960.css/include

include**/application/jquery-ui-1.8.11.custom.css/include
include**/application/base.css/include
include**/application/jquery.jcrop.css/include
include**/application/farbtastic.css/include
/includes
/aggregation

 I checked and these directories exist too. If I try and point to a
 directory that doesn't exist, the 

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-05 Thread Stephen Connolly
project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdlocaldomain.localhost/groupId
  artifactIdexample/artifactId
  packagingwar/packaging
  version1.0-SNAPSHOT/version
  build
finalNameexample/finalName
pluginManagement
  plugins
plugin
  artifactIdmaven-release-plugin/artifactId
  version2.2.1/version
  configuration
releaseProfilesrelease/releaseProfiles
  /configuration
/plugin
plugin
  artifactIdmaven-war-plugin/artifactId
  version2.1.1/version
/plugin
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdtomcat-maven-plugin/artifactId
  version1.1/version
  configuration
path//path
  /configuration
/plugin
plugin
  groupIdorg.mortbay.jetty/groupId
  artifactIdjetty-maven-plugin/artifactId
  version8.0.1.v20110908/version
/plugin
  /plugins
/pluginManagement
  /build
  profiles
profile
  idrelease/id
  activation
property
  nameyui.compress/name
/property
  /activation
  build
plugins
  plugin
artifactIdmaven-war-plugin/artifactId
version2.1.1/version
configuration
  warSourceExcludesscripts/*.js/warSourceExcludes
/configuration
  /plugin
  plugin
groupIdnet.alchim31.maven/groupId
artifactIdyuicompressor-maven-plugin/artifactId
version1.1/version
executions
  execution
phaseprepare-package/phase
goals
  goalcompress/goal
/goals
  /execution
/executions
configuration
  nosuffixtrue/nosuffix
/configuration
  /plugin
/plugins
  /build
/profile
  /profiles
/project

should do what you want... you get live in place development of the
uncompressed scripts with tomcat:run or jetty:run... when you want to try
the compressed scripts

mvn -Prelease tomcat:run-war
or
mvn -Prelease jetty:run-war

and when you make an actual release with the release plugin, it will be the
compressed scripts that are bundled.

Note: for the compressed scripts you need to use run-war not run as due to
how the servlet containers work, there are limitations to what the servlet
container plugins can do, and therefore the only way to get a true
reflection of the final artifact (ie. the war file) is to run the war file
and not in-place.

HTH

-Stephen

On 5 December 2011 05:18, Ken Egervari ken.egerv...@gmail.com wrote:

 Hi guys,

 I finally got one comment from someone that looks promising, but I'm not
 how to do what he's suggesting since he didn't give an example:

 The reason you're having problems is because the copying of webapp
 resources is done by the war
 pluginhttp://maven.apache.org/plugins/maven-war-plugin/in the same
 breath that it builds the war. It's not a different lifecycle
 phase or even two different actions in the same phase. It's all part
 of the war:war
 goal http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html.

 There's a workaround, though. If you bind
 war:exploded
 http://maven.apache.org/plugins/maven-war-plugin/exploded-mojo.htmlto
 an earlier phase, like
 prepare-package, then it will build your exploded webapp, and then you can
 put something after that to modify the files that were built to the
 exploded directory. Then war:war will package up the modified exploded
 directory. (With newer versions of the war plugin, I believe you'll need to
 set the useCache
 http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#useCache
 property
 to get the desired behavior, though that doesn't seem to really be
 what it's for, be wary.)
 I know how to bind the `maven-war-plugin` to an earlier phase, but how to
 bind just the war:exploded to an earlier phase as he suggests?

 Ken


 On Sun, Dec 4, 2011 at 9:49 AM, Ken Egervari ken.egerv...@gmail.com
 wrote:

  I think there has to be a better way than using the excludes. I really
  don't want to be maintaining so many lists of javascript files... it'll
 be
  way too much of a maintenance problem. I just want this to work. My
  project is massive. There is at least 150 javascript files as it is, and
  probably another 100-150 to be created. I just can't do the maintenance
  work. I am doing this whole project just by myself, and it's massive.
 
  Ken
 
 
 
  On Sun, Dec 4, 2011 at 8:54 AM, Robert Scholte rfscho...@codehaus.org
 wrote:
 
 
  What about warSourceExcludes[1]?
 
  Don't make the m-war-plugin responsible for copying these files but the
  yuicompressor.
 
 
 
 
 
  -Robert
 
 
 
  [1]
 
 

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-05 Thread Ken Egervari
Thanks for the response Stephen!

I didn't think we could exclude the copying of the actual sources
themselves. That makes good sense! I changed it to
`scripts/**/*.js,css/**/*.css` instead of what you had, and this finally
seems to get the behaviour I want ;) I really had no idea this existed. I
was looking at the regular excludes tags. Those didn't seem to solve the
problem for me.

I have one last problem that maybe you can help solve too? It concerns the
yuicompressor:compress goal again, but this time it's about css.

I'm trying to create two css aggregations - one for the public site and one
for the application part of the site.

If I make the output file
${project.build.directory}/${project.build.finalName}/css/public-all.css,
everything works.

[INFO] generate aggregation :
C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public-all.css
[INFO] public-all.css (32029b)
[INFO] generate aggregation :
C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application-all.css
[INFO] application-all.css (50446b)

But if I try and output the aggregated file to another subdirectory, such
as ${project.build.directory}/${project.build.finalName}/css/public/all.css,
it gives the following warning (which should honestly be an error...):

[INFO] generate aggregation :
C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public\all.css
[WARNING] all.css not created
[INFO] generate aggregation :
C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application\all.css
[WARNING] all.css not created

Here is the pom.xml part where I am specifying the aggregations. Why on
earth is this not working?

aggregation
removeIncludedfalse/removeIncluded
insertNewLinetrue/insertNewLine

output${project.build.directory}/${project.build.finalName}/css/public/all.css/output
includes
include**/public/base.css/include
include**/public/jquery.fancybox-1.3.4.css/include
/includes
/aggregation
aggregation
removeIncludedfalse/removeIncluded
insertNewLinetrue/insertNewLine

output${project.build.directory}/${project.build.finalName}/css/application/all.css/output
includes
include**/application/reset.css/include
include**/application/text.css/include
include**/application/960.css/include
include**/application/jquery-ui-1.8.11.custom.css/include
include**/application/base.css/include
include**/application/jquery.jcrop.css/include
include**/application/farbtastic.css/include
/includes
/aggregation

I checked and these directories exist too. If I try and point to a
directory that doesn't exist, the yuicompressor:compress goal will fail. I
just don't understand why the build process actually succeeds given valid
directories, but it doesn't create the files in those directories. It makes
no sense :(

I thought that maybe it was a filesystem security problem, but that isn't
it either.

I am genuinely baffled as to why this doesn't work. I would appreciate any
assistance on this little problem too. After this, I'm good to go ;)

Ken


On Mon, Dec 5, 2011 at 4:39 AM, Stephen Connolly 
stephen.alan.conno...@gmail.com wrote:

 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdlocaldomain.localhost/groupId
  artifactIdexample/artifactId
  packagingwar/packaging
  version1.0-SNAPSHOT/version
  build
finalNameexample/finalName
pluginManagement
  plugins
plugin
  artifactIdmaven-release-plugin/artifactId
  version2.2.1/version
  configuration
releaseProfilesrelease/releaseProfiles
  /configuration
/plugin
plugin
  artifactIdmaven-war-plugin/artifactId
  version2.1.1/version
/plugin
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdtomcat-maven-plugin/artifactId
  version1.1/version
  configuration
path//path
  /configuration
/plugin
plugin
  groupIdorg.mortbay.jetty/groupId
  artifactIdjetty-maven-plugin/artifactId
  version8.0.1.v20110908/version
/plugin
  /plugins
/pluginManagement
  /build
  profiles
profile
  idrelease/id
  activation
property
  nameyui.compress/name
/property
  /activation
  build
plugins
  plugin
artifactIdmaven-war-plugin/artifactId
version2.1.1/version
configuration
  warSourceExcludesscripts/*.js/warSourceExcludes
/configuration
  /plugin
  plugin
groupIdnet.alchim31.maven/groupId

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-05 Thread Stephen Connolly
I know nothing about yuicompressor or it's maven plugin

Hopefully somebody else can help you make some progress there, glad you
have made progresss from where you were!

-S

On 5 December 2011 12:54, Ken Egervari ken.egerv...@gmail.com wrote:

 Thanks for the response Stephen!

 I didn't think we could exclude the copying of the actual sources
 themselves. That makes good sense! I changed it to
 `scripts/**/*.js,css/**/*.css` instead of what you had, and this finally
 seems to get the behaviour I want ;) I really had no idea this existed. I
 was looking at the regular excludes tags. Those didn't seem to solve the
 problem for me.

 I have one last problem that maybe you can help solve too? It concerns the
 yuicompressor:compress goal again, but this time it's about css.

 I'm trying to create two css aggregations - one for the public site and one
 for the application part of the site.

 If I make the output file
 ${project.build.directory}/${project.build.finalName}/css/public-all.css,
 everything works.

[INFO] generate aggregation :

 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public-all.css
[INFO] public-all.css (32029b)
[INFO] generate aggregation :

 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application-all.css
[INFO] application-all.css (50446b)

 But if I try and output the aggregated file to another subdirectory, such
 as
 ${project.build.directory}/${project.build.finalName}/css/public/all.css,
 it gives the following warning (which should honestly be an error...):

[INFO] generate aggregation :

 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\public\all.css
[WARNING] all.css not created
[INFO] generate aggregation :

 C:\Users\me\IdeaProjects\myapp-development\target\myapp-1.0\css\application\all.css
[WARNING] all.css not created

 Here is the pom.xml part where I am specifying the aggregations. Why on
 earth is this not working?

aggregation
removeIncludedfalse/removeIncluded
insertNewLinetrue/insertNewLine


 output${project.build.directory}/${project.build.finalName}/css/public/all.css/output
includes
include**/public/base.css/include
include**/public/jquery.fancybox-1.3.4.css/include
/includes
/aggregation
aggregation
removeIncludedfalse/removeIncluded
insertNewLinetrue/insertNewLine


 output${project.build.directory}/${project.build.finalName}/css/application/all.css/output
includes
include**/application/reset.css/include
include**/application/text.css/include
include**/application/960.css/include
include**/application/jquery-ui-1.8.11.custom.css/include
include**/application/base.css/include
include**/application/jquery.jcrop.css/include
include**/application/farbtastic.css/include
/includes
/aggregation

 I checked and these directories exist too. If I try and point to a
 directory that doesn't exist, the yuicompressor:compress goal will fail. I
 just don't understand why the build process actually succeeds given valid
 directories, but it doesn't create the files in those directories. It makes
 no sense :(

 I thought that maybe it was a filesystem security problem, but that isn't
 it either.

 I am genuinely baffled as to why this doesn't work. I would appreciate any
 assistance on this little problem too. After this, I'm good to go ;)

 Ken


 On Mon, Dec 5, 2011 at 4:39 AM, Stephen Connolly 
 stephen.alan.conno...@gmail.com wrote:

  project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdlocaldomain.localhost/groupId
   artifactIdexample/artifactId
   packagingwar/packaging
   version1.0-SNAPSHOT/version
   build
 finalNameexample/finalName
 pluginManagement
   plugins
 plugin
   artifactIdmaven-release-plugin/artifactId
   version2.2.1/version
   configuration
 releaseProfilesrelease/releaseProfiles
   /configuration
 /plugin
 plugin
   artifactIdmaven-war-plugin/artifactId
   version2.1.1/version
 /plugin
 plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdtomcat-maven-plugin/artifactId
   version1.1/version
   configuration
 path//path
   /configuration
 /plugin
 plugin
   groupIdorg.mortbay.jetty/groupId
   artifactIdjetty-maven-plugin/artifactId
   version8.0.1.v20110908/version
 /plugin
   /plugins
 /pluginManagement
   /build
   profiles
 profile
   idrelease/id
   activation
 property
   nameyui.compress/name
 /property
   /activation
   

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-04 Thread Stephen Connolly
this is a perfect use case for profiles.

in the release profile you use yui-compress to copy them into the war

in a development profile you add warResources to construct the war from the
direct sources

that (assuming the tomcat maven plugin is written right... jetty can do
this for sure) will give development with live editing, and just -Prelease
to get the compressed version

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 4 Dec 2011 01:52, Ken Egervari ken.egerv...@gmail.com wrote:

 I think I should just give up on this problem because I don't think Maven
 has the ability to solve it, and if it does, I have no idea where to look
 for a solution and its clear nobody else writing java web applications
 knows how to solve this problem :/

 I guess I am stuck with manually including each main file on each page
 where it is used, or coding everything in an all.js manually :/

 Even if I can get Maven to properly call the YUI:compress goal at the right
 time, I still have maintain two lists of css and javascript files for my
 application - one for the aggregations, and one for my freemarker template
 that switches between using all the individual source files for
 development, or using the all.css/all.js for production.

 I genuinely don't see a nice solution to do what the Rails people have
 conveniently got in place. I am totally flustered that the Maven/Spring
 combo has no good for answer to this problem :(

 Ken


 On Sat, Dec 3, 2011 at 4:19 PM, Ken Egervari ken.egerv...@gmail.com
 wrote:

  I think the problem is that there is no phase I can merge into just after
  it prepares the war directory - at least not from where I can see in the
  life-cycle documentation. What is the phase name? Is it not any of the
  package or pre-package phases - it is still too early or too late.
 
  Ken
 
 
 
  On Fri, Dec 2, 2011 at 5:16 AM, Jeff MAURY jeffma...@jeffmaury.com
 wrote:
 
  By default, the compress goal of the YUI maven plugin is bound to the
  process-resources phase.
  So, you need to bind it to another phase after the war plugin has
 produced
  the war directory structure the Tomcat plugin will use.
  I recommand you also customize the outputDirectory parameter of the YUI
  maven plugin because the default value does not comply with the standard
  Maven War directory layout.
 
  Regards
  Jeff MAURY
 
  -- Forwarded message --
  From: fe.character.guide fe.character.gu...@gmail.com
  Date: Fri, Dec 2, 2011 at 7:17 AM
  Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
  plugin not using yui-compressor output
  To: users@maven.apache.org
 
 
  Hello everyone!
 
  I'm trying to get some basic maven build processes configured correctly
  with my Java project, and beyond Stackoverflow, I'm not sure
  where else to turn.
 
  I'd like to compress all of my javascript files and aggregate them using
  YUICompressor, and I saw that there was a maven plugin to allow me to do
  this. I got it working for the most part.
 
  I am also using the Mojo tomcat plugin as well. When i go to run the
  tomcat:run goal, tomcat does not read from the target's output
  directory (this is where the YUI compressor put my javascript files) -
 but
  rather, it reads from the actual source files in my src/main/
  webapp/scripts directory. Of course, the aggregated javascript file
  (all.js) is not there. This makes sense, but is a big problem for me.
 
  I have a few questions.
 
  1. How can I get the tomcat plugin to read the target's output folder
 that
  the yui compressor plugin created?
 
  2. Do I have to run the yui compressor maven goal every time I want to
  update my javascript files during development while my tomcat instance
 is
  running?
 
  3. How can tell Maven that I want to run the YUI compressor AFTER Maven
  copies over the `src/main/webapp` directory? Currently, Maven runs the
 YUI
  compressor, but then overwrites all of the compressed css and javascript
  files with the original source files, defeating the purposes of
  compressing
  them ;)
 
  4. Is there a better way to achieve my objective rather than using the
 YUI
  compressor? Essentially, my end goal is to be able to develop JavaScript
  code in separate files and test my source files in development mode
  without
  having to aggregate them... but I want to compress and aggregate the
 files
  and use the `all.js` script when the application is running in
 production
  mode.
 
  While the Rails people have certainly figured this out, this seems to
 be a
  non-trivial thing to do with Maven and Spring.
  I would appreciate any and all assistance on how I can get this running
  correctly. Thanks!
 
 
 
  --
  Legacy code often differs from its suggested alternative by actually
  working and scaling.
   - Bjarne Stroustrup
 
  http://www.jeffmaury.com
  http://riadiscuss.jeffmaury.com
  

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-04 Thread Ken Egervari
Yes, I've been playing around with getting the development/production part
working, and I think I've got it.

I am still having problems getting the yuicompressor:compress goal to be
called at the right time. The problem is that the war:war goal has a bunch
of actions backed into it, and I don't know a way to wire into it and call
the yuicompressor:compress goal just after it copies the webResources
directory. If I can solve that, I think I am golden. But I don't know if
that can be done.

Ken


On Sun, Dec 4, 2011 at 4:02 AM, Stephen Connolly 
stephen.alan.conno...@gmail.com wrote:

 this is a perfect use case for profiles.

 in the release profile you use yui-compress to copy them into the war

 in a development profile you add warResources to construct the war from the
 direct sources

 that (assuming the tomcat maven plugin is written right... jetty can do
 this for sure) will give development with live editing, and just -Prelease
 to get the compressed version

 - Stephen

 ---
 Sent from my Android phone, so random spelling mistakes, random nonsense
 words and other nonsense are a direct result of using swype to type on the
 screen
 On 4 Dec 2011 01:52, Ken Egervari ken.egerv...@gmail.com wrote:

  I think I should just give up on this problem because I don't think Maven
  has the ability to solve it, and if it does, I have no idea where to look
  for a solution and its clear nobody else writing java web applications
  knows how to solve this problem :/
 
  I guess I am stuck with manually including each main file on each page
  where it is used, or coding everything in an all.js manually :/
 
  Even if I can get Maven to properly call the YUI:compress goal at the
 right
  time, I still have maintain two lists of css and javascript files for my
  application - one for the aggregations, and one for my freemarker
 template
  that switches between using all the individual source files for
  development, or using the all.css/all.js for production.
 
  I genuinely don't see a nice solution to do what the Rails people have
  conveniently got in place. I am totally flustered that the Maven/Spring
  combo has no good for answer to this problem :(
 
  Ken
 
 
  On Sat, Dec 3, 2011 at 4:19 PM, Ken Egervari ken.egerv...@gmail.com
  wrote:
 
   I think the problem is that there is no phase I can merge into just
 after
   it prepares the war directory - at least not from where I can see in
 the
   life-cycle documentation. What is the phase name? Is it not any of the
   package or pre-package phases - it is still too early or too late.
  
   Ken
  
  
  
   On Fri, Dec 2, 2011 at 5:16 AM, Jeff MAURY jeffma...@jeffmaury.com
  wrote:
  
   By default, the compress goal of the YUI maven plugin is bound to the
   process-resources phase.
   So, you need to bind it to another phase after the war plugin has
  produced
   the war directory structure the Tomcat plugin will use.
   I recommand you also customize the outputDirectory parameter of the
 YUI
   maven plugin because the default value does not comply with the
 standard
   Maven War directory layout.
  
   Regards
   Jeff MAURY
  
   -- Forwarded message --
   From: fe.character.guide fe.character.gu...@gmail.com
   Date: Fri, Dec 2, 2011 at 7:17 AM
   Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
   plugin not using yui-compressor output
   To: users@maven.apache.org
  
  
   Hello everyone!
  
   I'm trying to get some basic maven build processes configured
 correctly
   with my Java project, and beyond Stackoverflow, I'm not sure
   where else to turn.
  
   I'd like to compress all of my javascript files and aggregate them
 using
   YUICompressor, and I saw that there was a maven plugin to allow me to
 do
   this. I got it working for the most part.
  
   I am also using the Mojo tomcat plugin as well. When i go to run the
   tomcat:run goal, tomcat does not read from the target's output
   directory (this is where the YUI compressor put my javascript files) -
  but
   rather, it reads from the actual source files in my src/main/
   webapp/scripts directory. Of course, the aggregated javascript file
   (all.js) is not there. This makes sense, but is a big problem for me.
  
   I have a few questions.
  
   1. How can I get the tomcat plugin to read the target's output folder
  that
   the yui compressor plugin created?
  
   2. Do I have to run the yui compressor maven goal every time I want to
   update my javascript files during development while my tomcat instance
  is
   running?
  
   3. How can tell Maven that I want to run the YUI compressor AFTER
 Maven
   copies over the `src/main/webapp` directory? Currently, Maven runs the
  YUI
   compressor, but then overwrites all of the compressed css and
 javascript
   files with the original source files, defeating the purposes of
   compressing
   them ;)
  
   4. Is there a better way to achieve my objective rather than using the
  YUI
   compressor? 

RE: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-04 Thread Robert Scholte

What about warSourceExcludes[1]?

Don't make the m-war-plugin responsible for copying these files but the 
yuicompressor.

 

 

-Robert

 

[1] 
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#warSourceExcludes
 


 Date: Sun, 4 Dec 2011 08:44:28 -0500
 Subject: Re: YUI Compressor Maven plugin executed at wrong time and tomcat 
 plugin not using yui-compressor output
 From: ken.egerv...@gmail.com
 To: users@maven.apache.org
 
 Yes, I've been playing around with getting the development/production part
 working, and I think I've got it.
 
 I am still having problems getting the yuicompressor:compress goal to be
 called at the right time. The problem is that the war:war goal has a bunch
 of actions backed into it, and I don't know a way to wire into it and call
 the yuicompressor:compress goal just after it copies the webResources
 directory. If I can solve that, I think I am golden. But I don't know if
 that can be done.
 
 Ken
 
 
 On Sun, Dec 4, 2011 at 4:02 AM, Stephen Connolly 
 stephen.alan.conno...@gmail.com wrote:
 
  this is a perfect use case for profiles.
 
  in the release profile you use yui-compress to copy them into the war
 
  in a development profile you add warResources to construct the war from the
  direct sources
 
  that (assuming the tomcat maven plugin is written right... jetty can do
  this for sure) will give development with live editing, and just -Prelease
  to get the compressed version
 
  - Stephen
 
  ---
  Sent from my Android phone, so random spelling mistakes, random nonsense
  words and other nonsense are a direct result of using swype to type on the
  screen
  On 4 Dec 2011 01:52, Ken Egervari ken.egerv...@gmail.com wrote:
 
   I think I should just give up on this problem because I don't think Maven
   has the ability to solve it, and if it does, I have no idea where to look
   for a solution and its clear nobody else writing java web applications
   knows how to solve this problem :/
  
   I guess I am stuck with manually including each main file on each page
   where it is used, or coding everything in an all.js manually :/
  
   Even if I can get Maven to properly call the YUI:compress goal at the
  right
   time, I still have maintain two lists of css and javascript files for my
   application - one for the aggregations, and one for my freemarker
  template
   that switches between using all the individual source files for
   development, or using the all.css/all.js for production.
  
   I genuinely don't see a nice solution to do what the Rails people have
   conveniently got in place. I am totally flustered that the Maven/Spring
   combo has no good for answer to this problem :(
  
   Ken
  
  
   On Sat, Dec 3, 2011 at 4:19 PM, Ken Egervari ken.egerv...@gmail.com
   wrote:
  
I think the problem is that there is no phase I can merge into just
  after
it prepares the war directory - at least not from where I can see in
  the
life-cycle documentation. What is the phase name? Is it not any of the
package or pre-package phases - it is still too early or too late.
   
Ken
   
   
   
On Fri, Dec 2, 2011 at 5:16 AM, Jeff MAURY jeffma...@jeffmaury.com
   wrote:
   
By default, the compress goal of the YUI maven plugin is bound to the
process-resources phase.
So, you need to bind it to another phase after the war plugin has
   produced
the war directory structure the Tomcat plugin will use.
I recommand you also customize the outputDirectory parameter of the
  YUI
maven plugin because the default value does not comply with the
  standard
Maven War directory layout.
   
Regards
Jeff MAURY
   
-- Forwarded message --
From: fe.character.guide fe.character.gu...@gmail.com
Date: Fri, Dec 2, 2011 at 7:17 AM
Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
plugin not using yui-compressor output
To: users@maven.apache.org
   
   
Hello everyone!
   
I'm trying to get some basic maven build processes configured
  correctly
with my Java project, and beyond Stackoverflow, I'm not sure
where else to turn.
   
I'd like to compress all of my javascript files and aggregate them
  using
YUICompressor, and I saw that there was a maven plugin to allow me to
  do
this. I got it working for the most part.
   
I am also using the Mojo tomcat plugin as well. When i go to run the
tomcat:run goal, tomcat does not read from the target's output
directory (this is where the YUI compressor put my javascript files) -
   but
rather, it reads from the actual source files in my src/main/
webapp/scripts directory. Of course, the aggregated javascript file
(all.js) is not there. This makes sense, but is a big problem for me.
   
I have a few questions.
   
1. How can I get the tomcat plugin to read the target's output folder
   that
the yui compressor plugin created?
   
2. Do I have to run the yui 

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-04 Thread Ken Egervari
I think there has to be a better way than using the excludes. I really
don't want to be maintaining so many lists of javascript files... it'll be
way too much of a maintenance problem. I just want this to work. My
project is massive. There is at least 150 javascript files as it is, and
probably another 100-150 to be created. I just can't do the maintenance
work. I am doing this whole project just by myself, and it's massive.

Ken


On Sun, Dec 4, 2011 at 8:54 AM, Robert Scholte rfscho...@codehaus.orgwrote:


 What about warSourceExcludes[1]?

 Don't make the m-war-plugin responsible for copying these files but the
 yuicompressor.





 -Robert



 [1]
 http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#warSourceExcludes


  Date: Sun, 4 Dec 2011 08:44:28 -0500
  Subject: Re: YUI Compressor Maven plugin executed at wrong time and
 tomcat plugin not using yui-compressor output
  From: ken.egerv...@gmail.com
  To: users@maven.apache.org
 
  Yes, I've been playing around with getting the development/production
 part
  working, and I think I've got it.
 
  I am still having problems getting the yuicompressor:compress goal to be
  called at the right time. The problem is that the war:war goal has a
 bunch
  of actions backed into it, and I don't know a way to wire into it and
 call
  the yuicompressor:compress goal just after it copies the webResources
  directory. If I can solve that, I think I am golden. But I don't know if
  that can be done.
 
  Ken
 
 
  On Sun, Dec 4, 2011 at 4:02 AM, Stephen Connolly 
  stephen.alan.conno...@gmail.com wrote:
 
   this is a perfect use case for profiles.
  
   in the release profile you use yui-compress to copy them into the war
  
   in a development profile you add warResources to construct the war
 from the
   direct sources
  
   that (assuming the tomcat maven plugin is written right... jetty can do
   this for sure) will give development with live editing, and just
 -Prelease
   to get the compressed version
  
   - Stephen
  
   ---
   Sent from my Android phone, so random spelling mistakes, random
 nonsense
   words and other nonsense are a direct result of using swype to type on
 the
   screen
   On 4 Dec 2011 01:52, Ken Egervari ken.egerv...@gmail.com wrote:
  
I think I should just give up on this problem because I don't think
 Maven
has the ability to solve it, and if it does, I have no idea where to
 look
for a solution and its clear nobody else writing java web
 applications
knows how to solve this problem :/
   
I guess I am stuck with manually including each main file on each
 page
where it is used, or coding everything in an all.js manually :/
   
Even if I can get Maven to properly call the YUI:compress goal at the
   right
time, I still have maintain two lists of css and javascript files
 for my
application - one for the aggregations, and one for my freemarker
   template
that switches between using all the individual source files for
development, or using the all.css/all.js for production.
   
I genuinely don't see a nice solution to do what the Rails people
 have
conveniently got in place. I am totally flustered that the
 Maven/Spring
combo has no good for answer to this problem :(
   
Ken
   
   
On Sat, Dec 3, 2011 at 4:19 PM, Ken Egervari ken.egerv...@gmail.com
 
wrote:
   
 I think the problem is that there is no phase I can merge into just
   after
 it prepares the war directory - at least not from where I can see
 in
   the
 life-cycle documentation. What is the phase name? Is it not any of
 the
 package or pre-package phases - it is still too early or too late.

 Ken



 On Fri, Dec 2, 2011 at 5:16 AM, Jeff MAURY 
 jeffma...@jeffmaury.com
wrote:

 By default, the compress goal of the YUI maven plugin is bound to
 the
 process-resources phase.
 So, you need to bind it to another phase after the war plugin has
produced
 the war directory structure the Tomcat plugin will use.
 I recommand you also customize the outputDirectory parameter of
 the
   YUI
 maven plugin because the default value does not comply with the
   standard
 Maven War directory layout.

 Regards
 Jeff MAURY

 -- Forwarded message --
 From: fe.character.guide fe.character.gu...@gmail.com
 Date: Fri, Dec 2, 2011 at 7:17 AM
 Subject: YUI Compressor Maven plugin executed at wrong time and
 tomcat
 plugin not using yui-compressor output
 To: users@maven.apache.org


 Hello everyone!

 I'm trying to get some basic maven build processes configured
   correctly
 with my Java project, and beyond Stackoverflow, I'm not sure
 where else to turn.

 I'd like to compress all of my javascript files and aggregate them
   using
 YUICompressor, and I saw that there was a maven plugin to allow
 me to
   do
 this. I got it working for the 

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-04 Thread Ken Egervari
Hi guys,

I finally got one comment from someone that looks promising, but I'm not
how to do what he's suggesting since he didn't give an example:

The reason you're having problems is because the copying of webapp
resources is done by the war
pluginhttp://maven.apache.org/plugins/maven-war-plugin/in the same
breath that it builds the war. It's not a different lifecycle
phase or even two different actions in the same phase. It's all part
of the war:war
goal http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html.

There's a workaround, though. If you bind
war:explodedhttp://maven.apache.org/plugins/maven-war-plugin/exploded-mojo.htmlto
an earlier phase, like
prepare-package, then it will build your exploded webapp, and then you can
put something after that to modify the files that were built to the
exploded directory. Then war:war will package up the modified exploded
directory. (With newer versions of the war plugin, I believe you'll need to
set the 
useCachehttp://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#useCacheproperty
to get the desired behavior, though that doesn't seem to really be
what it's for, be wary.)
I know how to bind the `maven-war-plugin` to an earlier phase, but how to
bind just the war:exploded to an earlier phase as he suggests?

Ken


On Sun, Dec 4, 2011 at 9:49 AM, Ken Egervari ken.egerv...@gmail.com wrote:

 I think there has to be a better way than using the excludes. I really
 don't want to be maintaining so many lists of javascript files... it'll be
 way too much of a maintenance problem. I just want this to work. My
 project is massive. There is at least 150 javascript files as it is, and
 probably another 100-150 to be created. I just can't do the maintenance
 work. I am doing this whole project just by myself, and it's massive.

 Ken



 On Sun, Dec 4, 2011 at 8:54 AM, Robert Scholte rfscho...@codehaus.orgwrote:


 What about warSourceExcludes[1]?

 Don't make the m-war-plugin responsible for copying these files but the
 yuicompressor.





 -Robert



 [1]
 http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#warSourceExcludes


  Date: Sun, 4 Dec 2011 08:44:28 -0500
  Subject: Re: YUI Compressor Maven plugin executed at wrong time and
 tomcat plugin not using yui-compressor output
  From: ken.egerv...@gmail.com
  To: users@maven.apache.org
 
  Yes, I've been playing around with getting the development/production
 part
  working, and I think I've got it.
 
  I am still having problems getting the yuicompressor:compress goal to be
  called at the right time. The problem is that the war:war goal has a
 bunch
  of actions backed into it, and I don't know a way to wire into it and
 call
  the yuicompressor:compress goal just after it copies the webResources
  directory. If I can solve that, I think I am golden. But I don't know if
  that can be done.
 
  Ken
 
 
  On Sun, Dec 4, 2011 at 4:02 AM, Stephen Connolly 
  stephen.alan.conno...@gmail.com wrote:
 
   this is a perfect use case for profiles.
  
   in the release profile you use yui-compress to copy them into the war
  
   in a development profile you add warResources to construct the war
 from the
   direct sources
  
   that (assuming the tomcat maven plugin is written right... jetty can
 do
   this for sure) will give development with live editing, and just
 -Prelease
   to get the compressed version
  
   - Stephen
  
   ---
   Sent from my Android phone, so random spelling mistakes, random
 nonsense
   words and other nonsense are a direct result of using swype to type
 on the
   screen
   On 4 Dec 2011 01:52, Ken Egervari ken.egerv...@gmail.com wrote:
  
I think I should just give up on this problem because I don't think
 Maven
has the ability to solve it, and if it does, I have no idea where
 to look
for a solution and its clear nobody else writing java web
 applications
knows how to solve this problem :/
   
I guess I am stuck with manually including each main file on each
 page
where it is used, or coding everything in an all.js manually :/
   
Even if I can get Maven to properly call the YUI:compress goal at
 the
   right
time, I still have maintain two lists of css and javascript files
 for my
application - one for the aggregations, and one for my freemarker
   template
that switches between using all the individual source files for
development, or using the all.css/all.js for production.
   
I genuinely don't see a nice solution to do what the Rails people
 have
conveniently got in place. I am totally flustered that the
 Maven/Spring
combo has no good for answer to this problem :(
   
Ken
   
   
On Sat, Dec 3, 2011 at 4:19 PM, Ken Egervari 
 ken.egerv...@gmail.com
wrote:
   
 I think the problem is that there is no phase I can merge into
 just
   after
 it prepares the war directory - at least not from where I can see
 in
   the
 life-cycle documentation. What is the phase name? Is it not any
 of 

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-03 Thread Ken Egervari
I think the problem is that there is no phase I can merge into just after
it prepares the war directory - at least not from where I can see in the
life-cycle documentation. What is the phase name? Is it not any of the
package or pre-package phases - it is still too early or too late.

Ken


On Fri, Dec 2, 2011 at 5:16 AM, Jeff MAURY jeffma...@jeffmaury.com wrote:

 By default, the compress goal of the YUI maven plugin is bound to the
 process-resources phase.
 So, you need to bind it to another phase after the war plugin has produced
 the war directory structure the Tomcat plugin will use.
 I recommand you also customize the outputDirectory parameter of the YUI
 maven plugin because the default value does not comply with the standard
 Maven War directory layout.

 Regards
 Jeff MAURY

 -- Forwarded message --
 From: fe.character.guide fe.character.gu...@gmail.com
 Date: Fri, Dec 2, 2011 at 7:17 AM
 Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
 plugin not using yui-compressor output
 To: users@maven.apache.org


 Hello everyone!

 I'm trying to get some basic maven build processes configured correctly
 with my Java project, and beyond Stackoverflow, I'm not sure
 where else to turn.

 I'd like to compress all of my javascript files and aggregate them using
 YUICompressor, and I saw that there was a maven plugin to allow me to do
 this. I got it working for the most part.

 I am also using the Mojo tomcat plugin as well. When i go to run the
 tomcat:run goal, tomcat does not read from the target's output
 directory (this is where the YUI compressor put my javascript files) - but
 rather, it reads from the actual source files in my src/main/
 webapp/scripts directory. Of course, the aggregated javascript file
 (all.js) is not there. This makes sense, but is a big problem for me.

 I have a few questions.

 1. How can I get the tomcat plugin to read the target's output folder that
 the yui compressor plugin created?

 2. Do I have to run the yui compressor maven goal every time I want to
 update my javascript files during development while my tomcat instance is
 running?

 3. How can tell Maven that I want to run the YUI compressor AFTER Maven
 copies over the `src/main/webapp` directory? Currently, Maven runs the YUI
 compressor, but then overwrites all of the compressed css and javascript
 files with the original source files, defeating the purposes of compressing
 them ;)

 4. Is there a better way to achieve my objective rather than using the YUI
 compressor? Essentially, my end goal is to be able to develop JavaScript
 code in separate files and test my source files in development mode without
 having to aggregate them... but I want to compress and aggregate the files
 and use the `all.js` script when the application is running in production
 mode.

 While the Rails people have certainly figured this out, this seems to be a
 non-trivial thing to do with Maven and Spring.
 I would appreciate any and all assistance on how I can get this running
 correctly. Thanks!



 --
 Legacy code often differs from its suggested alternative by actually
 working and scaling.
  - Bjarne Stroustrup

 http://www.jeffmaury.com
 http://riadiscuss.jeffmaury.com
 http://www.twitter.com/jeffmaury



Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-03 Thread Ken Egervari
I think I should just give up on this problem because I don't think Maven
has the ability to solve it, and if it does, I have no idea where to look
for a solution and its clear nobody else writing java web applications
knows how to solve this problem :/

I guess I am stuck with manually including each main file on each page
where it is used, or coding everything in an all.js manually :/

Even if I can get Maven to properly call the YUI:compress goal at the right
time, I still have maintain two lists of css and javascript files for my
application - one for the aggregations, and one for my freemarker template
that switches between using all the individual source files for
development, or using the all.css/all.js for production.

I genuinely don't see a nice solution to do what the Rails people have
conveniently got in place. I am totally flustered that the Maven/Spring
combo has no good for answer to this problem :(

Ken


On Sat, Dec 3, 2011 at 4:19 PM, Ken Egervari ken.egerv...@gmail.com wrote:

 I think the problem is that there is no phase I can merge into just after
 it prepares the war directory - at least not from where I can see in the
 life-cycle documentation. What is the phase name? Is it not any of the
 package or pre-package phases - it is still too early or too late.

 Ken



 On Fri, Dec 2, 2011 at 5:16 AM, Jeff MAURY jeffma...@jeffmaury.comwrote:

 By default, the compress goal of the YUI maven plugin is bound to the
 process-resources phase.
 So, you need to bind it to another phase after the war plugin has produced
 the war directory structure the Tomcat plugin will use.
 I recommand you also customize the outputDirectory parameter of the YUI
 maven plugin because the default value does not comply with the standard
 Maven War directory layout.

 Regards
 Jeff MAURY

 -- Forwarded message --
 From: fe.character.guide fe.character.gu...@gmail.com
 Date: Fri, Dec 2, 2011 at 7:17 AM
 Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
 plugin not using yui-compressor output
 To: users@maven.apache.org


 Hello everyone!

 I'm trying to get some basic maven build processes configured correctly
 with my Java project, and beyond Stackoverflow, I'm not sure
 where else to turn.

 I'd like to compress all of my javascript files and aggregate them using
 YUICompressor, and I saw that there was a maven plugin to allow me to do
 this. I got it working for the most part.

 I am also using the Mojo tomcat plugin as well. When i go to run the
 tomcat:run goal, tomcat does not read from the target's output
 directory (this is where the YUI compressor put my javascript files) - but
 rather, it reads from the actual source files in my src/main/
 webapp/scripts directory. Of course, the aggregated javascript file
 (all.js) is not there. This makes sense, but is a big problem for me.

 I have a few questions.

 1. How can I get the tomcat plugin to read the target's output folder that
 the yui compressor plugin created?

 2. Do I have to run the yui compressor maven goal every time I want to
 update my javascript files during development while my tomcat instance is
 running?

 3. How can tell Maven that I want to run the YUI compressor AFTER Maven
 copies over the `src/main/webapp` directory? Currently, Maven runs the YUI
 compressor, but then overwrites all of the compressed css and javascript
 files with the original source files, defeating the purposes of
 compressing
 them ;)

 4. Is there a better way to achieve my objective rather than using the YUI
 compressor? Essentially, my end goal is to be able to develop JavaScript
 code in separate files and test my source files in development mode
 without
 having to aggregate them... but I want to compress and aggregate the files
 and use the `all.js` script when the application is running in production
 mode.

 While the Rails people have certainly figured this out, this seems to be a
 non-trivial thing to do with Maven and Spring.
 I would appreciate any and all assistance on how I can get this running
 correctly. Thanks!



 --
 Legacy code often differs from its suggested alternative by actually
 working and scaling.
  - Bjarne Stroustrup

 http://www.jeffmaury.com
 http://riadiscuss.jeffmaury.com
 http://www.twitter.com/jeffmaury





RE: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-02 Thread Robert Scholte

You could keep the names of the files the same (so without the -min postfix), 
so modifications are picked up immediately.

 

-Robert 


 From: jeffma...@jeffmaury.com
 Date: Fri, 2 Dec 2011 11:16:01 +0100
 Subject: Fwd: YUI Compressor Maven plugin executed at wrong time and tomcat 
 plugin not using yui-compressor output
 To: users@maven.apache.org
 
 By default, the compress goal of the YUI maven plugin is bound to the
 process-resources phase.
 So, you need to bind it to another phase after the war plugin has produced
 the war directory structure the Tomcat plugin will use.
 I recommand you also customize the outputDirectory parameter of the YUI
 maven plugin because the default value does not comply with the standard
 Maven War directory layout.
 
 Regards
 Jeff MAURY
 
 -- Forwarded message --
 From: fe.character.guide fe.character.gu...@gmail.com
 Date: Fri, Dec 2, 2011 at 7:17 AM
 Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
 plugin not using yui-compressor output
 To: users@maven.apache.org
 
 
 Hello everyone!
 
 I'm trying to get some basic maven build processes configured correctly
 with my Java project, and beyond Stackoverflow, I'm not sure
 where else to turn.
 
 I'd like to compress all of my javascript files and aggregate them using
 YUICompressor, and I saw that there was a maven plugin to allow me to do
 this. I got it working for the most part.
 
 I am also using the Mojo tomcat plugin as well. When i go to run the
 tomcat:run goal, tomcat does not read from the target's output
 directory (this is where the YUI compressor put my javascript files) - but
 rather, it reads from the actual source files in my src/main/
 webapp/scripts directory. Of course, the aggregated javascript file
 (all.js) is not there. This makes sense, but is a big problem for me.
 
 I have a few questions.
 
 1. How can I get the tomcat plugin to read the target's output folder that
 the yui compressor plugin created?
 
 2. Do I have to run the yui compressor maven goal every time I want to
 update my javascript files during development while my tomcat instance is
 running?
 
 3. How can tell Maven that I want to run the YUI compressor AFTER Maven
 copies over the `src/main/webapp` directory? Currently, Maven runs the YUI
 compressor, but then overwrites all of the compressed css and javascript
 files with the original source files, defeating the purposes of compressing
 them ;)
 
 4. Is there a better way to achieve my objective rather than using the YUI
 compressor? Essentially, my end goal is to be able to develop JavaScript
 code in separate files and test my source files in development mode without
 having to aggregate them... but I want to compress and aggregate the files
 and use the `all.js` script when the application is running in production
 mode.
 
 While the Rails people have certainly figured this out, this seems to be a
 non-trivial thing to do with Maven and Spring.
 I would appreciate any and all assistance on how I can get this running
 correctly. Thanks!
 
 
 
 -- 
 Legacy code often differs from its suggested alternative by actually
 working and scaling.
 - Bjarne Stroustrup
 
 http://www.jeffmaury.com
 http://riadiscuss.jeffmaury.com
 http://www.twitter.com/jeffmaury
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-02 Thread Olivier Lamy
and bind the yui compressor to prepare-package phase.
As it js files will be compressed only when you will package your war
for deployment on target servlet container.
So js files won't be change using tomcat:run (IMHO better to have real
js files for debugging purpose).

2011/12/2 Robert Scholte rfscho...@codehaus.org:

 You could keep the names of the files the same (so without the -min postfix), 
 so modifications are picked up immediately.



 -Robert


 From: jeffma...@jeffmaury.com
 Date: Fri, 2 Dec 2011 11:16:01 +0100
 Subject: Fwd: YUI Compressor Maven plugin executed at wrong time and tomcat 
 plugin not using yui-compressor output
 To: users@maven.apache.org

 By default, the compress goal of the YUI maven plugin is bound to the
 process-resources phase.
 So, you need to bind it to another phase after the war plugin has produced
 the war directory structure the Tomcat plugin will use.
 I recommand you also customize the outputDirectory parameter of the YUI
 maven plugin because the default value does not comply with the standard
 Maven War directory layout.

 Regards
 Jeff MAURY

 -- Forwarded message --
 From: fe.character.guide fe.character.gu...@gmail.com
 Date: Fri, Dec 2, 2011 at 7:17 AM
 Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
 plugin not using yui-compressor output
 To: users@maven.apache.org


 Hello everyone!

 I'm trying to get some basic maven build processes configured correctly
 with my Java project, and beyond Stackoverflow, I'm not sure
 where else to turn.

 I'd like to compress all of my javascript files and aggregate them using
 YUICompressor, and I saw that there was a maven plugin to allow me to do
 this. I got it working for the most part.

 I am also using the Mojo tomcat plugin as well. When i go to run the
 tomcat:run goal, tomcat does not read from the target's output
 directory (this is where the YUI compressor put my javascript files) - but
 rather, it reads from the actual source files in my src/main/
 webapp/scripts directory. Of course, the aggregated javascript file
 (all.js) is not there. This makes sense, but is a big problem for me.

 I have a few questions.

 1. How can I get the tomcat plugin to read the target's output folder that
 the yui compressor plugin created?

 2. Do I have to run the yui compressor maven goal every time I want to
 update my javascript files during development while my tomcat instance is
 running?

 3. How can tell Maven that I want to run the YUI compressor AFTER Maven
 copies over the `src/main/webapp` directory? Currently, Maven runs the YUI
 compressor, but then overwrites all of the compressed css and javascript
 files with the original source files, defeating the purposes of compressing
 them ;)

 4. Is there a better way to achieve my objective rather than using the YUI
 compressor? Essentially, my end goal is to be able to develop JavaScript
 code in separate files and test my source files in development mode without
 having to aggregate them... but I want to compress and aggregate the files
 and use the `all.js` script when the application is running in production
 mode.

 While the Rails people have certainly figured this out, this seems to be a
 non-trivial thing to do with Maven and Spring.
 I would appreciate any and all assistance on how I can get this running
 correctly. Thanks!



 --
 Legacy code often differs from its suggested alternative by actually
 working and scaling.
 - Bjarne Stroustrup

 http://www.jeffmaury.com
 http://riadiscuss.jeffmaury.com
 http://www.twitter.com/jeffmaury
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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



Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-02 Thread Ken Egervari
I tried to bind this to the prepare-package phase actually, but the copying
of the webapp resources directory to the target directory still occurs
after the yui:compress goal. Am I missing something? Setting the phase to
process-resources actually runs the yui:compress goal before the
compilation step.

One idea I have to fix this is maybe put the javascript in
src/main/scriptsand then compress everything to
src/main/webapp/scripts... that way the package goal treats the regular
source path as the final product. The real drawback to this though is that
I won't be able to test my development javascript code anymore - I'd have
to run the yui:compress goal EVERY time I make a change to the css and
javascript - that's just too much of hassle for me.

I'd also like to get functionality to work with the tomcat:run goal as
well. Am I trying to get this to work with too much?

Thanks for the assistance!

On Fri, Dec 2, 2011 at 12:22 PM, Olivier Lamy ol...@apache.org wrote:

 and bind the yui compressor to prepare-package phase.
 As it js files will be compressed only when you will package your war
 for deployment on target servlet container.
 So js files won't be change using tomcat:run (IMHO better to have real
 js files for debugging purpose).

 2011/12/2 Robert Scholte rfscho...@codehaus.org:
 
  You could keep the names of the files the same (so without the -min
 postfix), so modifications are picked up immediately.
 
 
 
  -Robert
 
 
  From: jeffma...@jeffmaury.com
  Date: Fri, 2 Dec 2011 11:16:01 +0100
  Subject: Fwd: YUI Compressor Maven plugin executed at wrong time and
 tomcat plugin not using yui-compressor output
  To: users@maven.apache.org
 
  By default, the compress goal of the YUI maven plugin is bound to the
  process-resources phase.
  So, you need to bind it to another phase after the war plugin has
 produced
  the war directory structure the Tomcat plugin will use.
  I recommand you also customize the outputDirectory parameter of the YUI
  maven plugin because the default value does not comply with the standard
  Maven War directory layout.
 
  Regards
  Jeff MAURY
 
  -- Forwarded message --
  From: fe.character.guide fe.character.gu...@gmail.com
  Date: Fri, Dec 2, 2011 at 7:17 AM
  Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
  plugin not using yui-compressor output
  To: users@maven.apache.org
 
 
  Hello everyone!
 
  I'm trying to get some basic maven build processes configured correctly
  with my Java project, and beyond Stackoverflow, I'm not sure
  where else to turn.
 
  I'd like to compress all of my javascript files and aggregate them using
  YUICompressor, and I saw that there was a maven plugin to allow me to do
  this. I got it working for the most part.
 
  I am also using the Mojo tomcat plugin as well. When i go to run the
  tomcat:run goal, tomcat does not read from the target's output
  directory (this is where the YUI compressor put my javascript files) -
 but
  rather, it reads from the actual source files in my src/main/
  webapp/scripts directory. Of course, the aggregated javascript file
  (all.js) is not there. This makes sense, but is a big problem for me.
 
  I have a few questions.
 
  1. How can I get the tomcat plugin to read the target's output folder
 that
  the yui compressor plugin created?
 
  2. Do I have to run the yui compressor maven goal every time I want to
  update my javascript files during development while my tomcat instance
 is
  running?
 
  3. How can tell Maven that I want to run the YUI compressor AFTER Maven
  copies over the `src/main/webapp` directory? Currently, Maven runs the
 YUI
  compressor, but then overwrites all of the compressed css and javascript
  files with the original source files, defeating the purposes of
 compressing
  them ;)
 
  4. Is there a better way to achieve my objective rather than using the
 YUI
  compressor? Essentially, my end goal is to be able to develop JavaScript
  code in separate files and test my source files in development mode
 without
  having to aggregate them... but I want to compress and aggregate the
 files
  and use the `all.js` script when the application is running in
 production
  mode.
 
  While the Rails people have certainly figured this out, this seems to
 be a
  non-trivial thing to do with Maven and Spring.
  I would appreciate any and all assistance on how I can get this running
  correctly. Thanks!
 
 
 
  --
  Legacy code often differs from its suggested alternative by actually
  working and scaling.
  - Bjarne Stroustrup
 
  http://www.jeffmaury.com
  http://riadiscuss.jeffmaury.com
  http://www.twitter.com/jeffmaury
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 



 --
 Olivier Lamy
 Talend: http://coders.talend.com
 http://twitter.com/olamy | http://linkedin.com/in/olamy

 

Re: YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

2011-12-02 Thread Ken Egervari
There's a lot that confuses me too about how to get this to work with
tomcat:run. For example, if I am in development mode, I actually want to
use the uncompressed javascript files for the same reason you said - it'll
be better to debug and reason about the code. But I'd also like to test the
production profile I made just to make sure everything continues to work
after the files are compressed. I don't want to just trust it ;) At least
not until I feel really comfortable with everything and I know it all will
just work.

Essentially, my goal is to have an easy programming model where I can
create and edit javascript files and test them when my application is run
via tomcat in development mode, but then I want the application to use the
all.js when the application is running in tomcat in production mode.

Ken


On Fri, Dec 2, 2011 at 11:38 PM, Ken Egervari ken.egerv...@gmail.comwrote:

 I tried to bind this to the prepare-package phase actually, but the
 copying of the webapp resources directory to the target directory still
 occurs after the yui:compress goal. Am I missing something? Setting the
 phase to process-resources actually runs the yui:compress goal before the
 compilation step.

 One idea I have to fix this is maybe put the javascript in
 src/main/scripts and then compress everything to src/main/webapp/scripts...
 that way the package goal treats the regular source path as the final
 product. The real drawback to this though is that I won't be able to test
 my development javascript code anymore - I'd have to run the yui:compressgoal 
 EVERY time I make a change to the css and javascript - that's just too
 much of hassle for me.

 I'd also like to get functionality to work with the tomcat:run goal as
 well. Am I trying to get this to work with too much?

 Thanks for the assistance!


 On Fri, Dec 2, 2011 at 12:22 PM, Olivier Lamy ol...@apache.org wrote:

 and bind the yui compressor to prepare-package phase.
 As it js files will be compressed only when you will package your war
 for deployment on target servlet container.
 So js files won't be change using tomcat:run (IMHO better to have real
 js files for debugging purpose).

 2011/12/2 Robert Scholte rfscho...@codehaus.org:
 
  You could keep the names of the files the same (so without the -min
 postfix), so modifications are picked up immediately.
 
 
 
  -Robert
 
 
  From: jeffma...@jeffmaury.com
  Date: Fri, 2 Dec 2011 11:16:01 +0100
  Subject: Fwd: YUI Compressor Maven plugin executed at wrong time and
 tomcat plugin not using yui-compressor output
  To: users@maven.apache.org
 
  By default, the compress goal of the YUI maven plugin is bound to the
  process-resources phase.
  So, you need to bind it to another phase after the war plugin has
 produced
  the war directory structure the Tomcat plugin will use.
  I recommand you also customize the outputDirectory parameter of the YUI
  maven plugin because the default value does not comply with the
 standard
  Maven War directory layout.
 
  Regards
  Jeff MAURY
 
  -- Forwarded message --
  From: fe.character.guide fe.character.gu...@gmail.com
  Date: Fri, Dec 2, 2011 at 7:17 AM
  Subject: YUI Compressor Maven plugin executed at wrong time and tomcat
  plugin not using yui-compressor output
  To: users@maven.apache.org
 
 
  Hello everyone!
 
  I'm trying to get some basic maven build processes configured correctly
  with my Java project, and beyond Stackoverflow, I'm not sure
  where else to turn.
 
  I'd like to compress all of my javascript files and aggregate them
 using
  YUICompressor, and I saw that there was a maven plugin to allow me to
 do
  this. I got it working for the most part.
 
  I am also using the Mojo tomcat plugin as well. When i go to run the
  tomcat:run goal, tomcat does not read from the target's output
  directory (this is where the YUI compressor put my javascript files) -
 but
  rather, it reads from the actual source files in my src/main/
  webapp/scripts directory. Of course, the aggregated javascript file
  (all.js) is not there. This makes sense, but is a big problem for me.
 
  I have a few questions.
 
  1. How can I get the tomcat plugin to read the target's output folder
 that
  the yui compressor plugin created?
 
  2. Do I have to run the yui compressor maven goal every time I want to
  update my javascript files during development while my tomcat instance
 is
  running?
 
  3. How can tell Maven that I want to run the YUI compressor AFTER Maven
  copies over the `src/main/webapp` directory? Currently, Maven runs the
 YUI
  compressor, but then overwrites all of the compressed css and
 javascript
  files with the original source files, defeating the purposes of
 compressing
  them ;)
 
  4. Is there a better way to achieve my objective rather than using the
 YUI
  compressor? Essentially, my end goal is to be able to develop
 JavaScript
  code in separate files and test my source files in development mode
 without
  having to aggregate