users@maven-glassfish-plugin.java.net

redeployment with maven-glassfish-plugin

From: janne postilista <jannepostilistat_at_gmail.com>
Date: Thu, 5 Aug 2010 10:51:10 +0300

I'm configuring automatic CI builds with maven-glassfish-plugin.

How can I redeploy my application (webapp for example) so that it works
regardless of whether the application is deployed or not?

- Goals redeploy and undeploy stop / fail my build if application is not
deployed before
- Goal deploy stops / fails my build if application IS deployed

I have also tried setting <force>true</force> but this does not get passed
on to asadmin command (maven-glassfish-plugin version 2.1 from
http://download.java.net/maven/2)

http://stackoverflow.com/questions/1836317/which-maven-glassfish-plugin-to-usealso
indicates that there's no good solution. Is this true?

"The main problem I had with the maven-glassfish-plugin is the fact that its
interaction with the Glassfish server is stateful - I could not find a way
to use it such that my WAR would get deployed to the server in any case, no
matter whether the previous build succeeded or not.glassfish:deploy does not
work if the WAR is deployed already. glassfish:redeploy does not work if the
WAR is not deployed. And Maven has no if-else logic..."