Support windows_dist & linux_dist for packaging (#2498)
* support windows_dist & linux_dist * move plugins from profiles to pluginManagement Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
This commit is contained in:
parent
da21c285ef
commit
e26178e0b4
@ -21,6 +21,80 @@
|
|||||||
<mac.jre.path>/opt/jre1.8.0_181.jre</mac.jre.path>
|
<mac.jre.path>/opt/jre1.8.0_181.jre</mac.jre.path>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>default</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>sh.tak.appbundler</groupId>
|
||||||
|
<artifactId>appbundle-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>package-distributions</id>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>linux.xml</descriptor>
|
||||||
|
<descriptor>windows.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>linux</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>package-distributions</id>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>linux.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>windows</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>package-distributions</id>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>windows.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -255,93 +329,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>sh.tak.appbundler</groupId>
|
|
||||||
<artifactId>appbundle-maven-plugin</artifactId>
|
|
||||||
<version>1.2.0</version>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-archiver</artifactId>
|
|
||||||
<version>4.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.velocity</groupId>
|
|
||||||
<artifactId>velocity-tools</artifactId>
|
|
||||||
<version>2.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<configuration>
|
|
||||||
<mainClass>com.google.refine.Refine</mainClass>
|
|
||||||
<bundleName>OpenRefine</bundleName>
|
|
||||||
<buildDirectory>target/OpenRefine ${project.version}</buildDirectory>
|
|
||||||
<iconFile>${icon.path}</iconFile>
|
|
||||||
<generateDiskImageFile>true</generateDiskImageFile>
|
|
||||||
<diskImageFile>${project.build.directory}/${project.build.finalName}-mac-${project.version}.dmg</diskImageFile>
|
|
||||||
<jvmVersion>1.8</jvmVersion>
|
|
||||||
<jrePath>${mac.jre.path}</jrePath>
|
|
||||||
<jvmOptions>
|
|
||||||
<param>-Xms512M</param>
|
|
||||||
<param>-Xmx2048M</param>
|
|
||||||
<param>-Drefine.version=${project.version}</param>
|
|
||||||
<param>-Drefine.webapp=$APP_ROOT/Contents/Resources/webapp</param>
|
|
||||||
</jvmOptions>
|
|
||||||
<additionalResources>
|
|
||||||
<fileSet>
|
|
||||||
<directory>target</directory>
|
|
||||||
<includes>
|
|
||||||
<include>OpenRefine.app/Contents/Resources/webapp/**/**</include>
|
|
||||||
</includes>
|
|
||||||
</fileSet>
|
|
||||||
</additionalResources>
|
|
||||||
<additionalBundledClasspathResources>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${rootdir}/server/target/lib/</directory>
|
|
||||||
<includes>
|
|
||||||
<include>*.jar</include>
|
|
||||||
</includes>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${rootdir}/server/target</directory>
|
|
||||||
<includes>
|
|
||||||
<include>openrefine-${project.version}-server.jar</include>
|
|
||||||
</includes>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/lib/**</exclude>
|
|
||||||
<exclude>**/org/**</exclude>
|
|
||||||
</excludes>
|
|
||||||
</fileSet>
|
|
||||||
</additionalBundledClasspathResources>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>bundle</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<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>
|
|
||||||
<descriptor>windows.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
@ -383,6 +370,94 @@
|
|||||||
</lifecycleMappingMetadata>
|
</lifecycleMappingMetadata>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<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>
|
||||||
|
<!-- TBD -->
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>sh.tak.appbundler</groupId>
|
||||||
|
<artifactId>appbundle-maven-plugin</artifactId>
|
||||||
|
<version>1.2.0</version>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-archiver</artifactId>
|
||||||
|
<version>4.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
<artifactId>velocity-tools</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>com.google.refine.Refine</mainClass>
|
||||||
|
<bundleName>OpenRefine</bundleName>
|
||||||
|
<buildDirectory>target/OpenRefine ${project.version}</buildDirectory>
|
||||||
|
<iconFile>${icon.path}</iconFile>
|
||||||
|
<generateDiskImageFile>true</generateDiskImageFile>
|
||||||
|
<diskImageFile>
|
||||||
|
${project.build.directory}/${project.build.finalName}-mac-${project.version}.dmg
|
||||||
|
</diskImageFile>
|
||||||
|
<jvmVersion>1.8</jvmVersion>
|
||||||
|
<jrePath>${mac.jre.path}</jrePath>
|
||||||
|
<jvmOptions>
|
||||||
|
<param>-Xms512M</param>
|
||||||
|
<param>-Xmx2048M</param>
|
||||||
|
<param>-Drefine.version=${project.version}</param>
|
||||||
|
<param>-Drefine.webapp=$APP_ROOT/Contents/Resources/webapp</param>
|
||||||
|
</jvmOptions>
|
||||||
|
<additionalResources>
|
||||||
|
<fileSet>
|
||||||
|
<directory>target</directory>
|
||||||
|
<includes>
|
||||||
|
<include>OpenRefine.app/Contents/Resources/webapp/**/**</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
</additionalResources>
|
||||||
|
<additionalBundledClasspathResources>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${rootdir}/server/target/lib/</directory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${rootdir}/server/target</directory>
|
||||||
|
<includes>
|
||||||
|
<include>openrefine-${project.version}-server.jar</include>
|
||||||
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/lib/**</exclude>
|
||||||
|
<exclude>**/org/**</exclude>
|
||||||
|
</excludes>
|
||||||
|
</fileSet>
|
||||||
|
</additionalBundledClasspathResources>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>bundle</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
16
refine
16
refine
@ -387,7 +387,21 @@ dist() {
|
|||||||
get_version $1
|
get_version $1
|
||||||
mvn_prepare
|
mvn_prepare
|
||||||
"$MVN" versions:set -DnewVersion="$VERSION"
|
"$MVN" versions:set -DnewVersion="$VERSION"
|
||||||
mvn package
|
"$MVN" package
|
||||||
|
}
|
||||||
|
|
||||||
|
windows_dist() {
|
||||||
|
get_version $1
|
||||||
|
mvn_prepare
|
||||||
|
"$MVN" versions:set -DnewVersion="$VERSION"
|
||||||
|
"$MVN" package -P windows
|
||||||
|
}
|
||||||
|
|
||||||
|
linux_dist() {
|
||||||
|
get_version $1
|
||||||
|
mvn_prepare
|
||||||
|
"$MVN" versions:set -DnewVersion="$VERSION"
|
||||||
|
"$MVN" package -P linux
|
||||||
}
|
}
|
||||||
|
|
||||||
# Kept just in case someone wants to follow this workflow on a mac,
|
# Kept just in case someone wants to follow this workflow on a mac,
|
||||||
|
Loading…
Reference in New Issue
Block a user