Having a maven project build its own dependencies?

前端 未结 7 2214
故里飘歌
故里飘歌 2021-02-13 03:40

With maven is it possible to have a top-level project who\'s packaging type is \"war\" which will build itself and all of its dependent modules (packaged as jar) and have the bu

7条回答
  •  灰色年华
    2021-02-13 04:17

    That's not really what a top-level project is for. Your WAR project has dependencies, which are the artifacts (e.g. jars) that will be included in the WAR (in WEB-INF/lib) when you run 'mvn package'. Your WAR project pom can have the top-level project as its parent, but it shouldn't be the parent of its dependencies. You may want to have that top-level project be the parent of both the WAR project and of the JAR projects that are dependencies in the WAR.

提交回复
热议问题