« Escape Problem downl... | Main | Eclipse JSF/Faclet... »

Error deploying EAR on Glassfish - error expanding jar

Today I was faced again with a deployment problem on glassish. When I tried to deploy my EAR application on glassfish I got some strange errors telling me that Glassfish was not able to expand some jars in my ear. In other cases an error can be that glassfish is did not find a jar in ear.

The problem occurs only when I build my EAR with Maven inside Eclipse Ganymed on a Windows Mashine. The Reason is the missing version tag in the ear pom file

....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<version>5</version>
<modules>
.....  

I often did not use the version tag in the configuration of my maven-ear-plugin. But if you do so in Eclipse ganymede running on a windows machine the Eclipse/Maven Plugins will generate a EAR 1.3 Module! So the build process will add a wrong application.xml file into the ear.

This is strange as using eclipse on linux did not run into this configuration conflict.

anyway - do not miss the version tag in your ear pom! And if you run in the situation described here also clear your maven projects befor you run a new install. otherwise the old applicaiton.xml fill will stay in you target folder!