hpi:run and scopes.

15 views
Skip to first unread message

James Nord

unread,
Mar 6, 2026, 5:07:37 AM (yesterday) Mar 6
to Jenkins Developers
Hi all,

Currently the maven-hpi-plugin has a way to override the scopes for plugins to include when doing a `hpi:run`.

However the only way to configure this is to edit the pom as the config is not bound to a property.

To that end I opened up https://github.com/jenkinsci/maven-hpi-plugin/pull/877 however as stated in this PR I am not convinced this is a good thing for the following reasons:

1) its too coarse grained, what about when someone does or doesn't want `optional` dependencies included (and optioanl transitive deps of plugins..)? (this would be a future enhancement I am not proposing at this time)
2) we have to maintain code that is exactly what maven would be using
3) I found very few users of this config in the jenkins github repo.  (may are obsolete plugins, several just set the default anyway, and others set it but had no need to as they had no test scoped dependencies.

So, the alternative is to just remove this code.  This also would affect the `custom-war` mojo, but I would say if you want a different dependency set there then use a `profile` rather than scope for management.

Would anyone see any reason not to remove being able to specify the scope at all?

/James

timja...@gmail.com

unread,
Mar 6, 2026, 5:16:31 AM (yesterday) Mar 6
to Jenkins Developers
Fine to remove it from my PoV

Jesse Glick

unread,
Mar 6, 2026, 9:52:15 AM (19 hours ago) Mar 6
to jenkin...@googlegroups.com
On Fri, Mar 6, 2026 at 5:07 AM 'James Nord' via Jenkins Developers <jenkin...@googlegroups.com> wrote:
what about when someone does or doesn't want `optional` dependencies included

Is that even a real use case? With a fresh `work/` dir, `mvn hpi:run` will load all plugins in test scope, in versions known to be compatible according to test coverage. If you want to test the effect of disabling certain optional dependencies, or test-scoped dependencies, just go ahead and disable them and restart. The `work/plugins/*.hpi.disabled` marker files will be respected.

CONFIDENTIALITY NOTICE: This email and any attachments contain confidential and proprietary information of CloudBees intended only for the named recipient(s). Unauthorized use or distribution is prohibited. If you received this in error, please notify the sender and delete this email.
Reply all
Reply to author
Forward
0 new messages