site generation fails if war plugin is defined with goal 'exploded' (cant override read-only parameter)

2008-05-02 Thread Leonard Gestrin
Hello,
I am running into problems generating site for project that has war
plugin using 'exploded' goal. 

I searched the archives and it looks like other people had issues with
it over the last couple years, but I could not find solution for it.

The error is 

[INFO] Using default encoding to copy filtered resources.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin.
Reason: ERROR: Cannot override
read-only parameter: classesDirectory in goal: war:exploded
[INFO]

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error
configuring: org.apache.maven.plugins:
maven-war-plugin. Reason: ERROR: Cannot override read-only parameter:
classesDirectory in goal: war:
exploded
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor
.java:568)


Perhaps, this can be solved by defining profiles and each profile
defining different configuration for war plugin, but I was thinking
there is a simpler solution for it.

Thanks
Leonard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



war overlay and merging localized resources

2008-03-20 Thread Leonard Gestrin
Hello,
I am very impressed how maven war plugin can overlay multiple war files.
However, I could not find any plugin that can also merge localized
resource files. 

Since it's not possible to define multiple resource bundles in web.xml,
I think there is need to be able to merge localized resource bundles at
the time ov overlaying wars. 

Has any one had that issue  and possible solution?

This is the scenario

CommonWar\WEB-INF\ CommonResources_en.properties
CommonWar\WEB-INF\ CommonResources_ja.properties

AppWar\WEB-INF\AppWarResources_en.properties
AppWar \WEB-INF\AppWarResources_ja.properties


During build time, I am overlaying AppWar with CommonWar. I want 

Target/appwar-1.0-snapshot/WEB-INF/classes AppWarResources_en.properties
to be (AppWar\WEB-INF\AppWarResources_en.properties + CommonWar\WEB-INF\
CommonResources_en.properties)

Target/appwar-1.0-snapshot/WEB-INF/classes AppWarResources_ja.properties
to be (AppWar\WEB-INF\AppWarResources_ja.properties + CommonWar\WEB-INF\
CommonResources_ja.properties)



Thanks
Leonard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: war overlay and merging localized resources

2008-03-20 Thread Leonard Gestrin
Thanks, for reply. 

Maybe I am misreading it, but resource plugin simply copies resources. I
need resource files to be merged to one. 
Same with zip and unpacking. 

I don't have an issue of getting resources in the right place. I am
having issue that's it's impossible to configure multiple resource
bundle for webapplication, thus I need to consolidate multiple resource
bundles into one resource bundle. If commonwebapp has
CommonResources_en.properties and I am merging it with testapp that has
it's TestResources_en.properties, I get both files in WEB-INF/classes.
But I can not configure both of them in web.xml - thus, I am looking for
the way of creating MergedResources_en.properties that contains contents
of both files.



