Re: Plugin dependency resolution from plugin pom?

2015-03-31 Thread Gary Kennedy
The setting used in the original plugin.xml for 
requiresDependencyResolutionString is runtime. I am not changing this when I am 
repackaging the plugin.

Also, it's the plugin dependencies that are not being resolved, not the 
project. (My test project is not using any dependencies)

Cheers,
Gary

On 27 Mar 2015, at 1:16 am, Martin Gainty mgai...@hotmail.com wrote:

 plugin.xml
 requiresDependencyResolution
 
 
 
  String
 
 
 
Flags this Mojo as requiring the dependencies in the specified 
 class path to be resolved before it can
execute: compile, runtime, test,
compile+runtime (since Maven 3.0) or runtime+system (since Maven 
 3.0)
 
 Default value is: runtime.
 https://maven.apache.org/ref/3.2.1/maven-plugin-api/plugin.html
 
 does setting in plugin.xml requiresDependencyResolutionString not force 
 dependencies to be resolved?
 
 for your next run can you display debug info and error info so we can see 
 determine the behaviour of the reactor?
 
 mvn -e -X phase
 
 ?
 Martin 
 
 
 From: g...@apnic.net
 To: users@maven.apache.org
 Subject: Plugin dependency resolution from plugin pom?
 Date: Mon, 23 Mar 2015 22:41:39 +
 
 I'm trying to patch a third-party plugin at the moment as a temporary 
 workaround for a problem. (I don't want to get into details because it's not 
 important)
 
 So I currently have a 'patch project' that depends on the plugin, uses the 
 maven-dependency-plugin to unpack the dependant plugin (without the 
 replacement files), contains the replacement files, does some replacer magic 
 on the extracted plugin.xml to fixup the version/etc, and then package it 
 all.
 
 This all works fine, in that the new project jar is a good content copy of 
 the old plugin with all the changes needed.
 
 However, when using the new plugin, several dependency errors occur. (i.e., 
 the dependencies of the old plugin are not pulled in).
 
 This confused me for a while because the maven plugin.xml file correctly 
 lists all the dependencies. After a bit more playing around I worked out 
 that this is because the plugin dependency resolution comes from the plugins 
 pom.xml and NOT the plugin.xml file.
 
 So my main question for the group is: How/Can I, at build time, add the 
 dependency (and properties, if possible) section from the old plugin pom 
 into my new plugin's artefact pom? (So not the project pom itself, but the 
 one written to the maven repository)
 
 And because I'm curious, does anyone know,
   a) why the plugin.xml contains the dependencies if they are not used?
 or b) why the pom.xml is used instead of the plugin.xml to resolve 
 dependencies? (I suspect aether + coding simplicity for this one)
 
 Cheers,
 Gary
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 


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



Re: Plugin dependency resolution from plugin pom?

2015-03-31 Thread Gary Kennedy
Yes, that would be the smarter option, wouldn't it. :$ *bangs head on desk*

I am still curious though as to why the plugin.xml contains a dependency 
section if it's the plugin's pom file that is used for resolution, and/or why 
the pom file is used over the plugin file? The plugin.xml file contains 
everything else regarding the plugin usage, and I think that's throwing me off.

Cheers,
Gary

On 27 Mar 2015, at 1:26 am, Curtis Rueden ctrue...@wisc.edu wrote:

 Hi Gary,
 
 I'm trying to patch a third-party plugin at the moment as a temporary
 workaround for a problem. (I don't want to get into details because
 it's not important)
 
 Since the workaround is temporary, could you not simply clone the plugin's
 SCM repository to a local Git repository, then create a branch with your
 changes? Then rebuild the plugin whenever you like and use it. No need for
 all the hoop-jumping it sounds like you're doing now...
 
 Regards,
 Curtis
 
 On Mon, Mar 23, 2015 at 5:41 PM, Gary Kennedy g...@apnic.net wrote:
 
 I'm trying to patch a third-party plugin at the moment as a temporary
 workaround for a problem. (I don't want to get into details because it's
 not important)
 
 So I currently have a 'patch project' that depends on the plugin, uses the
 maven-dependency-plugin to unpack the dependant plugin (without the
 replacement files), contains the replacement files, does some replacer
 magic on the extracted plugin.xml to fixup the version/etc, and then
 package it all.
 
 This all works fine, in that the new project jar is a good content copy of
 the old plugin with all the changes needed.
 
 However, when using the new plugin, several dependency errors occur.
 (i.e., the dependencies of the old plugin are not pulled in).
 
 This confused me for a while because the maven plugin.xml file correctly
 lists all the dependencies. After a bit more playing around I worked out
 that this is because the plugin dependency resolution comes from the
 plugins pom.xml and NOT the plugin.xml file.
 
 So my main question for the group is: How/Can I, at build time, add the
 dependency (and properties, if possible) section from the old plugin pom
 into my new plugin's artefact pom? (So not the project pom itself, but the
 one written to the maven repository)
 
 And because I'm curious, does anyone know,
   a) why the plugin.xml contains the dependencies if they are not used?
 or b) why the pom.xml is used instead of the plugin.xml to resolve
 dependencies? (I suspect aether + coding simplicity for this one)
 
 Cheers,
 Gary
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 


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



Plugin dependency resolution from plugin pom?

2015-03-23 Thread Gary Kennedy
I'm trying to patch a third-party plugin at the moment as a temporary 
workaround for a problem. (I don't want to get into details because it's not 
important)

So I currently have a 'patch project' that depends on the plugin, uses the 
maven-dependency-plugin to unpack the dependant plugin (without the replacement 
files), contains the replacement files, does some replacer magic on the 
extracted plugin.xml to fixup the version/etc, and then package it all.

This all works fine, in that the new project jar is a good content copy of the 
old plugin with all the changes needed.

However, when using the new plugin, several dependency errors occur. (i.e., the 
dependencies of the old plugin are not pulled in).

This confused me for a while because the maven plugin.xml file correctly lists 
all the dependencies. After a bit more playing around I worked out that this is 
because the plugin dependency resolution comes from the plugins pom.xml and NOT 
the plugin.xml file.

So my main question for the group is: How/Can I, at build time, add the 
dependency (and properties, if possible) section from the old plugin pom into 
my new plugin's artefact pom? (So not the project pom itself, but the one 
written to the maven repository)

And because I'm curious, does anyone know,
   a) why the plugin.xml contains the dependencies if they are not used?
or b) why the pom.xml is used instead of the plugin.xml to resolve 
dependencies? (I suspect aether + coding simplicity for this one)

Cheers,
Gary


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