Index: /applications/editors/josm/plugins/build-common.xml
===================================================================
--- /applications/editors/josm/plugins/build-common.xml	(revision 34702)
+++ /applications/editors/josm/plugins/build-common.xml	(revision 34703)
@@ -33,5 +33,12 @@
     <property name="plugin.dist.dir"        location="../../dist"/>
     <property name="java.lang.version"      value="1.8" />
+    <property name="manifest"               value="MANIFEST"/>
+    <property name="manifest.unixoid"       value="MANIFEST-unixoid"/>
+    <property name="manifest.windows"       value="MANIFEST-windows"/>
+    <property name="manifest.osx"           value="MANIFEST-osx"/>
     <property name="plugin.jar"             location="${plugin.dist.dir}/${ant.project.name}.jar"/>
+    <property name="plugin.unixoid.jar"     location="${plugin.dist.dir}/${ant.project.name}-unixoid.jar"/>
+    <property name="plugin.windows.jar"     location="${plugin.dist.dir}/${ant.project.name}-windows.jar"/>
+    <property name="plugin.osx.jar"         location="${plugin.dist.dir}/${ant.project.name}-osx.jar"/>
     <property name="plugin.sources.jar"     location="${plugin.dist.dir}/${ant.project.name}-sources.jar"/>
     <property name="plugin.javadoc.jar"     location="${plugin.dist.dir}/${ant.project.name}-javadoc.jar"/>
@@ -41,8 +48,8 @@
     <property name="ivy.version"            value="2.5.0-rc1"/>
 
-    <!-- For Windows-specific stuff -->
-    <condition property="isWindows">
-        <os family="Windows"/>
-    </condition>
+    <!-- For platform-specific stuff -->
+    <condition property="isWindows"><os family="Windows"/></condition>
+    <condition property="isUnix"><os family="Unix"/></condition>
+    <condition property="isMac"><os family="Mac"/></condition>
     <!-- For Java specific stuff by version -->
     <condition property="isJava9"><matches string="${ant.java.version}" pattern="(1.)?(9|1[0-9])" /></condition>
@@ -75,4 +82,7 @@
             <exclude name="**/*-sources.jar"/>
             <exclude name="**/*-javadoc.jar"/>
+            <exclude name="**/*-unixoid.jar" unless="isUnix"/>
+            <exclude name="**/*-windows.jar" unless="isWindows"/>
+            <exclude name="**/*-osx.jar" unless="isMac"/>
         </fileset>
         <fileset refid="plugin.requires.jars"/>
@@ -150,6 +160,8 @@
         <echo message="creating ${ant.project.name}.jar ... "/>
         <antcall target="setup-dist" />
-        <delete file="MANIFEST" failonerror="no"/>
-        <manifest file="MANIFEST" mode="update">
+        <delete failonerror="no">
+            <fileset dir="." includes="${manifest}*" />
+        </delete>
+        <manifest file="${manifest}" mode="update">
             <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
             <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
@@ -198,9 +210,11 @@
         <jar destfile="${plugin.sources.jar}" basedir="${plugin.src.dir}" level="9"/>
         <jar destfile="${plugin.javadoc.jar}" basedir="${plugin.doc.dir}" level="9"/>
-        <delete file="MANIFEST" failonerror="no"/>
+        <delete failonerror="no">
+            <fileset dir="." includes="${manifest}*" />
+        </delete>
         <antcall target="post-dist" />
     </target>
     <target name="build-jar">
-        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}" manifest="MANIFEST" manifestencoding="UTF-8" duplicate="preserve" level="9">
+        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}" manifest="${manifest}" manifestencoding="UTF-8" duplicate="preserve" level="9">
             <restrict>
                 <not><or>
@@ -225,5 +239,5 @@
     </target>
     <target name="add-manifest-attribute" depends="check-manifest-attribute" if="have-${property.name}">
-        <manifest file="MANIFEST" mode="update">
+        <manifest file="${manifest}" mode="update">
             <attribute name="${manifest.attribute}" value="${property.value}" />
         </manifest>
@@ -549,6 +563,6 @@
                     <path refid="test.classpath"/>
                 </classpath>
-				<compilerarg value="-Xlint:all"/>
-				<compilerarg value="-Xlint:-serial"/>
+                <compilerarg value="-Xlint:all"/>
+                <compilerarg value="-Xlint:-serial"/>
             </javac>
         </sequential>
@@ -611,10 +625,10 @@
                                                                          org/marvinproject/**/*.java,
                                                                          org/netbeans/**/*.java,
