maven-hpi-plugin icon indicating copy to clipboard operation
maven-hpi-plugin copied to clipboard

Get optional plugins into hpi:run

Open KostyaSha opened this issue 8 years ago • 5 comments

Loaded additional plugins into work/plugins, but seems failed because of versions. I.e.

Failed Loading plugin Jenkins promoted builds plugin v2.27 (promoted-builds)
java.io.IOException: Jenkins promoted builds plugin v2.27 failed to load.
 - maven-plugin v2.0 is missing. To fix, install v2.0 or later.
 - Script Security Plugin v1.13 is older than required. To fix, install v1.16 or later.
 - Job DSL v1.38 is older than required. To fix, install v1.44 or later.

Any comments how to get optional deps for deps of hpi:run'ed plugin are welcome


This change is Reviewable

KostyaSha avatar Nov 11 '16 00:11 KostyaSha

@jglick @stephenc do you have any ideas?

KostyaSha avatar Nov 11 '16 00:11 KostyaSha

Oh that's going to end up a hack fest very quickly... you probably have duplicate GAs with different Vs from walking the whole tree to recover the optionals...

You'all have to do a depth priority collection and pick the highest version for non-unique artifacts (remembering that when one gets evicted because its not the latest then you also need to evict all that the evicted dependency pulled in)

(Which explains some of the logic of PDTs in my Maven 5.0.0 proposal I am working on)

stephenc avatar Nov 11 '16 19:11 stephenc

Collect all highest plugin numbers... may work...

KostyaSha avatar Nov 11 '16 19:11 KostyaSha

Until it doesn't... and if dependency trees change from version to version you'll pull in incorrect deps

stephenc avatar Nov 11 '16 19:11 stephenc

I do not recall ever having had this problem. Would it not suffice to add test-scoped dependencies on transitive deps as a workaround?

jglick avatar Oct 05 '21 17:10 jglick