added a comment - From discussion with Kohsuke:
<drulli> kohsuke: can I change the scope @requiresDependencyResolution in the HPI mojo from 'runtime' to 'test'? Otherwise the dependency to Hudson core is not correctly resolved? See
:Hudson does not warn when a plug-in is build for a more recent version of Hudson (then the installed one) (Reopened) http://hudson-labs.org/issue/8509
<kohsuke> This sounds more like a bug in the hpi mojo
*** awb has joined #hudson
<kohsuke> How does changing the scope to test fix it?
<drulli> When scope is test the 'provided' dependencies are added. In runtime not.
<drulli> And hudson-core is a provided dependency in many plug-ins.
<kohsuke> Does that mean we never correctly calculated the value?
<drulli> I didn't check, but this should work only if the dependency does not use provided, see http://maven.apache.org/developers/mojo-api-specification.html
<kohsuke> If we set it to test, we now need to make sure test scope dependencies don't show up as dependencies
<drulli> At least for my plug-ins it does not work.
<drulli> I see. This will require some extra work. I'll have a look at it.
<kohsuke> Maybe we are better off resolving dependencies on our own.
<kohsuke> I had a very similar situation back in GlassFish, and in the end I felt more comfortable doing that
<kohsuke> Build the dependency graph, and cut the edges with the criteria of my choice, instead of one of four pre-built choices.
<kohsuke> The code is at http://java.net/projects/maven-antrun-extended-plugin
<drulli> Ok, I'll have a look at it...
<kohsuke> (for example when your plugin depends on another plugin in a compile dependency, and when that in turn depends on a version of Hudson core, you want to make sure that's ignored)