Skip to content

Commit

Permalink
Improved Java 11 compatibility, new build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
averydonovan committed Feb 24, 2019
1 parent 210cfa3 commit 0833028
Show file tree
Hide file tree
Showing 8 changed files with 297 additions and 178 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
*.ini
.DS_Store
/slf4j-jdk14-1.7.21.jar
/SkewTVSP-*/
SkewTVSP-*.zip
Thumbs.db
1 change: 1 addition & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--illegal-access=deny
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,27 @@ Licensed under the 2-clause BSD license.
* Convert relative humidity to dew point as needed
* Calculate values such as lifting condensation level (LCL), K-index,
Total Totals, and SWEAT depending on data available
* Output high-resolution (approximately 300 DPI) plot to a PNG file
* Output high-resolution (approximately 328 DPI) plot to a PNG file

## Requirements

### Running

* Java 11 runtime (Java 8 for versions before 0.3.0)
* Desktop operating system with windowing system (e.g. Microsoft Windows,
Apple macOS, Linux with X11)
#### Version 0.3.0 and later
* For Windows: double-click on "SkewTVSP.cmd" inside installation folder

#### Versions prior to 0.3.0
* Must have Java 8 SE runtime installed
* Double-click downloaded JAR file

### Building

* Java 11 Development Kit and Java 11 runtime
* Java 11 Development Kit
* OpenJFX 11
* Apache Maven 3

Maven should pull in all required dependencies automatically.
Simply run `mvn package` to build and `mvn exec:java` to run.
Simply run `mvn clean compile package` to build and `mvn exec:java` to run.

## Citing/Acknowledging

Expand Down
25 changes: 25 additions & 0 deletions create-dist.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@echo off

call mvn org.apache.maven.plugins:maven-help-plugin:3.1.1:evaluate -Dexpression=project.version -DforceStdout -q > version.tmp
set /P version= < version.tmp
echo Creating package for version %version%

if not exist "target\SkewTVSP-%version%.jar" (
echo Running maven...
call mvn package
echo ...finished
)

if exist "SkewTVSP-%version%" rmdir /s /q SkewTVSP-%version%
jlink --output SkewTVSP-%version% --no-header-files --no-man-pages --compress=2 --strip-debug --module-path "%PATH_TO_FX_MODS%" --add-modules java.base,java.datatransfer,java.desktop,java.logging,java.management,java.naming,java.rmi,java.scripting,java.security.jgss,java.sql,java.xml,jdk.unsupported,jdk.unsupported.desktop
copy target\SkewTVSP-%version%.jar SkewTVSP-%version%\
echo @start %%~dp0bin\javaw -jar %%~dp0SkewTVSP-%version%.jar > SkewTVSP-%version%\SkewTVSP.cmd

if "%1"=="archive" (
7z a -sdel SkewTVSP-%version%.zip SkewTVSP-%version%
)

del version.tmp
set version=
set mvnversion=

3 changes: 2 additions & 1 deletion dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.mccollinsmith.donovan</groupId>
<artifactId>SkewTVSP</artifactId>
<name>Skew-T Virtual Sounding Plotter</name>
<version>0.3.0</version>
<version>0.3.0-alpha.1</version>
<url>http://github.com/donovan1983/SkewTVirtualSoundingPlotter/</url>
<inceptionYear>2016</inceptionYear>
<developers>
Expand Down Expand Up @@ -74,6 +74,7 @@
</executions>
<configuration>
<mainClass>com.mccollinsmith.donovan.skewtvsp.RunApp</mainClass>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
</plugin>
</plugins>
Expand Down
6 changes: 3 additions & 3 deletions nbactions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.6.0:java</goal>
</goals>
<properties>
<exec.args>-classpath %classpath com.mccollinsmith.donovan.skewtvsp.SkewTVSP</exec.args>
Expand All @@ -21,7 +21,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.6.0:java</goal>
</goals>
<properties>
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath com.mccollinsmith.donovan.skewtvsp.SkewTVSP</exec.args>
Expand All @@ -36,7 +36,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.6.0:java</goal>
</goals>
<properties>
<exec.args>-classpath %classpath com.mccollinsmith.donovan.skewtvsp.SkewTVSP</exec.args>
Expand Down
Loading

0 comments on commit 0833028

Please sign in to comment.