开发者

java maven rebuild dependency

开发者 https://www.devze.com 2023-01-29 06:35 出处:网络
I have a project which has dependency A. Project is packing into WAR and dependency开发者_StackOverflow中文版 A - into jar.

I have a project which has dependency A. Project is packing into WAR and dependency开发者_StackOverflow中文版 A - into jar. And another dependency B, which also depends on A. I want to pack project and when project B is packing it must rebuild its dependency A instead of getting compiled dependency. Please help, how can i achieve this


Always perform a clean when doing an install, ie mvn clean install. This will make sure that all modules in the project are rebuilt, packaged, and installed in the local .m2 repository for inclusion by parent dependencies and projects.


What you may want is a multi-module project containing your three projects (WAR, A and B). Then you can run mvn package on the multi-module project and it will build and package all of the latest project code against each other without having to run mvn install to update the dependencies in your local repository first.

0

精彩评论

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