开发者

Maven depend on project - no jar but classes

I have a multi-module Maven project A. There are two modules: B and C, where C depends on B.

Let's say C is a web application, so by default B.jar would be included in the WEB-INF/lib directory of C.

But instead of this, I want to compile B, and then move its compiled classes to the target directory 开发者_Python百科of C.

How can I achieve this in Maven?

Thank you for your answers,

balázs


If your module B is also a webapp module, you can create a jar file containing only the classes simply by configuring the war plugin. You can then make C depend on that -classes artifact by adding <classifier>classes</classifier> to the pom.

Otherwise you can use the dependency plugin to unpack the B artifact when C is packaged.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