-																		 org/openstreetmap/josm/plugins/dataimport/io/tcx/**/*.java,
-																		 org/openstreetmap/josm/plugins/ohe/parser/**/*.java,
-																		 org/openstreetmap/josm/plugins/pdfimport/pdfbox/operators/**/*.java
-																		 org/openstreetmap/josm/plugins/roadsigns/javacc/**/*.java,
+                                                                         org/openstreetmap/josm/plugins/dataimport/io/tcx/**/*.java,
+                                                                         org/openstreetmap/josm/plugins/ohe/parser/**/*.java,
+                                                                         org/openstreetmap/josm/plugins/pdfimport/pdfbox/operators/**/*.java
+                                                                         org/openstreetmap/josm/plugins/roadsigns/javacc/**/*.java,
                                                                          org/osgeo/**/*.java,
-																		 "/>
+                                                                         "/>
             <fileset dir="${basedir}/test" includes="**/*.java" erroronmissingdir="false"/>
             <formatter type="xml" toFile="checkstyle-josm-${ant.project.name}.xml"/>
@@ -688,16 +702,16 @@
         <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
     </target>
-	<target name="clean_ivy">
-		<delete failonerror="false">
-			<fileset dir="${plugin.lib.dir}">
-				<include name="**/*.jar"/>
-				<exclude name="**/*-custom.jar" />
-			</fileset>
-		</delete>
-	</target>
-	<target name="fetch_dependencies" depends="clean_ivy, init-ivy">
-		<echo>fetching dependencies with ivy</echo>
-		<ivy:settings file="ivy_settings.xml" />
-		<ivy:retrieve pattern="${plugin.lib.dir}/[artifact]-[revision](-[classifier]).[ext]" conf="default" />
-	</target>
+    <target name="clean_ivy">
+        <delete failonerror="false">
+            <fileset dir="${plugin.lib.dir}">
+                <include name="**/*.jar"/>
+                <exclude name="**/*-custom.jar" />
+            </fileset>
+        </delete>
+    </target>
+    <target name="fetch_dependencies" depends="clean_ivy, init-ivy">
+        <echo>fetching dependencies with ivy</echo>
+        <ivy:settings file="ivy_settings.xml" />
+        <ivy:retrieve pattern="${plugin.lib.dir}/[artifact]-[revision](-[classifier]).[ext]" conf="default" />
+    </target>
 </project>
Index: /applications/editors/josm/plugins/javafx/build.xml
===================================================================
--- /applications/editors/josm/plugins/javafx/build.xml	(revision 34702)
+++ /applications/editors/josm/plugins/javafx/build.xml	(revision 34703)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<project name="javafx" default="dist" basedir=".">
+<project name="javafx" default="dist" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
     <!-- enter the SVN commit message -->
     <property name="commit.message" value="Commit message"/>
@@ -6,9 +6,11 @@
     <property name="plugin.main.version" value="14234"/>
 
-	<!-- Configure these properties (replace "..." accordingly).
+    <!-- Configure these properties (replace "..." accordingly).
          See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
     -->
     <property name="plugin.author" value="Don-vip"/>
-    <property name="plugin.class" value="org.openstreetmap.josm.plugins.javafx.JavaFxPlugin"/>
+    <property name="plugin.class.windows" value="org.openstreetmap.josm.plugins.javafx.JavaFxPluginWindows"/>
+    <property name="plugin.class.unixoid" value="org.openstreetmap.josm.plugins.javafx.JavaFxPluginUnixoid"/>
+    <property name="plugin.class.osx" value="org.openstreetmap.josm.plugins.javafx.JavaFxPluginOsx"/>
     <property name="plugin.description" value="Provides the OpenJFX (JavaFX) library for JOSM core and other JOSM plugins. Provides additional features such as MP3 audio playback."/>
     <property name="plugin.minimum.java.version" value="11"/>
@@ -23,72 +25,65 @@
     <import file="../build-common.xml"/>
 
-	<target name="pre-compile" depends="fetch_dependencies">
-		<!-- include fetch_dependencies task -->
-	</target>
+    <target name="pre-compile" depends="fetch_dependencies">
+        <!-- include fetch_dependencies task -->
+    </target>
 
