简体   繁体   中英

requiresDependencyResolution in a multi-module project

If you want to run a Maven goal that has requiresDependencyResolution = ResolutionScope.COMPILE in its @Mojo annotation, ie requires that all dependencies are resolved before it runs, you face a problem in a multi-module project.

If one module references another, this other module does not exist (when you start the goal with plugin:some-goal on the parent or child), and the resolution fails.

How should I use such a Maven plugin in the context of a multi-module project?

诀窍是尽可能使用requiresDependencyCollection因为它不需要构建其他模块。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM