Having a maven project build its own dependencies?

前端 未结 7 2211
故里飘歌
故里飘歌 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:42

    NetBeans has an option that allows you to do exactly this with Maven projects but I don't know any pure Maven solutions. I think that the task is more suited for an IDE, because it knows for what depended projects you have the code (based of what projects you have opened in the workspace). How would Maven itself differentiate between a dependency that you want to build and one that needs to be fetched from the repository. And for those that need to be built, where should it look for the source code?

    Anyway, another solution to the problem, that I used successfully a few times, is to create a simple shell script that navigates to your projects folders and starts the build then it waits for it to finish then proceeds to the next project and so on.

提交回复
热议问题