Issue #18: Updating packaging to work more reliably.

This commit is contained in:
Brendan Robert 2016-02-06 15:58:45 -06:00
parent af1bdb6b35
commit b28a39a059

89
pom.xml
View File

@ -12,37 +12,17 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>jace.JaceApplication</mainClass> <mainClass>jace.JaceApplication</mainClass>
<netbeans.hint.license>apache20</netbeans.hint.license>
</properties> </properties>
<organization> <organization>
<name>badvision</name> <!-- Used as the 'Vendor' for JNLP generation -->
<name>org.badvision</name>
</organization> </organization>
<build> <build>
<finalName>Jace</finalName>
<plugins> <plugins>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.1.2</version>
<configuration>
JavaAppleComputerEmulator
<mainClass>jace.JaceApplication</mainClass>
<!-- only required if signing the jar file -->
<keyStoreAlias>example-user</keyStoreAlias>
<keyStorePassword>example-password</keyStorePassword>
<allPermissions>true</allPermissions>
<bundleType>ALL</bundleType>
</configuration>
<executions>
<execution>
<id>package</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
@ -62,21 +42,19 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version> <version>1.4.0</version>
<executions> <executions>
<execution> <execution>
<id>unpack-dependencies</id> <id>unpack-dependencies</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<executable>${java.home}/../bin/javafxpackager</executable> <executable>${java.home}/../bin/javapackager</executable>
<arguments> <arguments>
<argument>-createjar</argument> <argument>-createjar</argument>
<argument>-nocss2bin</argument> <argument>-nocss2bin</argument>
@ -91,66 +69,17 @@
</arguments> </arguments>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>default-cli</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<commandlineArgs>${runfx.args}</commandlineArgs>
</configuration>
</execution>
</executions> </executions>
</plugin>--> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
<compilerArguments>
<bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
</compilerArguments>
</configuration> </configuration>
<version>3.5</version>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${java.home}/lib/jfxrt.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
<!-- BEGIN -->
<!-- https://ivan-site.com/2012/05/download-oracle-java-jre-jdk-using-a-script/ -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>jace.JaceApplication</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<!-- END -->
</plugins> </plugins>
</build> </build>