Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX: Download JRE with Maven to bundle it into 'Playforia Minigolf Client.app' #49

Merged
merged 1 commit into from
Sep 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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