Strabon

annotate endpoint-exec/pom.xml @ 1355:8d50279a662c

Bug #58 : Strabon goes debian v1. endpoint-exec/pom.xml was added
to use the jdeb maven plugin to create the .deb of the stand-alone
executable jar. See more details in endpoint-exec/pom.xml.
What to do next:
1) Add dependencies. We should discuss which dependencies should be
added. (java? postgresql? how to declare them? i.e. oracle java,
default-jdk/jre or openjdk/jre? and also which versions.
Currently strabon is installed assuming that dependencies are met
already.
2) Enrich the mainClass so that new arguments are supported regarding
the connection properties instead of having an "endpoint" db for
example (or port). In other words, instead of relying solely on
connection.properties inside the executable jar, the user should
also be able to input his own connection properties via cmd.
3) The executable script/command strabon-endpoint should dynamically
adjust to the jar created. Currently it is hardcoded to
strabon-endpoint-executable-3.2.10-SNAPSHOT.jar. However, I
doubt whether this is feasible, since the script is a resource
for the package and we cannot be sure that the jdeb plugin of maven
can modify a file (via maven). Consequently, a manual solution
should be employed at least for now.

How to install:
a. The .deb package is built by executing in the base dir:
$>mvn clean install
b. then
$>sudo dpkg -i <package_name>.deb

