georchestra / georchestra-gateway

GNU General Public License v3.0
0 stars 5 forks source link

maven/build - adds a debian packaging profile #111

Closed pmauduit closed 5 months ago

pmauduit commented 5 months ago

This allow to generate a debian package using the following command:

% mvn clean package deb:package -PdebianPackage -pl gateway

at the root of the repository.

Here is an example of generated package:

% dpkg-deb --contents gateway/target/georchestra-gateway_99.main.202403201300\~638e3c8-1_all.deb
drwxr-xr-x root/root         0 2024-03-20 14:01 ./
drwxr-xr-x root/root         0 2024-03-20 14:01 ./usr/
drwxr-xr-x root/root         0 2024-03-20 14:01 ./usr/share/
drwxr-xr-x root/root         0 2024-03-20 14:01 ./usr/share/doc/
drwxr-xr-x root/root         0 2024-03-20 14:01 ./usr/share/doc/georchestra-gateway/
-rw-r--r-- root/root       187 2024-03-20 14:01 ./usr/share/doc/georchestra-gateway/copyright
drwxr-xr-x root/root         0 2024-03-20 14:01 ./usr/share/lib/
drwxr-xr-x root/root         0 2024-03-20 14:01 ./usr/share/lib/georchestra-gateway/
-rw-r--r-- root/root        11 2024-03-20 14:01 ./usr/share/lib/georchestra-gateway/georchestra-gateway-23.1-SNAPSHOT.inc
-rw-r--r-- root/root  47732260 2024-03-20 14:01 ./usr/share/lib/georchestra-gateway/georchestra-gateway.jar
lrwxrwxrwx root/root         0 2024-03-20 14:01 ./usr/share/lib/georchestra-gateway/georchestra-gateway.inc -> georchestra-gateway-23.1-SNAPSHOT.inc

Note: As opposed to what is generally done in georchestra/georchestra, we decided to drop the git clone datadir, as people generally set up their infra by doing a git clone by themselves of their datadir, so having a default configuration provided in /etc/georchestra is not necessary.

Note2: the modification on the Java file is unrelated and is due to the maven formatter plugin.

Tests: uploaded the .deb into a docker container, then dpkg -i and trying to launch via java -jar georchestra-gateway.jar, the webapp is able to launch.