Strabon
changeset 829:674f8f91162b
Added an <endpoint-exec> module. This module builds an executable jar file with an embedded Apache Tomcat 7.
To create and run the executable jar just type:
$ mvn clean package
$ java -jar endpoint-exec/target/strabon-endpoint-executable-*.jar
(Copying usage from http://tomcat.apache.org/maven-plugin-2.0/executable-war-jar.html)
Usage: java -jar [path to your exec war jar]
-ajpPort <ajpPort> ajp port to use
-clientAuth enable client authentication for https
-D <arg> key=value
-extractDirectory <extractDirectory> path to extract war content, default value: .extract
-h,--help help
-httpPort <httpPort> http port to use
-httpProtocol <httpProtocol> http protocol to use: HTTP/1.1 or org.apache.coyote.http11.Http11Nio Protocol
-httpsPort <httpsPort> https port to use
-keyAlias <keyAlias> alias from keystore for ssl
-loggerName <loggerName> logger to use: slf4j to use slf4j bridge on top of jul
-obfuscate <password> obfuscate the password and exit
-resetExtract clean previous extract directory
-serverXmlPath <serverXmlPath> server.xml to use, optional
-X,--debug debug
To create and run the executable jar just type:
$ mvn clean package
$ java -jar endpoint-exec/target/strabon-endpoint-executable-*.jar
(Copying usage from http://tomcat.apache.org/maven-plugin-2.0/executable-war-jar.html)
Usage: java -jar [path to your exec war jar]
-ajpPort <ajpPort> ajp port to use
-clientAuth enable client authentication for https
-D <arg> key=value
-extractDirectory <extractDirectory> path to extract war content, default value: .extract
-h,--help help
-httpPort <httpPort> http port to use
-httpProtocol <httpProtocol> http protocol to use: HTTP/1.1 or org.apache.coyote.http11.Http11Nio Protocol
-httpsPort <httpsPort> https port to use
-keyAlias <keyAlias> alias from keystore for ssl
-loggerName <loggerName> logger to use: slf4j to use slf4j bridge on top of jul
-obfuscate <password> obfuscate the password and exit
-resetExtract clean previous extract directory
-serverXmlPath <serverXmlPath> server.xml to use, optional
-X,--debug debug
author | Kostis Kyzirakos <kkyzir@di.uoa.gr> |
---|---|
date | Mon Dec 24 14:14:08 2012 +0100 (2012-12-24) |
parents | 14c05dfc64d0 |
children | 250d177995ca |
files | endpoint-exec/pom.xml endpoint/pom.xml pom.xml |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/endpoint-exec/pom.xml Mon Dec 24 14:14:08 2012 +0100 1.3 @@ -0,0 +1,98 @@ 1.4 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 1.5 + 1.6 + <modelVersion>4.0.0</modelVersion> 1.7 + 1.8 + <parent> 1.9 + <groupId>eu.earthobservatory</groupId> 1.10 + <artifactId>strabon</artifactId> 1.11 + <version>3.2.7-SNAPSHOT</version> 1.12 + </parent> 1.13 + 1.14 + <artifactId>strabon-endpoint-exec</artifactId> 1.15 + 1.16 + <name>Strabon: Executable endpoint</name> 1.17 + <description>A Strabon endpoint packaged with Tomcat 7 as a single executable jar file</description> 1.18 + <packaging>pom</packaging> 1.19 + 1.20 + <dependencies> 1.21 + <dependency> 1.22 + <groupId>eu.earthobservatory</groupId> 1.23 + <artifactId>strabon-endpoint</artifactId> 1.24 + <version>${eu.earthobservatory.version}</version> 1.25 + <type>war</type> 1.26 + <scope>compile</scope> 1.27 + </dependency> 1.28 + </dependencies> 1.29 + 1.30 + <build> 1.31 + <plugins> 1.32 + <plugin> 1.33 + <groupId>org.apache.tomcat.maven</groupId> 1.34 + <artifactId>tomcat7-maven-plugin</artifactId> 1.35 + <version>2.0</version> 1.36 + <executions> 1.37 + <execution> 1.38 + <id>tomcat-run</id> 1.39 + <goals> 1.40 + <goal>exec-war-only</goal> 1.41 + </goals> 1.42 + <phase>package</phase> 1.43 + <configuration> 1.44 + <path>/</path> 1.45 + <uriEncoding>UTF-8</uriEncoding> 1.46 + <finalName>strabon-endpoint-executable-${project.version}.jar</finalName> 1.47 + <!-- Override the default server.xml if nessecary 1.48 + <serverXml>src/main/tomcatconf/server.xml</serverXml> 1.49 + --> 1.50 + <!-- 1.51 + <extraResources> 1.52 + <extraResource> 1.53 + <directory>${basedir}/src/main/resources</directory> 1.54 + <includes> 1.55 + <include>**/log4j.xml</include> 1.56 + </includes> 1.57 + </extraResource> 1.58 + </extraResources> 1.59 + --> 1.60 + <warRunDependencies> 1.61 + <warRunDependency> 1.62 + <dependency> 1.63 + <groupId>eu.earthobservatory</groupId> 1.64 + <artifactId>strabon-endpoint</artifactId> 1.65 + <version>${eu.earthobservatory.version}</version> 1.66 + <type>war</type> 1.67 + </dependency> 1.68 + <contextPath>/</contextPath> 1.69 + </warRunDependency> 1.70 + </warRunDependencies> 1.71 + <!-- 1.72 + <extraDependencies> 1.73 + <extraDependency> 1.74 + <groupId>org.slf4j</groupId> 1.75 + <artifactId>jul-to-slf4j</artifactId> 1.76 + <version>${slf4jVersion}</version> 1.77 + </extraDependency> 1.78 + <extraDependency> 1.79 + <groupId>org.slf4j</groupId> 1.80 + <artifactId>slf4j-api</artifactId> 1.81 + <version>${slf4jVersion}</version> 1.82 + </extraDependency> 1.83 + <extraDependency> 1.84 + <groupId>org.slf4j</groupId> 1.85 + <artifactId>slf4j-log4j12</artifactId> 1.86 + <version>${slf4jVersion}</version> 1.87 + </extraDependency> 1.88 + <extraDependency> 1.89 + <groupId>log4j</groupId> 1.90 + <artifactId>log4j</artifactId> 1.91 + <version>1.2.12</version> 1.92 + </extraDependency> 1.93 + </extraDependencies> 1.94 + --> 1.95 + </configuration> 1.96 + </execution> 1.97 + </executions> 1.98 + </plugin> 1.99 + </plugins> 1.100 + </build> 1.101 +</project>
2.1 --- a/endpoint/pom.xml Tue Dec 18 12:20:31 2012 +0200 2.2 +++ b/endpoint/pom.xml Mon Dec 24 14:14:08 2012 +0100 2.3 @@ -250,23 +250,6 @@ 2.4 <autoVersionSubmodules>true</autoVersionSubmodules> 2.5 </configuration> 2.6 </plugin> 2.7 - <plugin> 2.8 - <groupId>org.apache.tomcat.maven</groupId> 2.9 - <artifactId>tomcat7-maven-plugin</artifactId> 2.10 - <executions> 2.11 - <execution> 2.12 - <id>tomcat-run</id> 2.13 - <goals> 2.14 - <goal>exec-war-only</goal> 2.15 - </goals> 2.16 - <!-- <phase>package</phase> --> 2.17 - <phase>integration-test</phase> 2.18 - <configuration> 2.19 - <enableNaming>true</enableNaming> 2.20 - </configuration> 2.21 - </execution> 2.22 - </executions> 2.23 - </plugin> 2.24 </plugins> 2.25 2.26 <pluginManagement>
3.1 --- a/pom.xml Tue Dec 18 12:20:31 2012 +0200 3.2 +++ b/pom.xml Mon Dec 24 14:14:08 2012 +0100 3.3 @@ -27,10 +27,11 @@ 3.4 <module>resultio-spatial</module> 3.5 <module>endpoint</module> 3.6 <module>endpoint-client</module> 3.7 + <module>endpoint-exec</module> 3.8 </modules> 3.9 3.10 <properties> 3.11 - <eu.earthobservatory.version>3.2.7-SNAPSHOT</eu.earthobservatory.version> 3.12 + <eu.earthobservatory.version>3.2.7-SNAPSHOT</eu.earthobservatory.version> 3.13 <sesame.version>2.6.3</sesame.version> 3.14 <aduna.appbase.version>3.5.0</aduna.appbase.version> 3.15 <!--slf4j.version>1.5.8</slf4j.version-->