Skip to content

Instantly share code, notes, and snippets.

@khajavi
Last active March 30, 2016 22:48
Show Gist options
  • Save khajavi/a4dcde41a4fe6c60ee7abe8c135f8264 to your computer and use it in GitHub Desktop.
Save khajavi/a4dcde41a4fe6c60ee7abe8c135f8264 to your computer and use it in GitHub Desktop.
Glassfish Embedded Deploy
mvn package embedded-glassfish:run
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.glassfish.embedded</groupId>
<artifactId>maven-embedded-glassfish-plugin</artifactId>
<version>4.0</version>
<configuration>
<autoDelete>true</autoDelete>
<port>8888</port>
</configuration>
<executions>
<execution>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<app>target/${project.build.finalName}.war</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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment