-
Notifications
You must be signed in to change notification settings - Fork 5
Plugin Configuration
The plugin supports the following configuration options:
Specifies the file name for the executable jar. If this option is not present the name of the jar is <artifactId>-<version>-embeddedtc.jar. The following configuration creates a jar file with the name my_all_in_one.jar
<plugin>
<groupId>ch.rasc</groupId>
<artifactId>embeddedtc-maven-plugin</artifactId>
<version>1.19</version>
<executions>
<execution>
<goals>
<goal>package-tcwar</goal>
</goals>
</execution>
</executions>
<configuration>
<finalName>my_all_in_one.jar</finalName>
</configuration>
</plugin>
Controls if the plugin includes the JSP libraries into the jar file. This option is true by default. Excluding JSP support reduces the jar file size by about 2.5 MB.
<configuration>
<includeJSPSupport>false</includeJSPSupport>
</configuration>
Additional dependencies that need to be present on Tomcat's classpath are added with this configuration option.
Usually these are jdbc driver libraries if Tomcat's jdbc connection pool is used. These artifacts will be bundled into the executable jar.
<extraDependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.23</version>
</dependency>
</extraDependencies>
The executable jar can contain more than one war file. With this option additional war files are added to the jar file.
<extraWars>
<dependency>
<groupId>ch.rasc</groupId>
<artifactId>svg2img</artifactId>
<version>0.0.1</version>
<type>war</type>
</dependency>
</extraWars>
Additional resources (e.g. native libraries/programs, documents, ...) can be bundled with this option. During startup these resources will be extracted into the extra folder inside the extraction directory and a system property (EXTRA_RESOURCES_DIR) is set that contains the absolute path to this directory.
<extraResources>
<resource>
<directory>e:\native</directory>
<includes>
<include>*.exe</include>
</includes>
<excludes>
<exclude>*.dll</exclude>
</excludes>
</resource>
</extraResources>
These two configuration options specify a path to the tcnative dll for 32- and 64-bit Windows systems. If the executable jar is started on a Windows computer and the jar contains these dlls the runner extracts the dll that matches the os architecture and sets the library path to the directory where the dll resides. The embedded Tomcat is then able to use APR/native connectors and other APR features.
<includeTcNativeWin32>E:\tc\bin\tcnative-1.dll</includeTcNativeWin32>
<includeTcNativeWin64>E:\tc\bin\x64\tcnative-1.dll</includeTcNativeWin64>