users@maven-glassfish-plugin.java.net

Re: redeployment with maven-glassfish-plugin

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Thu, 5 Aug 2010 10:00:30 +0200

Hi Janne,

I was facing the same problem. To make things worse, I am involved in a
project that both contains Java EE and OpenESB/JBI components. There is
no "force" option for deploying a JBI component, even outside the
Maven GlassFish plugin.

In the end I turned to using the Maven Ant plugin and I am calling
asadmin directly. In order to check whether I should do an undeploy
first, I use the asadmin show-component-status command to check if my
Java EE app already has been deployed (or a similar command for a JBI
component).


HTH, Wouter

On Thu, Aug 05, 2010 at 10:51:10AM +0300, janne postilista wrote:
> 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-use
> also 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..."

-- 
Ring out the bells again
Like we did when spring began
Wake me up when September ends
[Greenday - Wake Me Up When September Ends]
Skype: wvreeven
Facebook: wvreeven
Twitter: wvreeven