java maven rebuild dependency

jdevrr picture jdevrr · Dec 6, 2010 · Viewed 33.9k times · Source

I have a project which has dependency A. Project is packing into WAR and dependency 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

Answer

jgifford25 picture jgifford25 · Dec 6, 2010

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.