The key word there is "dependent". Dependencies are what Maven does best.
If both projects are under Maven control, you can build the dependency using one of the repository-related goals (such as "mvn install") and it will copy the target and POM info to your repository where you can list it as a dependency in the other project in the usual way.
However, WARs can't, strictly speaking, depend on other WARs. J2EE doesn't work that way, regardless of what Maven might allow. Most commonly what people really mean is that they have common code, in which case it's usually recommended to make that common code into a JAR and make that JAR a dependency of both WARs.
Of course, if what you really want is simply to ensure that you have built the latest versions, you can define a POM project which includes both WARs as dependencies.
An IDE is no substitute for an Intelligent Developer.
Joined: Jul 04, 2004
Got it right with the dependent tag though i am not sure why it didnt come around the first time i made the changes..
I exited from the command prompt and then opened a new one and it worked fine..
I do agree that 1 war dependent on another is a bad idea but unfortunately things are that way and its out of my control and cant help it; ideally i would have preferred a dependent jar and not a war.