-    <!-- Override build-jar target to speed up merging from 16 minutes to 7 minutes -->
+    <macrodef name="build-native-manifest">
+        <attribute name="class"/>
+        <attribute name="manifest"/>
+        <attribute name="platform"/>
+        <sequential>
+            <copy file="MANIFEST" tofile="@{manifest}" />
+            <manifest file="@{manifest}" mode="update">
+                <attribute name="Plugin-Class" value="${property.value}" />
+                <attribute name="Plugin-Platform" value="@{platform}" />
+            </manifest>
+        </sequential>
+    </macrodef>
+
+    <target name="additional-manifest">
+        <build-native-manifest platform="Windows" class="${plugin.class.windows}" manifest="${manifest.windows}"/>
+        <build-native-manifest platform="Unixoid" class="${plugin.class.unixoid}" manifest="${manifest.unixoid}" />
+        <build-native-manifest platform="Osx" class="${plugin.class.osx}" manifest="${manifest.osx}" />
+    </target>
+
+    <macrodef name="build-native-jar">
+        <attribute name="jar"/>
+        <attribute name="manifest"/>
+        <attribute name="qualifier"/>
+        <attribute name="copy"/>
+        <sequential>
+            <echo>Building @{qualifier} jar...</echo>
+            <!-- Building the JAR file directly from javafx jar files is awfully slow,
+                 see https://bz.apache.org/bugzilla/show_bug.cgi?id=43144 -->
+            <mkdir dir="${plugin.lib.dir}/@{qualifier}"/>
+            <unzip dest="${plugin.lib.dir}/@{qualifier}">
+                <patternset>
+                    <exclude name="META-INF/maven/*"/>
+                    <exclude name="META-INF/DEPENDENCIES"/>
+                    <exclude name="META-INF/LICENSE"/>
+                    <exclude name="META-INF/NOTICE"/>
+                    <exclude name="META-INF/*.RSA"/>
+                    <exclude name="META-INF/*.SF"/>
+                    <exclude name="module-info.class"/>
+                </patternset>
+                <fileset dir="${plugin.lib.dir}">
+                    <include name="*-@{qualifier}.jar"/>
+                    <include name="*-monocle*.jar"/>
+                </fileset>
+            </unzip>
+            <jar destfile="@{jar}" manifest="@{manifest}" manifestencoding="UTF-8" level="9">
+                <fileset dir="${plugin.build.dir}"/>
+                <fileset dir="${plugin.lib.dir}/@{qualifier}"/>
+            </jar>
+            <delete dir="${plugin.lib.dir}/@{qualifier}" failonerror="false" />
+            <copy file="@{jar}" tofile="${plugin.jar}" if:set="@{copy}" />
+        </sequential>
+    </macrodef>
+
     <target name="build-jar">
-        <echo>Building commong jar...</echo>
-        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}" manifest="MANIFEST" manifestencoding="UTF-8" duplicate="preserve" level="9">
-            <restrict>
-                <not><or>
-                    <name name="META-INF/maven/*"/>
-                    <name name="META-INF/DEPENDENCIES"/>
-                    <name name="META-INF/LICENSE"/>
-                    <name name="META-INF/NOTICE"/>
-                    <name name="META-INF/*.RSA"/>
-                    <name name="META-INF/*.SF"/>
-                    <name name="module-info.class"/>
-                </or></not>
-                <archives>
-                    <zips>
-                        <fileset dir="${plugin.lib.dir}" includes="*-linux.jar"/>
-                    </zips>
-                </archives>
-            </restrict>
-        </jar>
-        <echo>Adding macOS artifacts...</echo>
-        <jar destfile="${plugin.jar}" update="true" duplicate="preserve" level="9">
-            <restrict>
-                <or>
-                    <name name="*.dylib"/>
-                    <name name="com/sun/glass/events/mac/**"/>
-                    <name name="com/sun/glass/ui/mac/**"/>
-                    <name name="com/sun/media/jfxmediaimpl/platform/osx/**"/>
-                    <name name="com/sun/prism/es2/**"/>
-                </or>
-                <archives>
-                    <zips>
-                        <fileset dir="${plugin.lib.dir}" includes="*-mac.jar"/>
-                    </zips>
-                </archives>
-            </restrict>
-        </jar>
-        <echo>Adding Windows artifacts...</echo>
-        <jar destfile="${plugin.jar}" update="true" duplicate="preserve" level="9">
-            <restrict>
-                <or>
-                    <name name="*.dll"/>
-                    <name name="com/sun/glass/ui/win/**"/>
-                    <name name="com/sun/prism/d3d/**"/>
-                    <name name="com/sun/scenario/effect/impl/hw/d3d/**"/>
-                </or>
-                <archives>
-                    <zips>
-                        <fileset dir="${plugin.lib.dir}" includes="*-win.jar"/>
-                    </zips>
-                </archives>
-            </restrict>
-        </jar>
-        <echo>Adding Monocle artifacts...</echo>
-        <jar destfile="${plugin.jar}" update="true" duplicate="preserve" level="9">
-            <restrict>
-                <archives>
-                    <zips>
-                        <fileset dir="${plugin.lib.dir}" includes="*-monocle*.jar"/>
-                    </zips>
-                </archives>
-            </restrict>
-        </jar>
+        <build-native-jar jar="${plugin.unixoid.jar}" manifest="${manifest.unixoid}" qualifier="linux" copy="isUnix" />
+        <build-native-jar jar="${plugin.windows.jar}" manifest="${manifest.windows}" qualifier="win" copy="isWindows" />
+        <build-native-jar jar="${plugin.osx.jar}" manifest="${manifest.osx}" qualifier="mac" copy="isMac" />
     </target>
 </project>
