Re: inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-14 Thread Brian Fox
Are you using a recent version of Maven? Once upon a time the
inheritence flag didn't work. FWIW you can also define inherit=false
on an execution

On Thu, May 13, 2010 at 9:53 AM, Shan Syed shan...@gmail.com wrote:
 Thanks, but the problem is that when I do that, both executions occur, even
 when I specify inheritance=false.

 I basically need to use the same plugin for two different purposes, without
 either of them affecting the other; I tried to specify different versions
 for the mvn dep plugin (i.e. in one block, specify 2.0, and 2.1 for the
 other), but no dice.

 Running mvn help:effective-pom on my WAR projects always shows the second
 maven-dependency-plugin configuration from the root POM in the
 pluginManagement section
 BUT
 in the actual plugin block, it shows the following (below)
 (note the second execution, with not configuration or anything associated
 with it)

 What is the exact logic for the merging of plugin configs in a multimodule
 project?

 thanks

 S

  plugin
   artifactIdmaven-dependency-plugin/artifactId
   version2.1/version
   executions
     execution
       idunpack-wsdls/id
       phasegenerate-resources/phase
       goals
         goalunpack/goal
       /goals
       configuration

 outputDirectoryC:\dev\sk\sk-saml\sk-saml-web\sk-saml-server\target/war/WEB-INF/wsdl/outputDirectory
       /configuration
     /execution
     execution
       idunpack-javascripts/id
     /execution
   /executions
   configuration
     artifactItems
       artifactItem
         artifactIdsk-javascript-token/artifactId
         groupIdcom.securekey.javascript/groupId
         version1.0-SNAPSHOT/version
         classifierjavascript/classifier
         typezip/type
       /artifactItem
     /artifactItems
   /configuration
  /plugin

 On Thu, May 13, 2010 at 4:54 AM, Kalpak Gadre kalpa...@gmail.com wrote:

 I have never tried declaring the same plugin twice, but you can simply
 define more executions in the same plugin declaration like,

 executions
 execution
 idone/id
         .
         .
 /execution
 execution
 idtwo/id
         .
         .
 /execution
 /executions


 Thanks,

 Kalpak


  Here's my scenario: I have a large multimodule project whose WARs share
 certain dependencies, which are packaged as zips by a few simple
 assemblies
 I wrote.

 I am using the maven-dependency-plugin to unpack the contents of these
 zips
 into their destination folders in the webapps.

 However, to reduce clutter and minimize maintenance, the majority of the
 plugin configuration is in the root POM, like so:
 (note that I am using the same plugin twice for two different reasons - is
 this valid?)

      build
           pluginManagement
                plugins
                      ...
                     !-- unpacking of JAVASCRIPT dependencies --
                     plugin
                          groupIdorg.apache.maven.plugins/groupId
                          artifactIdmaven-dependency-plugin/artifactId
                          inheritedtrue/inherited
                          executions
                               execution
                                    idunpack-javascripts/id
                                    goals
                                         goalunpack/goal
                                    /goals
                                    phasepackage/phase
                                    configuration

 outputDirectory${project.build.directory}/war/scripts/outputDirectory
                                    /configuration
                               /execution
                          /executions
                     /plugin
                     !-- unpacking of WSDL dependencies --
                     plugin
                          groupIdorg.apache.maven.plugins/groupId
                          artifactIdmaven-dependency-plugin/artifactId
                          inheritedtrue/inherited
                          executions
                               execution
                                    idunpack-wsdls/id
                                    goals
                                         goalunpack/goal
                                    /goals
                                    phasegenerate-resources/phase
                                    configuration


 outputDirectory${project.build.directory}/war/WEB-INF/wsdl/outputDirectory
                                    /configuration
                               /execution
                          /executions
                     /plugin
                /plugins
           /pluginManagement
      /build

 Some WARs need the WSDLs, some need the javascript files, while others
 don't
 need either - it will be up to the developers creating those projects.

 Here is an example usage in one of the WARs (note the ID of the execution,
 which is expected to be used to merge the whole configuration)

      build
           plugins
                plugin
                     