How to execute:
Just run: $>strabon-endpoint (from any current working directory)
note: make sure that port 8080 is not in use though (will be fixed
in TODO 2).
author Giannis Vlachopoulos <johnvl@di.uoa.gr>
date Thu Sep 11 17:32:57 2014 +0300 (2014-09-11)
parents a424d0977de3
children e453684f594f
rev   line source
kkyzir@829 1 <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">
kkyzir@829 2
kkyzir@829 3 <modelVersion>4.0.0</modelVersion>
kkyzir@829 4
kkyzir@829 5 <parent>
kkyzir@829 6 <groupId>eu.earthobservatory</groupId>
kkyzir@829 7 <artifactId>strabon</artifactId>
charnik@1279 8 <version>3.2.10-SNAPSHOT</version>
kkyzir@829 9 </parent>
kkyzir@829 10
kkyzir@829 11 <artifactId>strabon-endpoint-exec</artifactId>
kkyzir@829 12
kkyzir@829 13 <name>Strabon: Executable endpoint</name>
kkyzir@829 14 <description>A Strabon endpoint packaged with Tomcat 7 as a single executable jar file</description>
kkyzir@829 15 <packaging>pom</packaging>
kkyzir@829 16
kkyzir@829 17 <dependencies>
kkyzir@829 18 <dependency>
kkyzir@829 19 <groupId>eu.earthobservatory</groupId>
kkyzir@829 20 <artifactId>strabon-endpoint</artifactId>
kkyzir@829 21 <version>${eu.earthobservatory.version}</version>
kkyzir@829 22 <type>war</type>
kkyzir@829 23 <scope>compile</scope>
kkyzir@829 24 </dependency>
kkyzir@829 25 </dependencies>
kkyzir@829 26
kkyzir@829 27 <build>
kkyzir@829 28 <plugins>
kkyzir@829 29 <plugin>
kkyzir@829 30 <groupId>org.apache.tomcat.maven</groupId>
kkyzir@829 31 <artifactId>tomcat7-maven-plugin</artifactId>
kkyzir@829 32 <version>2.0</version>
kkyzir@829 33 <executions>
kkyzir@829 34 <execution>
kkyzir@829 35 <id>tomcat-run</id>
kkyzir@829 36 <goals>
kkyzir@829 37 <goal>exec-war-only</goal>
kkyzir@829 38 </goals>
kkyzir@829 39 <phase>package</phase>
kkyzir@829 40 <configuration>
kkyzir@829 41 <path>/</path>
kkyzir@829 42 <uriEncoding>UTF-8</uriEncoding>
kkyzir@829 43 <finalName>strabon-endpoint-executable-${project.version}.jar</finalName>
kkyzir@829 44 <!-- Override the default server.xml if nessecary
kkyzir@829 45 <serverXml>src/main/tomcatconf/server.xml</serverXml>
kkyzir@829 46 -->
kkyzir@829 47 <!--
kkyzir@829 48 <extraResources>
kkyzir@829 49 <extraResource>
kkyzir@829 50 <directory>${basedir}/src/main/resources</directory>
kkyzir@829 51 <includes>
kkyzir@829 52 <include>**/log4j.xml</include>
kkyzir@829 53 </includes>
kkyzir@829 54 </extraResource>
kkyzir@829 55 </extraResources>
kkyzir@829 56 -->
kkyzir@829 57 <warRunDependencies>
kkyzir@829 58 <warRunDependency>
kkyzir@829 59 <dependency>
kkyzir@829 60 <groupId>eu.earthobservatory</groupId>
kkyzir@829 61 <artifactId>strabon-endpoint</artifactId>
kkyzir@829 62 <version>${eu.earthobservatory.version}</version>
kkyzir@829 63 <type>war</type>
kkyzir@829 64 </dependency>
kkyzir@829 65 <contextPath>/</contextPath>
kkyzir@829 66 </warRunDependency>
kkyzir@829 67 </warRunDependencies>
kkyzir@829 68 <!--
kkyzir@829 69 <extraDependencies>
kkyzir@829 70 <extraDependency>
kkyzir@829 71 <groupId>org.slf4j</groupId>
kkyzir@829 72 <artifactId>jul-to-slf4j</artifactId>
kkyzir@829 73 <version>${slf4jVersion}</version>
kkyzir@829 74 </extraDependency>
kkyzir@829 75 <extraDependency>
kkyzir@829 76 <groupId>org.slf4j</groupId>
kkyzir@829 77 <artifactId>slf4j-api</artifactId>
kkyzir@829 78 <version>${slf4jVersion}</version>
kkyzir@829 79 </extraDependency>
kkyzir@829 80 <extraDependency>
kkyzir@829 81 <groupId>org.slf4j</groupId>
kkyzir@829 82 <artifactId>slf4j-log4j12</artifactId>
kkyzir@829 83 <version>${slf4jVersion}</version>
kkyzir@829 84 </extraDependency>
kkyzir@829 85 <extraDependency>
kkyzir@829 86 <groupId>log4j</groupId>
kkyzir@829 87 <artifactId>log4j</artifactId>
kkyzir@829 88 <version>1.2.12</version>
kkyzir@829 89 </extraDependency>
kkyzir@829 90 </extraDependencies>
kkyzir@829 91 -->
kkyzir@829 92 </configuration>
kkyzir@829 93 </execution>
kkyzir@829 94 </executions>
kkyzir@829 95 </plugin>
johnvl@1355 96 <plugin>
johnvl@1355 97 <artifactId>jdeb</artifactId>
johnvl@1355 98 <groupId>org.vafer</groupId>
johnvl@1355 99 <version>1.3</version>
johnvl@1355 100 <executions>
johnvl@1355 101 <execution>
johnvl@1355 102 <phase>package</phase>
johnvl@1355 103 <goals>
johnvl@1355 104 <goal>jdeb</goal>
johnvl@1355 105 </goals>
johnvl@1355 106 <configuration>
johnvl@1355 107 <skipPOMs>false</skipPOMs>
johnvl@1355 108 <dataSet>
johnvl@1355 109 <data>
johnvl@1355 110 <src>${project.build.directory}/strabon-endpoint-executable-${project.version}.jar</src>
johnvl@1355 111 <type>file</type>
johnvl@1355 112 <mapper>
johnvl@1355 113 <type>perm</type>
johnvl@1355 114 <prefix>/usr/share/jdeb/lib</prefix>
johnvl@1355 115 </mapper>
johnvl@1355 116 </data>
johnvl@1355 117 <data>
johnvl@1355 118 <src>${basedir}/strabon-endpoint</src>
johnvl@1355 119 <type>file</type>
johnvl@1355 120 <mapper>
johnvl@1355 121 <type>perm</type>
johnvl@1355 122 <prefix>/usr/local/bin</prefix>
johnvl@1355 123 <user>root</user>
johnvl@1355 124 <group>root</group>
johnvl@1355 125 <filemode>755</filemode>
johnvl@1355 126 </mapper>
johnvl@1355 127 </data>
johnvl@1355 128 </dataSet>
johnvl@1355 129 </configuration>
johnvl@1355 130 </execution>
johnvl@1355 131 </executions>
johnvl@1355 132 </plugin>
johnvl@1355 133
johnvl@1355 134
kkyzir@829 135 </plugins>
kkyzir@829 136 </build>
kkyzir@829 137 </project>