Skip to content
This repository was archived by the owner on Dec 3, 2017. It is now read-only.

Quick Start

Ralph Schaer edited this page Jan 19, 2017 · 23 revisions

Add this plugin configuration to the plugins section in the pom.xml of your web application project. The packaging of the project should be war.

<build>
 <plugins>  
  ...
  <plugin>
    <groupId>ch.rasc</groupId>
    <artifactId>embeddedtc-maven-plugin</artifactId>
    <version>1.21</version>
    <executions>
      <execution>
        <goals>  
          <goal>package-tcwar</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
  ...
 </plugins>
</build> 	

The plugin runs during the package phase. mvn package creates a war and in the same directory a jar file with the name <artifactId>-<version>-embeddedtc.jar. The jar is about 5 MB bigger in size than the war file because of the embedded Tomcat classes.

The command java -jar app-1.0-embeddedtc.jar starts Tomcat 7 on port 8080 and deploys the war to the ROOT context.

Clone this wiki locally