Re: inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-13 Thread Kalpak Gadre
I have never tried declaring the same plugin twice, but you can simply 
define more executions in the same plugin declaration like,


executions
execution
idone/id
 .
 .
/execution
execution
idtwo/id
 .
 .
/execution
/executions


Thanks,

Kalpak


Here's my scenario: I have a large multimodule project whose WARs share
certain dependencies, which are packaged as zips by a few simple assemblies
I wrote.

I am using the maven-dependency-plugin to unpack the contents of these zips
into their destination folders in the webapps.

However, to reduce clutter and minimize maintenance, the majority of the
plugin configuration is in the root POM, like so:
(note that I am using the same plugin twice for two different reasons - is
this valid?)

  build
   pluginManagement
plugins
  ...
 !-- unpacking of JAVASCRIPT dependencies --
 plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
  inheritedtrue/inherited
  executions
   execution
idunpack-javascripts/id
goals
 goalunpack/goal
/goals
phasepackage/phase
configuration

outputDirectory${project.build.directory}/war/scripts/outputDirectory
/configuration
   /execution
  /executions
 /plugin
 !-- unpacking of WSDL dependencies --
 plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
  inheritedtrue/inherited
  executions
   execution
idunpack-wsdls/id
goals
 goalunpack/goal
/goals
phasegenerate-resources/phase
configuration

outputDirectory${project.build.directory}/war/WEB-INF/wsdl/outputDirectory
/configuration
   /execution
  /executions
 /plugin
/plugins
   /pluginManagement
  /build

Some WARs need the WSDLs, some need the javascript files, while others don't
need either - it will be up to the developers creating those projects.

Here is an example usage in one of the WARs (note the ID of the execution,
which is expected to be used to merge the whole configuration)

  build
   plugins
plugin
 artifactIdmaven-dependency-plugin/artifactId
 groupIdorg.apache.maven.plugins/groupId
 inheritedtrue/inherited
 executions
  execution
   idunpack-javascripts/id
  /execution
 /executions
 configuration
  artifactItems
   artifactItem

artifactIdsk-javascript-token/artifactId

groupIdcom.securekey.javascript/groupId
version${project.version}/version
classifierjavascript/classifier
typezip/type
   /artifactItem
  /artifactItems
 /configuration
/plugin
   /plugins
  /build

So in general, the plugin configuration in the root POM will enforce some
common things (destination folder, etc), and the usage will actually allow
the developer to select what javascripts they need, without worrying about
other configuration details.

But the problem is when building, it's always the 2nd plugin configuration
in the root POM that gets used, even though I specify the ID in the leaf
POMs; so when I do an overall build, all the javascript files end up in a
WSDL directory, even if I don't reference the WSDL execution at all.
I inverse the order, and the result is the opposite; the javascripts end up
in the right place, but all the WARs that have a WSDL dependency end up with
a scripts directory full of WSDL files.

I was under the impression that the ID is used to merge the configurations
upon building the project, but I'm not seeing this. Is there a way to
specify exactly what configuration to bind to?
Specify two executions within the sameplugin  causes the same 

Re: inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-13 Thread Shan Syed
Thanks, but the problem is that when I do that, both executions occur, even
when I specify inheritance=false.

I basically need to use the same plugin for two different purposes, without
either of them affecting the other; I tried to specify different versions
for the mvn dep plugin (i.e. in one block, specify 2.0, and 2.1 for the
other), but no dice.

Running mvn help:effective-pom on my WAR projects always shows the second
maven-dependency-plugin configuration from the root POM in the
pluginManagement section
BUT
in the actual plugin block, it shows the following (below)
(note the second execution, with not configuration or anything associated
with it)

What is the exact logic for the merging of plugin configs in a multimodule
project?

thanks

S

 plugin
   artifactIdmaven-dependency-plugin/artifactId
   version2.1/version
   executions
 execution
   idunpack-wsdls/id
   phasegenerate-resources/phase
   goals
 goalunpack/goal
   /goals
   configuration

