Thursday, May 3, 2012

packaging with value jar is invalid ?


While trying to build my new project using maven, I got "packaging' with value 'jar' is invalid" error.
I have a parent pom and a separate pom in each modules' folder; but in none of my pom files, I set packaging as "jar".

After googling a little, I saw that the default packaging is "jar" and in the parent pom I didn't specify any packaging type.
So it uses "jar" as packaging type of the parent which is wrong.
After adding "<packaging> pom <packaging>" to my parent pom's attributes, the maven error is gone.