users@glassfish.java.net

Re: GlassFish v3 embedded in Maven?

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Sat, 24 Jan 2009 10:06:22 -0500

I think that I would want embedded GlassFish to stay running after Maven
exits. When I want to shut down embedded GlassFish I would run a second
Maven command. That is not too important to me. As long as I can run
a Maven command to start the demo, I am happy. If GlassFish runs as
part of the Maven process and completes the Maven process when it shuts
down (how to trigger this?), then that is fine too.

I recently saw something similar to this done with Ant, Jetty, and
Hypersonic DBMS. The project was the open source AtLeap CMS. I
downloaded the project and unzipped it into a folder. All of the files
and dependencies were already present under the directory tree because
it is Ant based. I executed bin/start-demo and within seconds a web
browser opened and I was able to use the software. bin/stop-demo shut
everything down. Just now I realized that those are not Ant targets.
The point is that I was able to try the software within seconds of
downloading it and without having to reading more than a paragraph of
the Quick Start Guide.

In the Maven world, you don't bundle your dependencies with the project
because Maven downloads them for you. I would want a Maven plugin to
start/stop GlassFish, not a shell script at the command prompt. This
way I could add embedded GlassFish as a dependency in a demo profile,
and configure the embedded GlassFish Maven plugin. The demo profile
could even be configured to start GlassFish by default, and open a web
browser to some URL.

What do you think?


Thanks,
Ryan


Sahoo wrote:
> So, what is the life of the glassfish server in this case? I assume it
> is tied to the maven process in which case when the maven command
> exit? Do you want maven to download glassfish as well or you want to
> configure glassfish as a system dependency in pom.xml?
>
> Thanks,
> Sahoo
>
> Ryan de Laplante wrote:
>> Hi,
>>
>> Will I be able to add a dependency line in a maven web project for
>> GlassFish v3, and configure a plugin that enables people to start
>> glassfish and run my application like they can do with Jetty today?
>> I want someone to be able to check out my project from subversion and
>> run a single command to download dependencies, compile, package, and
>> deploy into an embedded GlassFish v3, and open a web browser pointed
>> to my app.
>>
>> Thanks,
>> Ryan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>