Closed bckfnn closed 10 years ago
AIUI this is just the way Maven plugins work.
I have no idea if it's possible to get the plugin to use the dependencies of the project you are using it in, as opposed to the plugin itself, but I doubt it.
When a plugin runs, Maven provides it only with a classpath that corresponds to the dependencies of the plugin, not of the project it is being used in.
We had to do some hackery in the maven plugin just to add src/main/resources to the classpath (see plugin code).
The new archetype creates a pom.xml that allows you to override the vertx version in your own pom.xml now.
At the moment running a module with vertx:runMod (and runModXXX as well) will use the version of vertx that the plugin is compiled with and not the version that is specified in the modules pom.xml
In the testcase https://github.com/bckfnn/versionfromplugin the pom is set to use vertx 2.0.0 and plugin 2.0.1 but when executing
a stdout.println show that it is 2.1M1 that is available on the module's classpath.
Showhow it must be possible to specify what version of vertx that is used and the most obvious place would be in the normal dependencies that was used when compiling the module.