Linux packaging with Maven

This commit is contained in:
Antonin Delpeuch 2018-09-20 14:35:54 +01:00
parent c812b6118c
commit 31436a12d8
5 changed files with 167 additions and 2 deletions

View File

@ -0,0 +1,38 @@
#
# Butterfly Configuration
#
# NOTE: properties passed to the JVM using '-Dkey=value' from the command line
# override the settings in this file.
# indicates the URL path where butterfly is available in the proxy URL space
# as there is no way of knowing otherwise as this information is not
# transferred thru the HTTP protocol or otherwise (different story if
# the appserver is connected thru a different protocol such as AJP)
butterfly.url = /
# ---------- Extensions -------------
butterfly.default.mountpoint = /extension
# ---------- Miscellaneous ----------
#butterfly.locale.language = en
#butterfly.locale.country = US
#butterfly.timeZone = GMT+09:00
# ---------- Module ------
butterfly.modules.path = modules
butterfly.modules.path = extensions
# Add more paths here if your extensions live elsewhere.
# Relative paths are relative to refine/main/webapp/
butterfly.modules.wirings = WEB-INF/modules.properties
#butterfly.modules.ignore = extensions,.*-whatever
# ---------- Clustering ----
#butterfly.routing.cookie.maxage = -1

72
packaging/linux.xml Normal file
View File

@ -0,0 +1,72 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>linux-${project.version}</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>${project.build.finalName}-${project.version}</baseDirectory>
<fileSets>
<fileSet>
<directory>${rootdir}/server/target/lib</directory>
<outputDirectory>server/target/lib</outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>${rootdir}/main/webapp</directory>
<outputDirectory>webapp</outputDirectory>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/butterfly.properties</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${rootdir}/licenses</directory>
<outputDirectory>licenses</outputDirectory>
</fileSet>
<fileSet>
<directory>${rootdir}/licenses</directory>
<outputDirectory>licenses</outputDirectory>
</fileSet>
<fileSet>
<directory>${rootdir}/extensions</directory>
<outputDirectory>webapp/extensions</outputDirectory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/target/**</exclude>
<exclude>**/tests/**</exclude>
<exclude>**/src/**</exclude>
<exclude>**/*.java</exclude>
</excludes>
</fileSet>
</fileSets>
<!-- TODO replace $VERSION by ${project.version} in WEB-INF/web.xml -->
<files>
<file>
<source>${rootdir}/refine</source>
<fileMode>755</fileMode>
</file>
<file>
<source>${rootdir}/refine.ini</source>
</file>
<file>
<source>${rootdir}/README.md</source>
</file>
<file>
<source>${rootdir}/LICENSE.txt</source>
</file>
<file>
<source>${rootdir}/packaging/butterfly.properties</source>
<outputDirectory>webapp/WEB-INF</outputDirectory>
</file>
<file>
<source>${rootdir}/server/target/openrefine-${project.version}-server.jar</source>
<outputDirectory>server/target/lib</outputDirectory>
</file>
</files>
</assembly>

55
packaging/pom.xml Normal file
View File

@ -0,0 +1,55 @@
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openrefine</groupId>
<artifactId>packaging</artifactId>
<packaging>pom</packaging>
<version>3.0-SNAPSHOT</version>
<name>OpenRefine - packaging</name>
<description>Creates packages for all supported operating systems</description>
<url>http://openrefine.org/</url>
<parent>
<groupId>org.openrefine</groupId>
<artifactId>openrefine</artifactId>
<version>3.0-SNAPSHOT</version>
</parent>
<properties>
<rootdir>${basedir}/..</rootdir>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>package-distributions</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>linux.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>server</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -15,6 +15,7 @@
<module>main</module>
<module>server</module>
<module>extensions</module>
<module>packaging</module>
</modules>
<properties>
@ -149,7 +150,6 @@
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>

View File

@ -28,7 +28,7 @@
</scm>
<build>
<finalName>openrefine-server</finalName>
<finalName>openrefine-${project.version}-server</finalName>
<resources>
<resource>
<directory>src</directory>