outputDirectoryC:\dev\sk\sk-saml\sk-saml-web\sk-saml-server\target/war/WEB-INF/wsdl/outputDirectory
   /configuration
 /execution
 execution
   idunpack-javascripts/id
 /execution
   /executions
   configuration
 artifactItems
   artifactItem
 artifactIdsk-javascript-token/artifactId
 groupIdcom.securekey.javascript/groupId
 version1.0-SNAPSHOT/version
 classifierjavascript/classifier
 typezip/type
   /artifactItem
 /artifactItems
   /configuration
 /plugin

On Thu, May 13, 2010 at 4:54 AM, Kalpak Gadre kalpa...@gmail.com wrote:

 I have never tried declaring the same plugin twice, but you can simply
 define more executions in the same plugin declaration like,

 executions
 execution
 idone/id
 .
 .
 /execution
 execution
 idtwo/id
 .
 .
 /execution
 /executions


 Thanks,

 Kalpak


  Here's my scenario: I have a large multimodule project whose WARs share
 certain dependencies, which are packaged as zips by a few simple
 assemblies
 I wrote.

 I am using the maven-dependency-plugin to unpack the contents of these
 zips
 into their destination folders in the webapps.

 However, to reduce clutter and minimize maintenance, the majority of the
 plugin configuration is in the root POM, like so:
 (note that I am using the same plugin twice for two different reasons - is
 this valid?)

  build
   pluginManagement
plugins
  ...
 !-- unpacking of JAVASCRIPT dependencies --
 plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
  inheritedtrue/inherited
  executions
   execution
idunpack-javascripts/id
goals
 goalunpack/goal
/goals
phasepackage/phase
configuration

 outputDirectory${project.build.directory}/war/scripts/outputDirectory
/configuration
   /execution
  /executions
 /plugin
 !-- unpacking of WSDL dependencies --
 plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
  inheritedtrue/inherited
  executions
   execution
idunpack-wsdls/id
goals
 goalunpack/goal
/goals
phasegenerate-resources/phase
configuration


 outputDirectory${project.build.directory}/war/WEB-INF/wsdl/outputDirectory
/configuration
   /execution
  /executions
 /plugin
/plugins
   /pluginManagement
  /build

 Some WARs need the WSDLs, some need the javascript files, while others
 don't
 need either - it will be up to the developers creating those projects.

 Here is an example usage in one of the WARs (note the ID of the execution,
 which is expected to be used to merge the whole configuration)

  build
   plugins
plugin
 artifactIdmaven-dependency-plugin/artifactId
 groupIdorg.apache.maven.plugins/groupId
 inheritedtrue/inherited
 executions
  execution
   

Re: inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-13 Thread Timothy Mcginnis
What about using profiles?  Define 3 profiles; one for wsdl only, one for 
javascript only, and one for both.  Then have the war project activate the 
one it needs.

Tim McGinnis
717 720-1962
Web Development
AES/PHEAA



From:
Shan Syed shan...@gmail.com
To:
Maven Users List users@maven.apache.org, kalpa...@gmail.com
Date:
05/13/2010 09:54 AM
Subject:
Re: inheriting and reusing the same plugin for different purposes? doesn't 
seem to find the right executions



Thanks, but the problem is that when I do that, both executions occur, 
even
when I specify inheritance=false.

I basically need to use the same plugin for two different purposes, 
without
either of them affecting the other; I tried to specify different versions
for the mvn dep plugin (i.e. in one block, specify 2.0, and 2.1 for the
other), but no dice.

Running mvn help:effective-pom on my WAR projects always shows the second
maven-dependency-plugin configuration from the root POM in the
pluginManagement section
BUT
in the actual plugin block, it shows the following (below)
(note the second execution, with not configuration or anything associated
with it)

What is the exact logic for the merging of plugin configs in a multimodule
project?

thanks

S

 plugin
   artifactIdmaven-dependency-plugin/artifactId
   version2.1/version
   executions
 execution
   idunpack-wsdls/id
   phasegenerate-resources/phase
   goals
 goalunpack/goal
   /goals
   configuration