Index: /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPlugin.java
===================================================================
--- /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPlugin.java	(revision 34702)
+++ /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPlugin.java	(revision 34703)
@@ -27,26 +27,18 @@
 import org.openstreetmap.josm.plugins.javafx.io.audio.JavaFxMediaPlayer;
 import org.openstreetmap.josm.tools.Logging;
-import org.openstreetmap.josm.tools.PlatformManager;
 
 /**
  * OpenJFX plugin brings OpenJFX (JavaFX) to other plugins.
  */
-public class JavaFxPlugin extends Plugin {
+abstract class JavaFxPlugin extends Plugin {
 
     /**
      * Constructs a new {@code OpenJfxPlugin}.
      * @param info plugin info
+     * @param ext native libraries extension
      */
-    public JavaFxPlugin(PluginInformation info) {
+    protected JavaFxPlugin(PluginInformation info, String ext) {
         super(info);
         AudioPlayer.setSoundPlayerClass(JavaFxMediaPlayer.class);
-        String ext = null;
-        if (PlatformManager.isPlatformWindows()) {
-            ext = ".dll";
-        } else if (PlatformManager.isPlatformUnixoid()) {
-            ext = ".so";
-        } else if (PlatformManager.isPlatformOsx()) {
-            ext = ".dylib";
-        }
         extractNativeLibs(ext);
         loadNativeLibs(ext);
Index: /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginOsx.java
===================================================================
--- /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginOsx.java	(revision 34703)
+++ /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginOsx.java	(revision 34703)
@@ -0,0 +1,18 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.javafx;
+
+import org.openstreetmap.josm.plugins.PluginInformation;
+
+/**
+ * OpenJFX plugin brings OpenJFX (JavaFX) to other plugins.
+ */
+public class JavaFxPluginOsx extends JavaFxPlugin {
+
+    /**
+     * Constructs a new {@code OpenJfxPlugin}.
+     * @param info plugin info
+     */
+    public JavaFxPluginOsx(PluginInformation info) {
+        super(info, ".dylib");
+    }
+}
Index: /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginUnixoid.java
===================================================================
--- /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginUnixoid.java	(revision 34703)
+++ /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginUnixoid.java	(revision 34703)
@@ -0,0 +1,18 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.javafx;
+
+import org.openstreetmap.josm.plugins.PluginInformation;
+
+/**
+ * OpenJFX plugin brings OpenJFX (JavaFX) to other plugins.
+ */
+public class JavaFxPluginUnixoid extends JavaFxPlugin {
+
+    /**
+     * Constructs a new {@code OpenJfxPlugin}.
+     * @param info plugin info
+     */
+    public JavaFxPluginUnixoid(PluginInformation info) {
+        super(info, ".so");
+    }
+}
Index: /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginWindows.java
===================================================================
--- /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginWindows.java	(revision 34703)
+++ /applications/editors/josm/plugins/javafx/src/org/openstreetmap/josm/plugins/javafx/JavaFxPluginWindows.java	(revision 34703)
@@ -0,0 +1,18 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.javafx;
+
+import org.openstreetmap.josm.plugins.PluginInformation;
+
+/**
+ * OpenJFX plugin brings OpenJFX (JavaFX) to other plugins.
+ */
+public class JavaFxPluginWindows extends JavaFxPlugin {
+
+    /**
+     * Constructs a new {@code OpenJfxPlugin}.
+     * @param info plugin info
+     */
+    public JavaFxPluginWindows(PluginInformation info) {
+        super(info, ".dll");
+    }
+}
