Skip to content

Commit

Permalink
Merge pull request #49 from PhilippvK/osx-dl-jre
Browse files Browse the repository at this point in the history
OSX: Download JRE with Maven to bundle it into 'Playforia Minigolf Client.app'
  • Loading branch information
PhilippvK authored Sep 6, 2020
2 parents 086f444 + 18f30d4 commit 46f610f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
.mvn/wrapper/maven-wrapper.jar
25 changes: 25 additions & 0 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<properties>
<project.mainClass>org.moparforia.client.Launcher</project.mainClass>
<project.name>Playforia Minigolf Client</project.name>
<project.download.directory>${project.build.directory}/downloads</project.download.directory>
<project.jre.osx.link>https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09.1/OpenJDK8U-jre_x64_mac_hotspot_8u252b09.tar.gz</project.jre.osx.link>
<project.jre.osx.name>jdk8u252-b09-jre</project.jre.osx.name>
</properties>

<dependencies>
Expand Down Expand Up @@ -65,6 +68,26 @@
</configuration>
</plugin>

<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<id>download-osx-jre</id>
<phase>package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>${project.jre.osx.link}</url>
<unpack>true</unpack>
<outputDirectory>${project.download.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>sh.tak.appbundler</groupId>
<artifactId>appbundle-maven-plugin</artifactId>
Expand All @@ -74,6 +97,7 @@
<iconFile>src/main/resources/icons/playforia.icns</iconFile>
<mainClass>${project.mainClass}</mainClass>
<generateDiskImageFile>true</generateDiskImageFile>
<jrePath>${project.download.directory}/${project.jre.osx.name}</jrePath>
</configuration>
<executions>
<execution>
Expand All @@ -85,6 +109,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
Expand Down

0 comments on commit 46f610f

Please sign in to comment.