Hi!

I had more or less the same problem as you.
One of the solutions is to create a project based on modules.

You just have to create a parent pom with:

<modules>
<module>module_for_jar</module>
<module>module_for_war</module>
</modules>

Then, you have to create two subfolders with the same name as the modules
and with the m2 folder structure, each one with its own pom.

Now you just have to have in one pom a jar packaging, and in the other a war
packaging.

The last thing to do is to include the dependency of the jar created in the
jar module in the pom.xml of the war module.

That´s one solution and it works to me.

Be sure your jar module is declared first, and second, declare your war
module.

I hope I had helped you

-- 
View this message in context: 
http://www.nabble.com/mvn2%3A-war-packaging-tf2186390.html#a6078489
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to