users@glassfish.java.net

Re: maven-embedded-glassfish-plugin 3.1 Examples and Setup

From: Bhavanishankar <bhavanishankara.sapaliga_at_oracle.com>
Date: Wed, 20 Apr 2011 20:47:59 +0530

Hope this will be helpful:

http://weblogs.java.net/blog/bhavanishankar/archive/2011/03/06/get-started-maven-plugin-embedded-glassfish-server-open-source-edition-31

_Bhavani.

On 04/17/2011 08:33 PM, forums_at_java.net wrote:
> In trying to switch our Maven project from a WAR type of project to an
> EAR
> type of project, we are moving to use the
> maven-embedded-glassfish-plugin
> version 3.1 with Glassfish 3.1 inside of Netbeans. Right now I am using
> the latest Netbeans development build which seems pretty stable.
>
> Due to lack of experience on the plugin and how to integrate it into
> Netbeans, we could use some help and examples. Though I can find some
> high level plugin documentation, I can not find a single example that
> has a
> good Netbeans/Glassfish setup for an EAR project. Can somebody send
> me one
> or point me in the right direction to one?</p>
>
> It would be nice to have a build recompile the project, and
> redistribute to a
> Glassfish that it would bring up if necessary. I can not seem to get
> these both to work with the "Run" target during the install phase as
> it does
> not seem to recompile when I put it in. See what I am doing below.
>
> Also we are in need to deploy our application as the root for the web
> server
> (meaning http://localhost:8080 rather than
> http://localhost:8080/jobbank-web/). For some reason
> <contextRoot> below does not seem to work. Do I also need to set this
> up in EAR's sun-application.xml file?
>
> It is being hard for me to find good documentation or examples on how
> to do
> these things.
>
> Thank you for your ideas.
>
> JohnE
>
>
>
> <pre>
>
> <code>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.glassfish</groupId>
>
> <artifactId>maven-embedded-glassfish-plugin</artifactId>
> <version>3.1</version>
> </plugin>
> </plugins>
> </pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.glassfish</groupId>
>
> <artifactId>maven-embedded-glassfish-plugin</artifactId>
> <configuration>
> <contextRoot>/</contextRoot>
> </configuration>
> <executions>
> <execution>
> <phase>install</phase>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
> </code>
>
>
>
>
> --
>
> [Message sent by forum member 'jeichels']
>
> View Post: http://forums.java.net/node/792756
>
>

-- 
Sun, an Oracle Company