Using Maven Embedded GlassFish Plugin 4.x


It seems the way I used to work with embedded-glassfish is changed.

references

maven-embedded-glassfish-plugin

<plugin>
  <groupId>org.glassfish.embedded</groupId>
  <artifactId>maven-embedded-glassfish-plugin</artifactId>
  <version>4.0</version>
  <configuration>
    <port>8080</port>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>deploy</goal>
      </goals>
      <phase>none</phase>
      <configuration>
        <app>target/${project.build.finalName}.${project.packaging}</app>
        <contextRoot>/</contextRoot>
      </configuration>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>org.glassfish.main.extras</groupId>
      <artifactId>glassfish-embedded-all</artifactId>
      <version>4.1</version>
    </dependency>
  </dependencies>
</plugin>

embedded-glassfish:run

$ mvn embedded-glassfish:run
...
Hit ENTER to redeploy, X to exit
_

Now whenever you build your war, you just hit the Enter to redeploy.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s