Commit b0904247 authored by Administrator's avatar Administrator

Adds automatic deployment capabilities to Tomcat execution

The run-tomcat-mysql allows the execution of the project in a Tomcat 8 server
with a MySQL database through the "cargo:run" or "cargo:start" goals. This
commit adds the fizzed-watcher-maven-plugin to provide the project with
automatic redeployment when using the aforementioned profile.

For example, executing the Maven command the application will be served in a
Tomcat server an automatically redeployed when any file changes:

mvn -DskipTest=true -Prun-tomcat-mysql cargo:start fizzed-watcher:run
parent 8696114a
......@@ -55,6 +55,7 @@
<cargo-maven2-plugin.version>1.6.2</cargo-maven2-plugin.version>
<hsqldb-maven-plugin.version>1.0.0</hsqldb-maven-plugin.version>
<maven.antrun.plugin.version>1.8</maven.antrun.plugin.version>
<fizzed-watcher-maven-plugin.version>1.0.6</fizzed-watcher-maven-plugin.version>
</properties>
<dependencies>
......@@ -506,6 +507,24 @@
<build>
<plugins>
<plugin>
<groupId>com.fizzed</groupId>
<artifactId>fizzed-watcher-maven-plugin</artifactId>
<version>${fizzed-watcher-maven-plugin.version}</version>
<configuration>
<skipTouch>true</skipTouch>
<watches>
<watch>
<directory>src/main</directory>
</watch>
</watches>
<goals>
<goal>package</goal>
<goal>cargo:redeploy</goal>
</goals>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment