开发者

Maven 2 - 'mvn test' does not find internal project plugin dependency

开发者 https://www.devze.com 2023-03-31 18:36 出处:网络
I have a multi-module maven project (maven 2.2.1). One of the module is a maven plugin. This plugin is bound to the compile phase of another module, and added as a direct dependency to trigger correc

I have a multi-module maven project (maven 2.2.1). One of the module is a maven plugin.

This plugin is bound to the compile phase of another module, and added as a direct dependency to trigger correct reactor ordering of module's building.

If I run 'mvn clean install' on the root module, with a fresh local repository, everything goes fine (build, test, install). (I precise that my project's artifacts are not deployed anywhere, only installed locally in my machine's local repo).

BUT if I delete my local repository, and perform 'mvn te开发者_如何学编程st', the plugin module is reported as missing ? Whereas, the build order is correct, the plugin module is built succesfully before the module using it ???

Is there any special treatment of maven module with 'maven-plugin' packaging ? I don't understand why other project inter modules dependencies are resolved correctly and not this specific one !


The problem is that a Maven Plugin must be installed into the local repository first before you can use a plugin as a dependency (or better be part of the life-cycle).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号