Maven and skinny wars

As I explained in this post here, we used the magical Maven groovy plugin to check when our EAR gets to big, and fail the build. It works great, because now we get instant notification in our CI environment when something is amiss, which might get…um…missed. So our build has been failing lately, intermittently because the EAR has been too big.

The problem was the latest version of the Maven war plugin (2.1-alpha-2-SNAPSHOT) changes the way that skinny WARs are created for packaging in EARs. The documentation hasn’t quite made it to the website yet. Instead of using <warSourceExludes> to exclude the JARs that you do not want, you have to now use <packagingExcludes>. It’s described in this bug here.