maven dependency and war file
Hello...
I have two projects A and B
B depends on A.
If I make any changes on project A and run mvn install on project B, the changes from project A does not get included to war file for project B.
However, if I run mvn install on project A and then run mvn install on project B, the changes from project A gets included to war file for project B.
Is this normal? Is there any way to get project B updated with project A with running mvn install on project A?
Re: maven dependency and war file
For sure this is normal. If you do not mvn install the project A Maven won't use it as a dependency in others. If you develop in any better IDE (Netbeans, Eclipse, IntelliJ) they all all support some Maven extension (for Eclipse it is called Workspace Resolution) overriding the normal Maven dependencies if there's some project having the same coordinates (groupid, artifactid, version) which simplifies the development.
If you have multiple Maven projects that all depend on each other and must be build together it is best practice to combine them by a parent module (a so called reactor project). Just look for inheritance in Maven documentation.