Strabon

changeset 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 7c0e94008b62
children c4055a32472c
files ChangeLog endpoint-exec/pom.xml endpoint-exec/src/deb/control/control endpoint-exec/strabon-endpoint pom.xml
line diff
     1.1 --- a/ChangeLog	Wed Sep 10 11:46:14 2014 +0300
     1.2 +++ b/ChangeLog	Thu Sep 11 17:32:57 2014 +0300
     1.3 @@ -2,6 +2,11 @@
     1.4  
     1.5  	* Version 3.2.10 released.
     1.6  
     1.7 +	* Strabon goes debian v1. the endpoint-exec jar is now given in a .deb 
     1.8 +          format. By dpkg-ing it, one can run a stand alone strabon endpoint
     1.9 +          locally.
    1.10 +	  (bug #45 http://bug.strabon.di.uoa.gr/ticket/58)
    1.11 +
    1.12  	* Fixed a bug in which Strabon hanged when a unary spatial construct 
    1.13  	  had a ternary spatial construct as argument. 
    1.14  	  (bug #45 http://bug.strabon.di.uoa.gr/ticket/45
     2.1 --- a/endpoint-exec/pom.xml	Wed Sep 10 11:46:14 2014 +0300
     2.2 +++ b/endpoint-exec/pom.xml	Thu Sep 11 17:32:57 2014 +0300
     2.3 @@ -93,6 +93,45 @@
     2.4  					</execution>
     2.5  				</executions>
     2.6  			</plugin>
     2.7 +                    <plugin>
     2.8 +                                <artifactId>jdeb</artifactId>
     2.9 +                                <groupId>org.vafer</groupId>
    2.10 +                                <version>1.3</version>
    2.11 +                                <executions>
    2.12 +                                        <execution>
    2.13 +                                                <phase>package</phase>
    2.14 +                                                <goals>
    2.15 +                                                        <goal>jdeb</goal>
    2.16 +                                                </goals>
    2.17 +                                        <configuration>
    2.18 +						<skipPOMs>false</skipPOMs>
    2.19 +                                                <dataSet>
    2.20 +                                                        <data>
    2.21 +                                                                <src>${project.build.directory}/strabon-endpoint-executable-${project.version}.jar</src>
    2.22 +                                                                <type>file</type>
    2.23 +                                                                <mapper>
    2.24 +                                                                        <type>perm</type>
    2.25 +                                                                        <prefix>/usr/share/jdeb/lib</prefix>
    2.26 +                                                                </mapper>
    2.27 +                                                        </data>
    2.28 +                                                        <data>
    2.29 +                                                                <src>${basedir}/strabon-endpoint</src>
    2.30 +                                                                <type>file</type>
    2.31 +                                                                <mapper>
    2.32 +                                                                        <type>perm</type>
    2.33 +                                                                        <prefix>/usr/local/bin</prefix>
    2.34 +                                                                        <user>root</user>
    2.35 +                                                                        <group>root</group>
    2.36 +                                                                        <filemode>755</filemode>
    2.37 +                                                                </mapper>
    2.38 +                                                        </data>
    2.39 +                                                </dataSet>
    2.40 +                                        </configuration>
    2.41 +                                </execution>
    2.42 +                        </executions>
    2.43 +                        </plugin>
    2.44 +
    2.45 +
    2.46  		</plugins>
    2.47  	</build>
    2.48  </project>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/endpoint-exec/src/deb/control/control	Thu Sep 11 17:32:57 2014 +0300
     3.3 @@ -0,0 +1,8 @@
     3.4 +Package: Strabon
     3.5 +Version: 3.2.10
     3.6 +Section: strabon-endpoint
     3.7 +Priority: optional
     3.8 +Architecture: all
     3.9 +Maintainer: Manolis Karpathiotakis <manos.karpathiotakis@epfl.ch>, Kostis Kyzirakos <Kostis.Kyzirakos@cwi.nl>, Charalambos Nikolaou <charnik@di.uoa.gr>, Konstantina Bereta <konstantina.bereta@di.uoa.gr>, Georgios Garbis <ggarbis@di.uoa.gr>,  Dimitrios Bilidas <dbilidas@di.uoa.gr>, Stella Giannakopoulou <sgian@di.uoa.gr>, Panayiotis Smeros <psmeros@di.uoa.gr>, Kalliroi Dogani <kallirroi@di.uoa.gr>, Maria Karpathiotaki <mkarpat@di.uoa.gr>, Ioannis Vlachopoulos <johnvl@di.uoa.gr>, Dimitrianos Savva <dimis@di.uoa.gr>, Georgios Stamoulis <gstam@di.uoa.gr>, Kanela Kaligosi <kalkan@di.uoa.gr>
    3.10 +Description: Strabon endpoint executable
    3.11 +Distribution: Mozilla v2.0 Public Liscence
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/endpoint-exec/strabon-endpoint	Thu Sep 11 17:32:57 2014 +0300
     4.3 @@ -0,0 +1,4 @@
     4.4 +#!/bin/bash
     4.5 +
     4.6 +java -jar /usr/share/jdeb/lib/strabon-endpoint-executable-3.2.10-SNAPSHOT.jar "$@"
     4.7 +
     5.1 --- a/pom.xml	Wed Sep 10 11:46:14 2014 +0300
     5.2 +++ b/pom.xml	Thu Sep 11 17:32:57 2014 +0300
     5.3 @@ -745,6 +745,44 @@
     5.4  		        <skipTests>${skipTests}</skipTests>
     5.5  			    </configuration>
     5.6  		    </plugin>
     5.7 +
     5.8 +<!--			<plugin>
     5.9 +                                <artifactId>jdeb</artifactId>
    5.10 +                                <groupId>org.vafer</groupId>
    5.11 +                                <version>1.3</version>
    5.12 +                                <executions>
    5.13 +                                        <execution>
    5.14 +                                                <phase>package</phase>
    5.15 +                                                <goals>
    5.16 +                                                        <goal>jdeb</goal>
    5.17 +                                                </goals>
    5.18 +                                        <configuration>
    5.19 +                                                <dataSet>
    5.20 +                                                        <data>
    5.21 +                                                                <src>${project.build.directory}/${project.build.finalName}.jar</src>
    5.22 +                                                                <type>file</type>
    5.23 +                                                                <mapper>
    5.24 +                                                                        <type>perm</type>
    5.25 +                                                                        <prefix>/usr/share/jdeb/lib</prefix>
    5.26 +                                                                </mapper>
    5.27 +                                                        </data>
    5.28 +                                                        <data>
    5.29 +                                                                <src>${project.build.directory}/strabon-endpoint</src>
    5.30 +                                                                <type>file</type>
    5.31 +                                                                <mapper>
    5.32 +                                                                        <type>perm</type>
    5.33 +                                                                        <prefix>/usr/local/bin</prefix>
    5.34 +                                                                        <user>root</user>
    5.35 +                                                                        <group>root</group>
    5.36 +                                                                        <filemode>755</filemode>
    5.37 +                                                                </mapper>
    5.38 +                                                        </data>
    5.39 +                                                </dataSet>
    5.40 +                                        </configuration>
    5.41 +                                </execution>
    5.42 +                        </executions>
    5.43 +                        </plugin>
    5.44 +-->
    5.45  		</plugins>
    5.46  	</build>
    5.47  
    5.48 @@ -759,6 +797,7 @@
    5.49  					<encoding>utf8</encoding>
    5.50  				</configuration>
    5.51  			</plugin>
    5.52 +
    5.53  			<!--
    5.54  			<plugin>
    5.55  				<groupId>org.apache.maven.plugins</groupId>