开发者

Hierarchy of project in maven

开发者 https://www.devze.com 2023-02-14 19:55 出处:网络
Situation with inheritance in maven. I want create hierarchy of projects. Something like main POM <- module1 <- modu开发者_如何学编程le2.

Situation with inheritance in maven. I want create hierarchy of projects. Something like main POM <- module1 <- modu开发者_如何学编程le2.

I trying in my main POM to define module1 with <module> module1</module>. In module2 i define parent POM with <parent> tag. But after comand "mvn clean package" in main project folder, there is no jar created in the module2 directory.

can someone explain me what i have to do. Thanks.


You can install the child project into your local repository and include it in the list of dependencies in your parent project. If you're not making changes often to the child project then I've found the install+refresh is quicker overall than having your IDE constantly scanning multiple projects to resolve dependencies.


module1 must have POM packaging

And there you have your answer. Only modules with POM packaging can contain other modules.

0

精彩评论

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