outputDirectoryC:\dev\sk\sk-saml\sk-saml-web\sk-saml-server\target/war/WEB-INF/wsdl/outputDirectory
   /configuration
 /execution
 execution
   idunpack-javascripts/id
 /execution
   /executions
   configuration
 artifactItems
   artifactItem
 artifactIdsk-javascript-token/artifactId
 groupIdcom.securekey.javascript/groupId
 version1.0-SNAPSHOT/version
 classifierjavascript/classifier
 typezip/type
   /artifactItem
 /artifactItems
   /configuration
 /plugin

On Thu, May 13, 2010 at 4:54 AM, Kalpak Gadre kalpa...@gmail.com wrote:

 I have never tried declaring the same plugin twice, but you can simply
 define more executions in the same plugin declaration like,

 executions
 execution
 idone/id
 .
 .
 /execution
 execution
 idtwo/id
 .
 .
 /execution
 /executions


 Thanks,

 Kalpak


  Here's my scenario: I have a large multimodule project whose WARs share
 certain dependencies, which are packaged as zips by a few simple
 assemblies
 I wrote.

 I am using the maven-dependency-plugin to unpack the contents of these
 zips
 into their destination folders in the webapps.

 However, to reduce clutter and minimize maintenance, the majority of 
the
 plugin configuration is in the root POM, like so:
 (note that I am using the same plugin twice for two different reasons - 
is
 this valid?)

  build
   pluginManagement
plugins
  ...
 !-- unpacking of JAVASCRIPT dependencies --
 plugin
  groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
  inheritedtrue/inherited
  executions
   execution
idunpack-javascripts/id
goals
 goalunpack/goal
/goals
phasepackage/phase
configuration

 
outputDirectory${project.build.directory}/war/scripts/outputDirectory
/configuration
   /execution
  /executions
 /plugin
 !-- unpacking of WSDL dependencies --
 plugin
  groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
  inheritedtrue/inherited
  executions
   execution
idunpack-wsdls/id
goals
 goalunpack/goal
/goals
phasegenerate-resources/phase
configuration


 
outputDirectory${project.build.directory}/war/WEB-INF/wsdl/outputDirectory
/configuration
   /execution
  /executions
 /plugin
