How to compile dependency in maven?

后端 未结 3 1524
暖寄归人
暖寄归人 2020-12-15 07:05

Scenario:

I have a main level project A and within A , two child projects B and C worked on by different developers , but they agree on the abstraction through comm

3条回答
  •  自闭症患者
    2020-12-15 07:34

    If you want to build B and automatically build it's dependencies you can use the advanced options of the maven reactor like –-also-make-dependents .

    mvn clean install –-projects B –-also-make 
    

    Or short

    mvn clean install -pl B -am
    

    That will compile all submodules of A whose B depends on . There are a useful post on sonatype blog on the advanced options of maven reactor. http://www.sonatype.com/people/2009/10/maven-tips-and-tricks-advanced-reactor-options/

提交回复
热议问题