« Form based authentif... | Main | Eclipse - JavaServer... »

Maven EAR Artefacts - web modul missing

I build a new Maven multi modul project with EJB, WEB and EAR Artifacts.

I was sure that I have added all necessary dependencies to my pom.xml files. But each time I try to install my EAR Artefact I receifed an error like this one:

....
Error message: Missing:
----------
1) org.imixs.myproject.web:jar:1.0.0
----------
1 required artifact is missing.
.....

The reason was that maven searches per default for a .jar artifact even if you try to add a WEB Modul! 

So the solution was to change the dependency in my pom.xml of my ear artifact. I just added the <type> tag to the dependency with the value "war".

Also make sure that you add the type "ejb" to each ejb artifact you add to your ear artifact!

Now maven build succeeds :-)