From 707781600f84a483b489aeaff659f8e8551921fb Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sun, 29 Jul 2018 19:50:53 +0200 Subject: [PATCH] Use openjfx dependencies from maven central * Can use the release flag of maven-compiler-plugin again * Make the openjfx dependencies as provided, so that they don't end up in pmd-bin-*.zip --- pmd-dist/src/main/scripts/designer.bat | 14 +------ pmd-dist/src/main/scripts/run.sh | 30 +-------------- pmd-ui/pom.xml | 51 +++++++++++++++++++++----- 3 files changed, 43 insertions(+), 52 deletions(-) diff --git a/pmd-dist/src/main/scripts/designer.bat b/pmd-dist/src/main/scripts/designer.bat index c19b4532f1..f274809ac2 100644 --- a/pmd-dist/src/main/scripts/designer.bat +++ b/pmd-dist/src/main/scripts/designer.bat @@ -3,16 +3,4 @@ set TOPDIR=%~dp0.. set OPTS= set MAIN_CLASS=net.sourceforge.pmd.util.fxdesigner.DesignerStarter - -:: sets the jver variable to the java version, eg 901 for 9.0.1+x or 180 for 1.8.0_171-b11 -for /f tokens^=2-4^ delims^=.-_+^" %%j in ('java -fullversion 2^>^&1') do set /A jver="%%j%%k%%l" - -if "%jver%" GEQ "900" ( - :: enable reflection - Set jreopts=--add-opens javafx.controls/javafx.scene.control.skin=ALL-UNNAMED -) else ( - Set jreopts= -) - - -java %jreopts% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %* +java -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %* diff --git a/pmd-dist/src/main/scripts/run.sh b/pmd-dist/src/main/scripts/run.sh index 5cd03fb76a..908f8f6c98 100755 --- a/pmd-dist/src/main/scripts/run.sh +++ b/pmd-dist/src/main/scripts/run.sh @@ -74,34 +74,6 @@ check_lib_dir() { fi } -jre_specific_vm_options() { - full_ver=$(java -version 2>&1) - # java_ver is eg "18" for java 1.8, "90" for java 9.0, "100" for java 10.0.x - java_ver=$(echo $full_ver | sed -n '{ - # replace early access versions, e.g. 11-ea with 11.0.0 - s/-ea/.0.0/ - # replace versions such as 10 with 10.0.0 - s/version "\([0-9]\{1,\}\)"/version "\1.0.0"/ - # extract the major and minor parts of the version - s/^.* version "\(.*\)\.\(.*\)\..*".*$/\1\2/p - }') - options="" - - if [ "$java_ver" -ge 90 ] && [ "${APPNAME}" = "designer" ] - then # open internal module of javafx to reflection (for our TreeViewWrapper) - options="--add-opens javafx.controls/javafx.scene.control.skin=ALL-UNNAMED" - # The rest here is for RichtextFX - options+=" --add-opens javafx.graphics/javafx.scene.text=ALL-UNNAMED" - options+=" --add-opens javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED" - options+=" --add-opens javafx.graphics/com.sun.javafx.text=ALL-UNNAMED" - options+=" --add-opens javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED" - # Warn of remaining illegal accesses - options+=" --illegal-access=warn" - fi - - echo $options -} - readonly APPNAME="${1}" if [ -z "${APPNAME}" ]; then usage @@ -156,5 +128,5 @@ cygwin_paths java_heapsize_settings -java ${HEAPSIZE} $(jre_specific_vm_options) -cp "${classpath}" "${CLASSNAME}" "$@" +java ${HEAPSIZE} -cp "${classpath}" "${CLASSNAME}" "$@" diff --git a/pmd-ui/pom.xml b/pmd-ui/pom.xml index d572e7050e..1befc3a7e1 100644 --- a/pmd-ui/pom.xml +++ b/pmd-ui/pom.xml @@ -15,6 +15,8 @@ 1.${java.version} 1.${java.version} + + 11-ea+19 @@ -29,15 +31,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - ${java.version} - ${java.version} - - - @@ -76,13 +69,51 @@ net.sourceforge.pmd pmd-core - ${project.version} net.sourceforge.pmd pmd-java ${project.version} + + + + org.openjfx + javafx-base + ${openjfx.version} + provided + + + org.openjfx + javafx-controls + ${openjfx.version} + provided + + + org.openjfx + javafx-fxml + ${openjfx.version} + provided + + + org.openjfx + javafx-graphics + ${openjfx.version} + provided + + + org.openjfx + javafx-media + ${openjfx.version} + provided + + + org.openjfx + javafx-web + ${openjfx.version} + provided + + org.fxmisc.richtext richtextfx