users@glassfish.java.net

maven-embedded-glassfish-plugin 3.1 Examples and Setup

From: <forums_at_java.net>
Date: Sun, 17 Apr 2011 10:03:10 -0500 (CDT)

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