On Fri, Oct 23, 2020 at 7:30 AM Radek Antoniuk <
radek.a...@gmail.com> wrote:
> how can I customise the list of plugins that the test runs with
Normally you do not do anything besides have plugins of interest in
your Maven test classpath. `@WithPlugin` is tricky and rarely needed.
> to detect a missing dependency in tests?
What specifically are you trying to accomplish? Reproducing
JENKINS-64002 in a test? Not going to work (see JENKINS-41827). Your
mistake can be seen from `mvn dependency:tree`:
[INFO] +- org.jenkins-ci.plugins:p4:jar:1.3.8:compile (optional)
[INFO] | +- org.jenkins-ci.plugins:credentials:jar:2.3.13:compile (optional)
You explicitly use the `credentials` plugin’s APIs, so you should have
a direct dependency on it. (check `mvn dependency:analyze`)
In general, use `optional` dependencies only with extreme care; see
JENKINS-19508 for discussion.
BTW your plugin does not build in `master`, perhaps because #277
introduced a mistake that #290 caught, or similar.