posted 14 years ago
You need to create a Maven project for each of the jar files that you're creating. Each of those Maven projects will create its corresponding JAR. Build the JARs using the "mvn install" goal for each jar.
Construct dependency elements in the WAR file. Once dependency element for each constructed JAR. Then when you build the WAR, Maven will retrieve the installed jars and place them in the WAR - assuming you used one of the dependency scopes that copies. Which is practically any scope except "provided".
Ant can produce multiple artifacts from a single build.xml, but Maven is different. Each POM is intended to produce one and only one artifact. You can define a master POM with dependent POMs for each of the JARS and the WAR, but no one single POM can produce multiple artifacts.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.