0

I develop a Maven plugin and trying to find an easy way to test it. One of the ways is to use embedder, and it works great (I run it from JUnit). My scenario requires more real-time testing rather than maven-testing-harness approach but I use both.

But in order to use my plugin I have to install it to local repo (otherwise it can't be found). So the question is - if there's any way to run plugin by directly adding it to classpath?

I've tried to find a way to add it to classpath, no luck so far. Have a thought to configure an additional virtual repository but seems too complicated for this case.

Vladimir I
  • 111
  • 2
  • 5
  • Take a look here: https://github.com/khmarbaise/maven-it-extension Can you give more details what you mean by more real-time-testing ? – khmarbaise Jan 02 '23 at 23:16
  • I meant to use maven embedder without installing plugin in local repo. Could you be more precise - what exactly in this link might be helpful? – Vladimir I Jan 03 '23 at 20:50
  • First there is a complete documentation...HTML/PDF furthermore you have written you would like to test your plugin without installing it in your local repo (aka cache) – khmarbaise Jan 04 '23 at 07:14
  • The maven-embedded is not intended to test plugins...and as you already realized it requires to have the plugin installed in your local repo (aka cache)... – khmarbaise Jan 04 '23 at 07:17
  • The good thing about embedder, is the fact I can run it in the same jvm, which gives me ability to debug with ease. Perhaps i could add my repository implementation at runtime to load the plugin. – Vladimir I Jan 05 '23 at 12:26
  • You could simply debug a plugin within other solutions as well. Apart from that you should usually find problems using tests instead via debugging... but of course sometimes it's needed.... – khmarbaise Jan 06 '23 at 14:26

0 Answers0