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: [email protected]
> To: [email protected]
> Subject: Plugin dependency resolution from plugin pom?
> Date: Mon, 23 Mar 2015 22:41:39 +0000
> 
> 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: [email protected]
> For additional commands, e-mail: [email protected]
> 
                                          

Reply via email to