/plugins
   /pluginManagement
  /build

 Some WARs need the WSDLs, some need the javascript files, while others
 don't
 need either - it will be up to the developers creating those projects.

 Here is an example usage in one of the WARs (note the 

Re: inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-13 Thread Shan Syed
thanks - how would I set this up?
I tried to specify two profiles in my parent POM, each with their own
pluginManagement blocks, containing a maven-dependency-plugin configuration,
and then activated the profile in the WAR projects' POMs, but there is no
result

I basically want my plugins' meta config stored in the root, and specific
configs applied in the WAR projects



On Thu, May 13, 2010 at 10:26 AM, Timothy Mcginnis
tmcgi...@aessuccess.orgwrote:

 What about using profiles?  Define 3 profiles; one for wsdl only, one for
 javascript only, and one for both.  Then have the war project activate the
 one it needs.

 Tim McGinnis
 717 720-1962
 Web Development
 AES/PHEAA



 From:
 Shan Syed shan...@gmail.com
 To:
 Maven Users List users@maven.apache.org, kalpa...@gmail.com
 Date:
 05/13/2010 09:54 AM
 Subject:
 Re: inheriting and reusing the same plugin for different purposes? doesn't
 seem to find the right executions



 Thanks, but the problem is that when I do that, both executions occur,
 even
 when I specify inheritance=false.

 I basically need to use the same plugin for two different purposes,
 without
 either of them affecting the other; I tried to specify different versions
 for the mvn dep plugin (i.e. in one block, specify 2.0, and 2.1 for the
 other), but no dice.

 Running mvn help:effective-pom on my WAR projects always shows the second
 maven-dependency-plugin configuration from the root POM in the
 pluginManagement section
 BUT
 in the actual plugin block, it shows the following (below)
 (note the second execution, with not configuration or anything associated
 with it)

 What is the exact logic for the merging of plugin configs in a multimodule
 project?

 thanks

 S

  plugin
   artifactIdmaven-dependency-plugin/artifactId
   version2.1/version
   executions
 execution
   idunpack-wsdls/id
   phasegenerate-resources/phase
   goals
 goalunpack/goal
   /goals
   configuration


 outputDirectoryC:\dev\sk\sk-saml\sk-saml-web\sk-saml-server\target/war/WEB-INF/wsdl/outputDirectory
   /configuration
 /execution
 execution
   idunpack-javascripts/id
 /execution
   /executions
   configuration
 artifactItems
   artifactItem
 artifactIdsk-javascript-token/artifactId
 groupIdcom.securekey.javascript/groupId
 version1.0-SNAPSHOT/version
 classifierjavascript/classifier
 typezip/type
   /artifactItem
 /artifactItems
   /configuration
  /plugin

 On Thu, May 13, 2010 at 4:54 AM, Kalpak Gadre kalpa...@gmail.com wrote:

  I have never tried declaring the same plugin twice, but you can simply
  define more executions in the same plugin declaration like,
 
  executions
  execution
  idone/id
  .
  .
  /execution
  execution
  idtwo/id
  .
  .
  /execution
  /executions
 
 
  Thanks,
 
  Kalpak
 
 
   Here's my scenario: I have a large multimodule project whose WARs share
  certain dependencies, which are packaged as zips by a few simple
  assemblies
  I wrote.
 
  I am using the maven-dependency-plugin to unpack the contents of these
  zips
  into their destination folders in the webapps.
 
  However, to reduce clutter and minimize maintenance, the majority of
 the
  plugin configuration is in the root POM, like so:
  (note that I am using the same plugin twice for two different reasons -
 is
  this valid?)
 
   build
pluginManagement
 plugins
   ...
  !-- unpacking of JAVASCRIPT dependencies --
  plugin
   groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
   inheritedtrue/inherited
   executions
execution
 idunpack-javascripts/id
 goals
  goalunpack/goal
 /goals
 phasepackage/phase
 configuration
 
 
 outputDirectory${project.build.directory}/war/scripts/outputDirectory
 /configuration
/execution
   /executions
  /plugin
  !-- unpacking of WSDL dependencies --
  plugin
   groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
   inheritedtrue/inherited
   executions
execution
 idunpack-wsdls/id
 goals
  goalunpack/goal
 /goals
 phasegenerate-resources/phase

Re: inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-13 Thread Timothy Mcginnis
Are you defining the plugin in your WAR POM also?  Using the 
pluginManagement I believe you also need to call out the use of the plugin 
in the WAR POM, but don't define any of the execution/configuration data, 
that is provided by the pluginManagement in the profile.


Profile provides this:

pluginManagement
  plugins
  ...
  !-- unpacking of JAVASCRIPT dependencies --
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-dependency-plugin/artifactId
   inheritedtrue/inherited
   executions
 execution
   idunpack-javascripts/id
   goals
 goalunpack/goal
   /goals
   phasepackage/phase
   configuration
 outputDirectory${project.build.directory}/war/scripts/outputDirectory
   /configuration
 /execution
   /executions
 /plugin
/pluginManagement


WAR POM specifies this:


build
  plugins
plugin
  groupIdorg.apache.maven.plugins/groupid
  artifactIdmaven-dependency-plugin/artifactId
/plugin
  /plugins
/build



Tim McGinnis
717 720-1962
Web Development
AES/PHEAA



From:
Shan Syed shan...@gmail.com
To:
Maven Users List users@maven.apache.org
Date:
05/13/2010 12:51 PM
Subject:
Re: inheriting and reusing the same plugin for different purposes? doesn't 
seem to find the right executions



thanks - how would I set this up?
I tried to specify two profiles in my parent POM, each with their own
pluginManagement blocks, containing a maven-dependency-plugin 
configuration,
and then activated the profile in the WAR projects' POMs, but there is no
result

I basically want my plugins' meta config stored in the root, and specific
configs applied in the WAR projects



On Thu, May 13, 2010 at 10:26 AM, Timothy Mcginnis
tmcgi...@aessuccess.orgwrote:

 What about using profiles?  Define 3 profiles; one for wsdl only, one 
for
 javascript only, and one for both.  Then have the war project activate 
the
 one it needs.

 Tim McGinnis
 717 720-1962
 Web Development
 AES/PHEAA



 From:
 Shan Syed shan...@gmail.com
 To:
 Maven Users List users@maven.apache.org, kalpa...@gmail.com
 Date:
 05/13/2010 09:54 AM
 Subject:
 Re: inheriting and reusing the same plugin for different purposes? 
doesn't
 seem to find the right executions



 Thanks, but the problem is that when I do that, both executions occur,
 even
 when I specify inheritance=false.

 I basically need to use the same plugin for two different purposes,
 without
 either of them affecting the other; I tried to specify different 
versions
 for the mvn dep plugin (i.e. in one block, specify 2.0, and 2.1 for the
 other), but no dice.

 Running mvn help:effective-pom on my WAR projects always shows the 
second
 maven-dependency-plugin configuration from the root POM in the
 pluginManagement section
 BUT
 in the actual plugin block, it shows the following (below)
 (note the second execution, with not configuration or anything 
associated
 with it)

 What is the exact logic for the merging of plugin configs in a 
multimodule
 project?

 thanks

 S

  plugin
   artifactIdmaven-dependency-plugin/artifactId
   version2.1/version
   executions
 execution
   idunpack-wsdls/id
   phasegenerate-resources/phase
   goals
 goalunpack/goal
   /goals
   configuration


 
outputDirectoryC:\dev\sk\sk-saml\sk-saml-web\sk-saml-server\target/war/WEB-INF/wsdl/outputDirectory
   /configuration
 /execution
 execution
   idunpack-javascripts/id
 /execution
   /executions
   configuration
 artifactItems
   artifactItem
 artifactIdsk-javascript-token/artifactId
 groupIdcom.securekey.javascript/groupId
 version1.0-SNAPSHOT/version
 classifierjavascript/classifier
 typezip/type
   /artifactItem
 /artifactItems
   /configuration
  /plugin

 On Thu, May 13, 2010 at 4:54 AM, Kalpak Gadre kalpa...@gmail.com 
wrote:

  I have never tried declaring the same plugin twice, but you can simply
  define more executions in the same plugin declaration like,
 
  executions
  execution
  idone/id
  .
  .
  /execution
  execution
  idtwo/id
  .
  .
  /execution
  /executions
 
 
  Thanks,
 
  Kalpak
 
 
   Here's my scenario: I have a large multimodule project whose WARs 
share
  certain dependencies, which are packaged as zips by a few simple
  assemblies
  I wrote.
 
  I am using the maven-dependency-plugin to unpack the contents of 
these
  zips
  into their destination folders in the webapps.
 
  However, to reduce clutter and minimize maintenance, the majority of
 the
  plugin configuration is in the root POM, like so:
  (note that I am using the same plugin twice for two different reasons 
-
 is
  this valid?)
 
   build
pluginManagement
 plugins
   ...
  !-- unpacking of JAVASCRIPT dependencies --
  plugin
   

Re: inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-13 Thread Shan Syed
I tried this (in my WAR POM):

 build
  plugins
   plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-dependency-plugin/artifactId
   /plugin
  /plugins
 /build
 profiles
  profile
   idunpacking-javascript/id
   activation
activeByDefaulttrue/activeByDefault
   /activation
   build
plugins
 plugin

artifactIdmaven-dependency-plugin/artifactId
  groupIdorg.apache.maven.plugins/groupId
  executions
   execution
idunpack-javascripts/id
   /execution
  /executions
  configuration
   artifactItems
artifactItem

artifactIdsk-javascript-token/artifactId

groupIdcom.securekey.javascript/groupId

version${project.version}/version

classifierjavascript/classifier
 typezip/type
/artifactItem
   /artifactItems
  /configuration
 /plugin
/plugins
   /build
  /profile
 /profiles

parent POM:

 profiles
  profile
   idunpacking-WSDL/id
   build
plugins
 !-- unpacking of WSDL dependencies --
 plugin
  groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-dependency-plugin/artifactId
  version2.1/version
  inheritedtrue/inherited
  executions
   execution
idunpack-wsdls/id
goals
 goalunpack/goal
/goals
phasegenerate-resources/phase
configuration

outputDirectory${project.build.directory}/war/WEB-INF/wsdl/outputDirectory
/configuration
   /execution
  /executions
 /plugin
/plugins
   /build
  /profile
  profile
   idunpacking-javascript/id
   build
pluginManagement
 plugins
  !-- unpacking of JAVASCRIPT dependencies --
  plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-dependency-plugin/artifactId
   version2.1/version
   inheritedfalse/inherited
   executions
execution
 idunpack-javascripts/id
 goals
  goalunpack/goal
 /goals
 phasepackage/phase
 configuration

outputDirectory${project.build.directory}/war/scripts/outputDirectory
 /configuration
/execution
   /executions
  /plugin
 /plugins
/pluginManagement
   /build
  /profile
 /profiles

still no effect, even though the maven-dependency-plugin is now mentioned
twice in the WAR's POM.. hmm, do I have to do the same in the parent POM?
i.e. specify the plugin in the build's plugin management?
\


On Thu, May 13, 2010 at 1:08 PM, Timothy Mcginnis
tmcgi...@aessuccess.orgwrote:

 Are you defining the plugin in your WAR POM also?  Using the
 pluginManagement I believe you also need to call out the use of the plugin
 in the WAR POM, but don't define any of the execution/configuration data,
 that is provided by the pluginManagement in the profile.


 Profile provides this:

 pluginManagement
  plugins
  ...
  !-- unpacking of JAVASCRIPT dependencies --
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-dependency-plugin/artifactId
   inheritedtrue/inherited
   executions
 execution
   idunpack-javascripts/id
   goals
 goalunpack/goal
   /goals
   phasepackage/phase
   

Re: inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-13 Thread Timothy Mcginnis
Try this. 

In your WAR POM remove all the maven-dependency-plugin and put this in

properties
unpack-javascripttrue/unpack-javascript
/properties

build
plugins
plugin
 artifactIdmaven-dependency-plugin/artifactId
 groupIdorg.apache.maven.plugins/groupId
configuration
artifactItems
artifactItem
 artifactIdsk-javascript-token/artifactId
 groupIdcom.securekey.javascript/groupId
 version${project.version}/version
 classifierjavascript/classifier
typezip/type
/artifactItem
/artifactItems
/configuration
/plugin
/plugins
/build


In your Parent POM remove the current profiles section and put this in.

profiles
profile
idunpacking-WSDL/id
!-- profile will be activated when the property 
unpack-WSDL is declared --
activation
property
nameunpack-WSDL/name
valuetrue/value
/property
/activation
build
pluginManagement
plugins
!-- unpacking of WSDL 
dependencies --
plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
 version2.1/version
 inheritedtrue/inherited
executions
 execution
 idunpack-wsdls/id
 goals
 goalunpack/goal
 /goals
 phasegenerate-resources/phase
 configuration
 
outputDirectory${project.build.directory}/war/WEB-INF/wsdl/outputDirectory
 /configuration
 /execution
/executions
/plugin
/plugins
/pluginManagement
/build
/profile
profile
idunpacking-javascript/id
!-- profile will be activated when the property 
unpack-javascript is declared --
activation
property
nameunpack-javascript/name
valuetrue/value
/property
/activation
build
pluginManagement
plugins
!-- unpacking of 
JAVASCRIPT dependencies --
plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
 version2.1/version
 inheritedfalse/inherited
executions
 execution
 idunpack-javascripts/id
 goals
 goalunpack/goal
 /goals
 phasepackage/phase
 configuration
 outputDirectory${project.build.directory}/war/scripts/outputDirectory
 /configuration
 /execution
/executions
/plugin
/plugins
/pluginManagement
/build
/profile
/profiles

Tim McGinnis
717 720-1962
Web Development
AES/PHEAA



From:
Shan Syed shan...@gmail.com
To:
Maven Users List users@maven.apache.org
Date:
05/13/2010 01:22 PM
Subject:
Re: inheriting and reusing the same plugin for different purposes? doesn't 
seem to find the right executions



I tried this (in my WAR POM):

 build
  plugins
   plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-dependency-plugin/artifactId
   /plugin
  /plugins
 /build
 profiles
  profile
   idunpacking-javascript/id
   activation
activeByDefaulttrue/activeByDefault
   /activation
   build
plugins
 plugin

artifactIdmaven-dependency-plugin/artifactId
  groupIdorg.apache.maven.plugins/groupId
  executions
   execution
idunpack-javascripts/id
   /execution
  

inheriting and reusing the same plugin for different purposes? doesn't seem to find the right executions

2010-05-12 Thread Shan Syed
Here's my scenario: I have a large multimodule project whose WARs share
certain dependencies, which are packaged as zips by a few simple assemblies
I wrote.

I am using the maven-dependency-plugin to unpack the contents of these zips
into their destination folders in the webapps.

However, to reduce clutter and minimize maintenance, the majority of the
plugin configuration is in the root POM, like so:
(note that I am using the same plugin twice for two different reasons - is
this valid?)

 build
  pluginManagement
   plugins
 ...
!-- unpacking of JAVASCRIPT dependencies --
plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
 inheritedtrue/inherited
 executions
  execution
   idunpack-javascripts/id
   goals
goalunpack/goal
   /goals
   phasepackage/phase
   configuration

outputDirectory${project.build.directory}/war/scripts/outputDirectory
   /configuration
  /execution
 /executions
/plugin
!-- unpacking of WSDL dependencies --
plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
 inheritedtrue/inherited
 executions
  execution
   idunpack-wsdls/id
   goals
goalunpack/goal
   /goals
   phasegenerate-resources/phase
   configuration

outputDirectory${project.build.directory}/war/WEB-INF/wsdl/outputDirectory
   /configuration
  /execution
 /executions
/plugin
   /plugins
  /pluginManagement
 /build

Some WARs need the WSDLs, some need the javascript files, while others don't
need either - it will be up to the developers creating those projects.

Here is an example usage in one of the WARs (note the ID of the execution,
which is expected to be used to merge the whole configuration)

 build
  plugins
   plugin
artifactIdmaven-dependency-plugin/artifactId
groupIdorg.apache.maven.plugins/groupId
inheritedtrue/inherited
executions
 execution
  idunpack-javascripts/id
 /execution
/executions
configuration
 artifactItems
  artifactItem

artifactIdsk-javascript-token/artifactId

groupIdcom.securekey.javascript/groupId
   version${project.version}/version
   classifierjavascript/classifier
   typezip/type
  /artifactItem
 /artifactItems
/configuration
   /plugin
  /plugins
 /build

So in general, the plugin configuration in the root POM will enforce some
common things (destination folder, etc), and the usage will actually allow
the developer to select what javascripts they need, without worrying about
other configuration details.

But the problem is when building, it's always the 2nd plugin configuration
in the root POM that gets used, even though I specify the ID in the leaf
POMs; so when I do an overall build, all the javascript files end up in a
WSDL directory, even if I don't reference the WSDL execution at all.
I inverse the order, and the result is the opposite; the javascripts end up
in the right place, but all the WARs that have a WSDL dependency end up with
a scripts directory full of WSDL files.

I was under the impression that the ID is used to merge the configurations
upon building the project, but I'm not seeing this. Is there a way to
specify exactly what configuration to bind to?
Specify two executions within the same plugin causes the same behaviour,
except with both folders.

To generalize, in a multi-module project, how can I use the same plugin for
totally different uses/scenarios?

thanks,

Shan