Sounds like a bug to me. Maybe you should report this.
On Thu, Aug 05, 2010 at 12:05:38PM +0300, janne postilista wrote:
> What is weird is that there's talk about the force option working and when I
> look at the source code for the plugin at the fisheye site it looks like it
> would handle the force parameter. But still it does not work and asadmin
> command (which the plugin uses) has --force=false.
>
>
> On Thu, Aug 5, 2010 at 11:33 AM, Wouter van Reeven <wouter_at_van.reeven.nl>
> wrote:
>
> Yes I agree this is far from a perfect solution. It would be great if
> either there would be a "force" option that actually works, or calling
> undeploy would not throw an error that will cause Maven to exit. Your
> solution of commenting out parts in the pom might more or less work for
> a development environment, but is a pain when a continuous integration
> server like Hudson is involved. That is exactly why I turned to actually
> calling asadmin via the Ant task, so I have all the control I need
> without modifying the pom with each deployment.
>
>
> Wouter
>
> On Thu, Aug 05, 2010 at 11:27:54AM +0300, janne postilista wrote:
> > What I am using right now is that I have both goals undeploy and deploy
> > configured in my pom.xml. When I deploy a module for the very first time
> in CI
> > environment, I comment out the undeploy part. After the module has been
> > deployed once, I uncomment the undeploy so that each build does 1.
> undeploy 2.
> > deploy.
> >
> > I don't see why this would not more or less work....obviously it's very
> far
> > from perfect solution.
> >
> > On Thu, Aug 5, 2010 at 11:00 AM, Wouter van Reeven <wouter_at_van.reeven.nl>
> > wrote:
> >
> > 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
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe_at_maven-glassfish-plugin.dev.java.net
> > For additional commands, e-mail:
> > users-help_at_maven-glassfish-plugin.dev.java.net
> >
> >
> >
>
> --
> Lime and limpid green a second scene,
> A fight between the blue you once knew.
> Floating down the sound resounds
> Around the icy waters underground
> [Pink Floyd - Astronomy Domine]
>
> Skype: wvreeven
> Facebook: wvreeven
> Twitter: wvreeven
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_maven-glassfish-plugin.dev.java.net
> For additional commands, e-mail:
> users-help_at_maven-glassfish-plugin.dev.java.net
>
>
>
--
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