I am using Maven projects to create deployment plan JAR files for our various
environments. I found out if the maven puts the META-INF/maven/** directory
into the deployment plan JAR file, executing the asadmin command will fail with
the following exception:
com.sun.enterprise.admin.cli.CommandException: remote failure: Exception while d
eploying the app : java.lang.NullPointerException
I was able to modify my POM and exclude the META-INF/maven/** directory from the
deployment plan JAR file. When I did this, executing the asadmin command to
deploy my application worked fine.
This is nasty little bug which fails with no explanation as to why it failed and
tracking it down to the META-INF/maven/** directory took quite a long time.