-Original Message-
From: Brian E. Fox [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 6:48 PM
To: Maven Users List
Subject: RE: war overlay and merging localized resources

You could try out the remote-resources plugin, or simply make a zip with
assembly:single (in a pom project) and then use dependency:unpack to
extract the resources where you want them in the war.

-Original Message-
From: Leonard Gestrin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 8:05 PM
To: Maven Users List
Subject: war overlay and merging localized resources

Hello,
I am very impressed how maven war plugin can overlay multiple war files.
However, I could not find any plugin that can also merge localized
resource files. 

Since it's not possible to define multiple resource bundles in web.xml,
I think there is need to be able to merge localized resource bundles at
the time ov overlaying wars. 

Has any one had that issue  and possible solution?

This is the scenario

CommonWar\WEB-INF\ CommonResources_en.properties
CommonWar\WEB-INF\ CommonResources_ja.properties

AppWar\WEB-INF\AppWarResources_en.properties
AppWar \WEB-INF\AppWarResources_ja.properties


During build time, I am overlaying AppWar with CommonWar. I want 

Target/appwar-1.0-snapshot/WEB-INF/classes AppWarResources_en.properties
to be (AppWar\WEB-INF\AppWarResources_en.properties + CommonWar\WEB-INF\
CommonResources_en.properties)

Target/appwar-1.0-snapshot/WEB-INF/classes AppWarResources_ja.properties
to be (AppWar\WEB-INF\AppWarResources_ja.properties + CommonWar\WEB-INF\
CommonResources_ja.properties)



Thanks
Leonard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



selecting active profiles and maven-help-plugin does not work as expected/configuring plugin-repository cauze plugin to be not executed?

2006-11-03 Thread Leonard Gestrin
Hello,

I have the following setup:

1. Defined internal , external profiles  in settings.xml and set
internal as active.  external profile has plugin repository
configuration. (this play important role for some reason) 

2. Defined jsp-comp  profile to activate jsp compilation for the build
in compile goal in parent-pom.xml 

3, webapp pom.xml uses the parent pom.

 

 

$mvn -Pinternal, jsp-compile compile -  I can see that internal and
jsp-compile profiles are being used (jsps are compiled)

 

$mvn -Pexternal, jsp-compile compile -  I can see that external is used
but jsp-compile is ignored!. (jsps are not compiled)

 

Anybody has any clue why this might be the case?  Plugin help does not
seem to be helpful since it appears to simply print out settings.xml (or
it's portions) and can present flat pom.xml but seem to ignore
information in parent's pom.xml with respect to profiles.

 

I also noticed that jsp-compile does work in conjunction with external
profile if I comment out this section in external profile definition.

 

pluginRepositories

pluginRepository

  idibiblio.org/id

  nameMaven Plugin Repository/name

  layoutdefault/layout

  urlhttp://www.ibiblio.org/maven2/url

  snapshots

updatePolicyinterval:60/updatePolicy

enabledfalse/enabled

  /snapshots

  releases

updatePolicynever/updatePolicy

  /releases

  /pluginRepository

 

 

 

Executing commands in webapp dir

 

$mvn help:effective-settingprints internal is active.

 

$mvn -Pexternal help:effective-settingprints internal is active
again. -  is this wrong? The book says that -P option should overwrite
active profile? When I build application I do see that external profile
is being used.

 

Thanks

Leonard

 



RE: selecting active profiles and maven-help-plugin does not work as expected/configuring plugin-repository cauze plugin to be not executed?

2006-11-03 Thread Leonard Gestrin
Thanks, that was a good suggestion.

Apparently, when plugin directory is configured, the latest plugin
version for jspc is 

..
[DEBUG] jspc-maven-plugin: resolved to version 1.4.6 from repository
ibiblio.org
..
If I don't use biblio, mvn uses 1.4.5, and it also prints this line in
debug output

..
[DEBUG] org.codehaus.mojo:jspc-maven-plugin:maven-plugin:1.4.5:runtime
(selected for runtime)
...

I don't get this line for version 1.4.6

Both plugins are installed in my local repository, but for some reason
1.4.6 is not get invoked for compilation.


P.S. am I correct in my observations for help plugin with active
profiles?


-Original Message-
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 03, 2006 2:26 PM
To: Maven Users List
Subject: Re: selecting active profiles and maven-help-plugin does not
work as expected/configuring plugin-repository cauze plugin to be not
executed?

Have you tried mvn -X ... to see additional debugging information? I'd
assume something is just not working right, and the stacktrace might
help you see/find it.

Wayne

On 11/3/06, Leonard Gestrin [EMAIL PROTECTED] wrote:
 Hello,

 I have the following setup:

 1. Defined internal , external profiles  in settings.xml and set
 internal as active.  external profile has plugin repository
 configuration. (this play important role for some reason)

 2. Defined jsp-comp  profile to activate jsp compilation for the
build
 in compile goal in parent-pom.xml

 3, webapp pom.xml uses the parent pom.





 $mvn -Pinternal, jsp-compile compile -  I can see that internal and
 jsp-compile profiles are being used (jsps are compiled)



 $mvn -Pexternal, jsp-compile compile -  I can see that external is
used
 but jsp-compile is ignored!. (jsps are not compiled)



 Anybody has any clue why this might be the case?  Plugin help does
not
 seem to be helpful since it appears to simply print out settings.xml
(or
 it's portions) and can present flat pom.xml but seem to ignore
 information in parent's pom.xml with respect to profiles.



 I also noticed that jsp-compile does work in conjunction with
external
 profile if I comment out this section in external profile
definition.



 pluginRepositories

 pluginRepository

   idibiblio.org/id

   nameMaven Plugin Repository/name

   layoutdefault/layout

   urlhttp://www.ibiblio.org/maven2/url

   snapshots

 updatePolicyinterval:60/updatePolicy

 enabledfalse/enabled

   /snapshots

   releases

 updatePolicynever/updatePolicy

   /releases

   /pluginRepository







 Executing commands in webapp dir



 $mvn help:effective-settingprints internal is active.



 $mvn -Pexternal help:effective-settingprints internal is active
 again. -  is this wrong? The book says that -P option should
overwrite
 active profile? When I build application I do see that external
profile
 is being used.



 Thanks

 Leonard






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



partial answer to first part: RE: selecting active profiles and maven-help-plugin does not work as expected/configuring plugin-repository cauze plugin to be not executed?

2006-11-03 Thread Leonard Gestrin
Apparently, 1.4.6 version of jspc-maven-plugin is invoked for goals that
after compile (like install)
And 1.4.5 version of jspc-maven-plugin is invoked for compile also.

It's defined like this in pom.xml


plugin
groupIdorg.codehaus.mojo/groupId
artifactIdjspc-maven-plugin/artifactId
   !--version1.4.5/version--
executions
  execution
idjspc/id
goals
  goalcompile/goal
/goals
  /execution
/executions
!--
configuration

warSourceDirectory${basedir}/target/webapp-panel/warSourceDirectory
/configuration
--
  /plugin



-Original Message-
From: Leonard Gestrin [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 03, 2006 3:32 PM
To: Maven Users List
Subject: RE: selecting active profiles and maven-help-plugin does not
work as expected/configuring plugin-repository cauze plugin to be not
executed?

Thanks, that was a good suggestion.

Apparently, when plugin directory is configured, the latest plugin
version for jspc is 

..
[DEBUG] jspc-maven-plugin: resolved to version 1.4.6 from repository
ibiblio.org
..
If I don't use biblio, mvn uses 1.4.5, and it also prints this line in
debug output

..
[DEBUG] org.codehaus.mojo:jspc-maven-plugin:maven-plugin:1.4.5:runtime
(selected for runtime)
...

I don't get this line for version 1.4.6

Both plugins are installed in my local repository, but for some reason
1.4.6 is not get invoked for compilation.


P.S. am I correct in my observations for help plugin with active
profiles?


-Original Message-
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 03, 2006 2:26 PM
To: Maven Users List
Subject: Re: selecting active profiles and maven-help-plugin does not
work as expected/configuring plugin-repository cauze plugin to be not
executed?

Have you tried mvn -X ... to see additional debugging information? I'd
assume something is just not working right, and the stacktrace might
help you see/find it.

Wayne

On 11/3/06, Leonard Gestrin [EMAIL PROTECTED] wrote:
 Hello,

 I have the following setup:

 1. Defined internal , external profiles  in settings.xml and set
 internal as active.  external profile has plugin repository
 configuration. (this play important role for some reason)

 2. Defined jsp-comp  profile to activate jsp compilation for the
build
 in compile goal in parent-pom.xml

 3, webapp pom.xml uses the parent pom.





 $mvn -Pinternal, jsp-compile compile -  I can see that internal and
 jsp-compile profiles are being used (jsps are compiled)



 $mvn -Pexternal, jsp-compile compile -  I can see that external is
used
 but jsp-compile is ignored!. (jsps are not compiled)



 Anybody has any clue why this might be the case?  Plugin help does
not
 seem to be helpful since it appears to simply print out settings.xml
(or
 it's portions) and can present flat pom.xml but seem to ignore
 information in parent's pom.xml with respect to profiles.



 I also noticed that jsp-compile does work in conjunction with
external
 profile if I comment out this section in external profile
definition.



 pluginRepositories

 pluginRepository

   idibiblio.org/id

   nameMaven Plugin Repository/name

   layoutdefault/layout

   urlhttp://www.ibiblio.org/maven2/url

   snapshots

 updatePolicyinterval:60/updatePolicy

 enabledfalse/enabled

   /snapshots

   releases

 updatePolicynever/updatePolicy

   /releases

   /pluginRepository







 Executing commands in webapp dir



 $mvn help:effective-settingprints internal is active.



 $mvn -Pexternal help:effective-settingprints internal is active
 again. -  is this wrong? The book says that -P option should
overwrite
 active profile? When I build application I do see that external
profile
 is being used.



 Thanks

 Leonard






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



using shared jsps between applications with jsp compilation enabled

2006-11-02 Thread Leonard Gestrin
Hello,

I am tying to configure mvn2 so that it includes and compiles shared
jsps when they are included with application.

 

Directory structure shared

Web-common\

 Pom.xml (war)

 src\main\webapp\*.jsp

 

Webapp1:

 Pom.xml (war)

 src\main\webapp\*.jsp

Webapp2:

 Pom.xml (war)

 src\main\webapp\*.jsp

 

 

I don't want to pre compile jsp in web-common due to heavy dependency of
these jsps , but I do want to compile them when building war file for
webapps.

Mvn-war-plugin merges already built war files, so I don't think it's the
answer.

 

Maybe, it's possible to specify multiple src for compile/jsp compile?

Thanks

Leonard

 



intelligently building snapshots with continuum

2006-09-20 Thread Leonard Gestrin
Hello,

This is my first post to the list and I am very new to mvn/continuum
world.

We are currently using mvn snapshot features but I think we  are not
using it properly. I want to move building of snapshots to build
integration machine where continuum runs and I have few questions about
how Continuum would go about building snapshots.

 

Lets say, I have 

artifacts: webapp, webutil, util, common. - all these components are in
active development.

webapp depends  on webutil, util, common

webutil depends on util, common

util depends on common.

 

The goal is to make sure that snapshots are updated properly recursively
when change happens to a certain snapshot. And all pieces of the
application are using same versions of snapshots.

 

1.  To make sure every artifact depends on same version of
dependencies, parent  pom.xml will have 

dependencyManagement

dependencies

dependency

!-3rd party -

groupIdcommons-logging/groupId

artifactIdcommons-logging/artifactId

version1.0.4/version

/dependency

!-internal-

groupIdcompany.com/groupId

artifactIdwebutil/artifactId

version1.0.0-SNAPSHOT/version

groupIdcompany.com/groupId

artifactIdutil/artifactId

version1.0.0-SNAPSHOT/version

groupIdcompany.com/groupId

artifactIdcommon/artifactId

version1.0.0-SNAPSHOT/version

/dependencyManagement

 

2.  to make sure that snapshots are build using controlled
environment, lets say continuum is used to build them. So, my questions
are: 

 

Will continuum rebuild ALL snapshots every time it makes a build?
(hourly, per say). 

a) If yes, how does it know the order in which snapshots have to be
generated? (common first, util, webutil, webapp) - the order is very
important since if there is a change in common, util has to be compiled
against latest common classes.

Also, it seems to me that repository will get filled up very quickly
with identical snapshots for same component and each developer's machine
would have to sync new snapshots every time it checks with repository

 

  b)If  continuum is smart enough to create new snapshot only when
there has been code changes in src of particular module, does it know
that snapshots depending on that module have to be regenerated also?

 

3. if continuum does not have the answer for the problem/questions to 2.
can someone recommend the alternative solution/intergration server that
would ensure that snapshots are being incrementally deployed only when
and in the right dependency order? (if change has been done in util
module there is no need to redeploy common snapshot but there is a need
to redeploy webutil once util snapshot is ready)

Thanks

Leonard

 



plugin development - how to find which compoments are dependent on given component?

2006-09-20 Thread Leonard Gestrin
Hello,
I want to write a plugin that creates a list of modules that depend on
given module. The book talks about how to get dependency of given
project - I want to do the reverse, and find all the modules that are
dependent on given module. This functionality can be handy if I want
recursive deployment of snapshots. 
Does such information exist and how to get it in plugin? 
Is it possible to have maven generate it on the command line?
Thanks
Leonard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how to make sure snapshots are rebuilt properly on a need-to-be basis using integration server

2006-09-19 Thread Leonard Gestrin
Hello,

This is my first email to the list and I am new to maven, so pardon me
if missed the solution to the problem I am envisioning - any help or
idea how it can be solved would be greatly appreciated. Also, I am sorry
about the lengh of the email as I am trying to illustrate the problem as
detailed as I can,

 

Lets say, I have 

artifacts: webapp, webutil, util, common. - all these components are in
active development.

webapp depends  on webutil, util, common

webutil depends on util, common

util depends on common.

 

The goal is to make sure that snapshots are updated properly recursively
when change happens to a certain snapshot. And all pieces of the
application are using same versions of snapshots.

 

1.  To make sure every artifact depends on same version of
dependencies, parent  pom.xml will have

dependencyManagement

dependencies

dependency

!-3rd party -

groupIdcommons-logging/groupId

artifactIdcommons-logging/artifactId

version1.0.4/version

/dependency

!-internal-

groupIdcompany.com/groupId

artifactIdwebutil/artifactId

version1.0.0-SNAPSHOT/version

groupIdcompany.com/groupId

artifactIdutil/artifactId

version1.0.0-SNAPSHOT/version

groupIdcompany.com/groupId

artifactIdcommon/artifactId

version1.0.0-SNAPSHOT/version

/dependencyManagement

 

2.  to make sure that snapshots are build using controlled
environment, lets say continuum is used to build them. So, my questions
are:

 

Will continuum rebuild ALL snapshots every time it makes a build?
(hourly, per say). 

a) If yes, how does it know the order in which snapshots in which it
have to be generated? (common first, util, webutil, webapp) - the order
is very important since if there is a change in common, util has to be
compiled against latest common classes.

Also, it seems to me that repository will get filled up very quickly
with identical snapshots for same component and each developer's machine
would have to sync new snapshots every time it checks with repository

 

  b)If  continuum is smart enough to create new snapshot only when
there has been code changes in src of particular module, does it know
that snapshots depending on that module have to be regenerated also?

 

3. if continuum does not have the answer for the problem/questions to 2.
can someone recommend the alternative solution/intergration server that
would ensure that snapshots are being incrementally deployed only when
and in the right dependency order? (if change has been done in util
module there is no need to redeploy common snapshot but there is a need
to redeploy webutil once util snapshot is ready)

Thanks

Leonard