Giter Club home page Giter Club logo

javafx-maven-plugin's Introduction

Maven Central

JavaFX Maven Plugin

The JavaFX Maven Plugin provides a way to assemble distribution bundles for JavaFX applications (8+) from within Maven.

This plugin is essentially a Maven wrapper for the packaging tool that comes with JavaFX, it's called javapackager.

For easy configuration please use the old configurator: https://zenjava.net/javafx-maven-plugin/

Requirements

  • Maven 3.5 (older versions might work too)
  • Java Developer Kit 8 with at least Update 40 (does NOT support JKD9 or later yet)

OS-specific requirements

  • (Windows) EXE installers: Inno Setup
  • (Windows) MSI installers: WiX (at least version 3.7)
  • (Linux) DEB installers: dpkg-deb
  • (Linux) RPM installers: rpmbuild
  • (Mac) DMG installers: hdiutil
  • (Mac) PKG installers: pkgbuild

Quickstart for JavaFX JAR

Add this to your pom.xml within to your build-plugin:

<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>8.8.3</version>
    <configuration>
        <mainClass>your.package.with.Launcher</mainClass>
    </configuration>
</plugin>

To create your executable file with JavaFX-magic, call mvn jfx:jar. The jar-file will be placed at target/jfx/app.

Quickstart for JavaFX native bundle

Add this to your pom.xml within to your build-plugin:

<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>8.8.3</version>
    <configuration>
        <vendor>YourCompany</vendor>
        <mainClass>your.package.with.Launcher</mainClass>
    </configuration>
</plugin>

To create your executable file with JavaFX-magic and some installers (please see official oracle-documentation which applications are required for this), call mvn jfx:native. The native launchers or installers will be placed at target/jfx/native.

Using SNAPSHOT-versions

When you report a bug and this got worked around, you might be able to have access to some -SNAPSHOT-version, please adjust your pom.xml:

<pluginRepositories>
    <pluginRepository>
        <id>oss-sonatype-snapshots</id>
        <url>https://oss.sonatype.org/content/groups/public/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

Last Release Notes

Version 8.8.3 (09-feb-2017)

Bugfixes:

(Not yet) Release(d) Notes

upcoming Version 8.10.0 (???-???-2021)

New:

  • added a way to have PKCS11 signing by setting <skipKeypassWhileSigning>true</skipKeypassWhileSigning> and <skipKeyStoreChecking>true</skipKeyStoreChecking>, makes it possible to have hardware tokens
  • added ability to prefix dependencies with their groupId by setting <prefixWithGroupIdForClasspathDependencies>true</prefixWithGroupIdForClasspathDependencies>, should work around the edge-case where dependencies have the same artifactId and would overwrite otherwise

Enhancement:

  • JDK 9 compatibility (got broken with Jigsaw)
  • TravisCI: use newer build machines

Documentation:

  • clarified that this plugin is a wrapper, thanks to @TurekBot

javafx-maven-plugin's People

Contributors

chr-fritz avatar ctrueden avatar eskatos avatar fibrefox avatar hexid avatar jabqooo avatar kevincoghlan avatar maxd avatar mcduke avatar michoo avatar og0815 avatar patrickgh avatar puce77 avatar sa-wilson avatar sarxos avatar shemnon avatar zonski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javafx-maven-plugin's Issues

mvn jfx:generate-key-store failure

Hello,
first of all thank you for this great plugin!
I'm trying to generate a keystore with mvn jfx:generate-key-store but it fails. Can't figure out if I'm missing something in the POM or if this is a "relevant" bug...

Thanks a lot!

Here is the command line (in my project base directory):

mvn jfx:generate-key-store -DcertDomain=my.domain -DcertCountry=myCountry -DcertOrg=myOrg -DcertState=myState

(By the way, would it be possible to choose the validity period please?)

Here is the relevant part of my POM:

com.zenjava
javafx-maven-plugin
2.0


create-final-jar
package

web




myOrg
path.to.my.MainClass


all-permissions



And here is (a piece of) the error message a got:

Failed to execute goal com.zenjava:javafx-maven-plugin:2.0:generate-key-store
(default-cli) on project myProject: Unable to execute mojo: Execution null of goal org.codehaus.mojo:keytool-mav
en-plugin:1.2:generateKeyPair failed: Unable to load the mojo 'generateKeyPair' (or one of its required components) from the plugin 'org.codehaus.mojo:keytool-maven-plugin:1.2': com.google.inject.Prov
isionException: Guice provision errors:

  1. No implementation for org.codehaus.mojo.keytool.KeyToolCommandLineBuilder was bound.
    while locating org.codehaus.mojo.keytool.DefaultKeyTool
    at ClassRealm[plugin>org.codehaus.mojo:keytool-maven-plugin:1.2, parent: sun.misc.Launcher$AppClassLoader@5c647e05]

OS X fix-classpath

How does the plugin find the current version of Java (JRE)?

If I run the Java control panel I only see Java 7. If I run "java -version" from the command line I get this:

java version "1.7.0_10-ea"
Java(TM) SE Runtime Environment (build 1.7.0_10-ea-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

If I run the fix-classpath, I get this:

This action will change the runtime classpath for your JRE installed at '/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home' to include JavaFX. All Java applications (not just this one) using this JRE will have the JavaFX runtime include on their path. Generally this is pretty safe but if you are unsure how your applications may be affected you should not do this.

There may be something strange about this machine since moving from Apple to Oracle-distributed Java.

Problem in jvm properties setting

Hi,

I have my application pom configured like so:

<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>2.0</version>
    <executions>
        <execution>
           <goals>
                <goal>native</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <vendor>SomeApp</vendor>
        <mainClass>someapp.Application</mainClass>
        <jvmProperties>
            <twitter4j.oauth.consumerKey>${consumerKey}</twitter4j.oauth.consumerKey>
            <twitter4j.oauth.consumerSecret>${consumerSecret}</twitter4j.oauth.consumerSecret>
        </jvmProperties>
    </configuration>
</plugin>

The problem is that declared jvm parameters are not set in during application runtime wrapped in native bundle.

Launching my application like so java -jar someApp.jar -Dtwitter4j.oauth.consumerKey=${consumerKey} -Dtwitter4j.oauth.consumerSecret=${consumerSecret} have no problems so I suppose that there's something wrong in jvm properties setting procedure.

License File

A feature to add a license file would be great. This could be either by default a file named "license.txt", or a configurable name or maybe even a configuration section to allow specifying arbitrary resource file.

I think that the license fill can be added like this:
https://github.com/zonski/javafx-maven-plugin/blob/master/src/main/java/com/zenjava/javafx/maven/plugin/NativeMojo.java
somewhere add:

deployParams.addResource(jfxAppOutputDir (?), licenseFilePath, DeployResource.Type.license);

Alternatively, you could allow any resource file to be added via the pom, e.g. like this:

<resources>
   <resource>
      <file>${project.basedir}/src/main/deploy/license.txt</file>
      <type>license</type>
   </resource>
</resource>

Change classpath of dependencies

I believe a plugin configuration option that permits the change of the dependencies in MANIFEST.MF file, like in maven-jar-plugin, could add more flexibility to the generated jar file. Something like this:

<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>2.0</version>
    <configuration>
             <mainClass>com.hrgi.pdv.App</mainClass>
             <jfxClasspathPrefix>../lib/</jfxClasspathPrefix>
    </configuration>
</plugin>

Support for running embedded in browser

Great work on the plugin. I intend to use it for a JavaFX app that will be embedded in the browser. I need to trigger the FX deployment code to generate the right tags in the JNLP file for this etc. Right now I can do this manually, but it would be great if the plugin had support for this (in addition to standalone, web start, .bat., etc.).

Example of some of the JNLP code that is generated:

`<applet-desc  width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="MyFunApp" >
<param name="requiredFXVersion" value="2.2+"/>
</applet-desc>
<jfx:javafx-desc  width="800" height="600" main-class="myfunapp.Main"  name="MyFunApp" />`

Cannot build when target/classes does not exist

When using the jfx plugin from a POM project that aggregates together others, the JarMojo fails because target/classes does not exist. The target/classes path should not be appended to the resources unless it exists.

Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to build JFX JAR for application
at com.zenjava.javafx.maven.plugin.JarMojo.execute(JarMojo.java:110)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 23 more
Caused by: com.sun.javafx.tools.packager.PackagerException: Error: Failed to create jar file fikon-distribution-core-1.1.0-SNAPSHOT-jfx.jar
at com.sun.javafx.tools.packager.PackagerLib.packageAsJar(PackagerLib.java:309)
at com.zenjava.javafx.maven.plugin.JarMojo.execute(JarMojo.java:108)
... 25 more
Caused by: java.io.FileNotFoundException: Input folder does not exist [/home/rjudson/fio/flashcenter/src/ioncli/fikon-distribution-core/target/classes]
at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1476)
at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1389)
at com.sun.javafx.tools.packager.PackagerLib.packageAsJar(PackagerLib.java:305)

runtime dependencies are included in fx jar

runtime scoped dependencies are not packaged into the .jar file like compile scoped ones.
The *-jfx.jar file instead contains also the runtime dependencies, so you are forced to set to "provided" the scope if you want to include them.

Issue with Windows binary

I'm trying to use your plugin to generate native binaries for a project of mine (using Java 8) and it's working perfectly on Mac but not on Windows. When I run the Windows binary, it'll open the main page, but clicking a button that opens a new window doesn't work.

My guess is that it's choking on the external library that the button calls, because that's the first time the program uses any external software. I've confirmed that the JAR for that library is in the appropriate lib folder.

Do you have any recommendations? Is this a known issue?

The project I'm referring to is at https://github.com/cirdles/topsoil and the pom version that uses your plugin is currently HEAD on dev.

Complete the wiki

Hi,

JavaFX maven plugin is very usefull but some documentations are missing in the wiki like in "Building a webstart bundle" page. I would like to build a webstart app with maven but I don't know how to create a custom template.

Many thanks

How to pass the -Xmx param?

Hi, I am currently passing the JVM param -Xmx8G to my application as a VM Option in Intellij.

What is the correct way to do this in Maven? I've currently got this configured, but it's not being recognised...

            <configuration>
                <mainClass>foo</mainClass>
                <vendor>Bar</vendor>
                <nativeReleaseVersion>1.0</nativeReleaseVersion>
                <jvmProperties>
                    <Xmx>8G</Xmx>
                </jvmProperties>
            </configuration>

Any thoughts?

FileNotFoundException: ...\target\jfx\web\lib

If your project has no dependencies, the following error occurs for "jfx:web":

...
Signing (BLOB) ${project.build.directory}\jfx\web\lib
java.io.FileNotFoundException: ${project.build.directory}\jfx\web\lib (Can not find the file specified)
...

Allow adding of induvidual Manifest Entries

Hi,

it would be nice to have the option to add individual entries to the generated Manifest.
(Like in the maven-jar-plugin)
e.g.:
Something like this

<plugin>
  <artifactId>maven-jar-plugin</artifactId>
  <configuration>
    <archive>
      <manifestEntries>
        <SplashScreen-Image>splash.png</SplashScreen-Image>
      </manifestEntries>
    </archive>
  </configuration>
</plugin>

Would produce a mainfest entry of:
SplashScreen-Image: splash.png

I asume it is possible to do with
com.sun.javafx.tools.packager.CreateJarParams.setManifestAttrs(Map<String, String> manifestAttrs)

If I get some time the weekend I might supply a patch

Set JVM args for native application.

When generating a native application (we use Windows), the given <jreArgs> in the configuration are completely ignored. This is a real showstopper for us, since we have to increase the standard heap space and pass other parameters as well.
As far as I understand, the JavaFXPackager does support custom JVM arguments, so this should be possible from within this plugin, too.

Disable CSS to BSS conversion?

Hi,

is it possible to disable the CSS -> BSS-Conversion when building a jar with the plugin?

I get a problem with relative paths for images in bss-files. After the conversion the bss-file contains an absolute path to the location of the stylesheet in my workspace.
So it's not possible to install the app to another pc.

Can't sign the jar wihen mvn:build-webstart (jdk 1.7.0_13)

Hi Zonski,

First, Thanks for your brilliant work!
I'm working with jdk 1.7.0_13 on windows 7 64 bits.
mvn jfx:build-webstart doesn't work when signing the jar but it works without. It seems related to my java version.
Here is the error returned:
Invocation of JavaFX method 'signJar' failed with an error. It's possible this plugin is not compatible with the version of JavaFX you are using. InvocationTargetException:

Do I have to install jdk 7 update 6 to make it work?

Cheers

Problems with jfx:native

I get the exception below

...
[INFO] Building Native Installers
[INFO] Adding 'deploy' directory to Mojo classpath: W:\SASC FX\SascFx/src/main/deploy
Using base JDK at: C:\Program Files\Java\jdk1.7.0_25\jre
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:22.941s
[INFO] Finished at: Tue Sep 10 11:01:50 BRT 2013
[INFO] Final Memory: 16M/53M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:2.0:native (default-cli) on project SascFx: Execution default-cli of goal com.zenjava:javafx-maven-plugin:2.0:native failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.zenjava:javafx-maven-plugin:2.0:native (default-cli) on project SascFx: Execution default-cli of goal com.zenjava:javafx-maven-plugin:2.0:native failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.zenjava:javafx-maven-plugin:2.0:native failed.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: java.lang.NullPointerException
    at com.sun.javafx.tools.packager.bundlers.BundleParams.getMainApplicationJar(BundleParams.java:390)
    at com.sun.javafx.tools.packager.bundlers.WinAppBundler.doValidate(WinAppBundler.java:59)
    at com.sun.javafx.tools.packager.bundlers.WinAppBundler.validate(WinAppBundler.java:43)
    at com.sun.javafx.tools.packager.bundlers.Bundler.get(Bundler.java:91)
    at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:450)
    at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:435)
    at com.zenjava.javafx.maven.plugin.NativeMojo.execute(NativeMojo.java:167)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    ... 20 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Basically, I have my application pom configured like so:

<project ...>

    ...

    <groupId>br.com.sicoobcredinor.sascfx</groupId>
    <artifactId>SascFx</artifactId>
    <name>SascFx</name>

    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>

    <organization>
        <!-- Used as the 'Vendor' for JNLP generation -->
        <name>Sicoob Credinor</name>
        <url>http://www.sicoobcredinor.com.br</url>
    </organization>

    <properties>
        ...
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>

    ...

    <build>
        <plugins>
            <plugin>
                <groupId>com.zenjava</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>2.0</version>
                <configuration>

                    <mainClass>br.com.sicoobcredinor.sascfx.SascFx</mainClass>
            ...

                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>

        <!-- JavaFX -->

        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>javafx</artifactId>
            <version>2.2.21</version>
            <systemPath>${jfxrt.jar}</systemPath>
            <scope>system</scope>
        </dependency> 

    ...

    </dependencies>

    ...

</project>

My system version:

Apache Maven 3.0.4 (r1232337; 2012-01-17 06:44:56-0200)
Maven home: C:\apache-maven-3.0.4
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_25\jre
Default locale: pt_BR, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

So, what's going on?

Implementation Entries

I need to pass forward the maven version number into the running application. The maven-jar-plugin allows me to insert these records into the jar using addDefaultImplementationEntries. However these entries don't make it into the javafx manifest file. I assume you are possibly generating the manifest file from scratch? Is there a way to get these parameters through?

Including jar from local repository?

Hello,

I need to use a jar file from a local repository (javafx-dialogs, see [1]) in my project. This jar shall also be included in a jar file generated by running jfx:build-jar. However, when running the generated jar file, a NullPointerException occurs:

java -jar testproject-0.0.1-SNAPSHOT-jfx.jar
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.javafx.main.Main.launchApp(Main.java:642)
at com.javafx.main.Main.main(Main.java:805)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at javafx.scene.control.Dialogs$FXDialog$3.run(Dialogs.java:1144)
at java.security.AccessController.doPrivileged(Native Method)
at javafx.scene.control.Dialogs$FXDialog.(Dialogs.java:1142)
at javafx.scene.control.Dialogs$FXDialog.(Dialogs.java:1088)
at javafx.scene.control.Dialogs$DialogTemplate.(Dialogs.java:616)
at javafx.scene.control.Dialogs.showSimpleContentDialog(Dialogs.java:494)
at javafx.scene.control.Dialogs.showConfirmDialog(Dialogs.java:226)
at javafx.scene.control.Dialogs.showConfirmDialog(Dialogs.java:217)
at Main.start(Main.java:20)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:215)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
... 1 more

Everything works fine, when the project is run directly from the IDE (Eclipse). A sample project can be found at https://code.google.com/p/codestefan/source/browse/#svn%2Ftestproject%253Fstate%253Dclosed

Any hint on how to get a working jar which includes javafx-dialogs? Thanks :-)

Hint:
Note that javafx-dialogs is at least detected during creation of the jar file:
[INFO] <<< javafx-maven-plugin:1.5:build-jar (default-cli) @ testproject <<<
[INFO]
[INFO] --- javafx-maven-plugin:1.5:build-jar (default-cli) @ testproject ---
[INFO] Assembling JavaFX executable JAR to 'C:\Users\myuser\Desktop\maventest\target\testproject-0.0.1-SNAPSHOT-jfx.jar'
[INFO] Unpacking module dependendencies to: C:\Users\myuser\Desktop\maventest\target\jfx-dependencies
[INFO] Unpacking C:\Users\myuser.m2\repository\javafx\dialogs\0.0.3\dialogs-0.0.3.jar to C:\Users\myuser\Desktop\maventest\target\jfx-dependencies with includes "" and excludes ""
[INFO] Java home is: C:\Program Files (x86)\Java\jdk1.7.0_21\jre
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

[1] https://github.com/marcojakob/javafx-ui-sandbox/tree/master/javafx-dialogs/dist

Problems with javafx-maven-plugin and 1.7.0_40

I have been using your plugin successfully with javafx/netbeans up until the release of 1.7.0_40. Now that I have installed that version of java, I can no longer build and run applications that worked perfectly well before. Inside of NetBeans I get unsatisfied linker errors, and when running packaged apps built against the u25 release (executed with u40 java) I get some type of unrecoverable execution error. I'm thinking that something in the packaging has changed, but I'm in a bind as some users in our company have started upgrading to u40, and it's breaking things. Help, please!

Errors on "run" in NetBeans:

[exec:exec]
2013-09-19 08:17:19,228 [INFO  PricingMainFactory] - Starting PricingClient.
Exception in thread "main" java.lang.RuntimeException: Application launch error
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:122)
    at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.UnsatisfiedLinkError:     com.sun.glass.ui.win.WinApplication._invokeLater(Ljava/lang/Runnable;)V
    at com.sun.glass.ui.win.WinApplication._invokeLater(Native Method)
    at com.sun.glass.ui.Application.invokeLater(Application.java:343)
    at com.sun.javafx.tk.quantum.QuantumToolkit.defer(QuantumToolkit.java:620)
    at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:170)
    at com.sun.javafx.application.PlatformImpl.runAndWait(PlatformImpl.java:203)
    at com.sun.javafx.application.PlatformImpl.tkExit(PlatformImpl.java:311)
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:421)
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
... 1 more

How to add obfuscation task in native building

Hi, I have a JavaFX application that I package with javafx-maven-plugin, but now I'm trying to obfuscate the code.

To achieve this I use an ant task using ProGuard, but my problem is that I couldn't find a way to call this obfuscation task between the jfx:jar and the jfx:native goals, both of them are called on package phase and the jfx:native calls always to jfx:jar, so I cannot use mvn jfx:jar antrun:run jfx:native.

My current workaround is to call jfx:jar and with ant I make the obfuscation and the native building, but I don't like too much this approach.

Is there any way to execute "something" between jar and native goals ?

Can be possible to avoid to launch the jfx:jar from jfx:native if jar file exists ? We always can launch a "clean jfx:native" if we want a clean building.

JavaFX-Fallback-Class

Currently, I can't find any way of setting a fallback class.

This could be accomplished with CreateJarParams.setFallback(String fallback)

Also, the following should be noted from the source of PackagerLib.packageAsJar(CreateJarParams createJarParams):

//Default fallback class uses "private" interface to
// get additional error paramters. Do not add it to manifest
// explicitly to avoid treating it as custom
if (createJarParams.fallbackClass != null && 
        !createJarParams.defaultFallbackApp.equals(
        createJarParams.fallbackClass)) {
    attr.put(new Attributes.Name("JavaFX-Fallback-Class"), 
            createJarParams.fallbackClass);
}

Required parameter "vendor" not documented

Trying to run the plugin I ran into the following error:

[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:1.3:build-jar (build-jar) on project epik-protocol-tools: The parameters 'vendor' for goal com.zenjava:javafx-maven-plugin:1.3:build-jar are missing or invalid -> [Help 1]

By looking at the source code I figured out that I should set /project/organization/name in the POM, but that wasn't obvious and I didn't see it documented anywhere.

Does not work with Apache Maven 3.1

Apache Maven 3.1 has just been released ( altho the release isn't officially published yet ) which makes a change from using Sonatype Aether to using Eclipse Aether, which incurs package renames, and a few API changes.

[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:1.5:build-jar
  (build-jar) on project norrellfx: Execution build-jar of goal
  com.zenjava:javafx-maven-plugin:1.5:build-jar failed: An API incompatibility was
 encountered while executing com.zenjava:javafx-maven-plugin:1.5:build-jar:
   java.lang.NoSuchMethodError:
 org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;

Pass a script-file to Inno Setup

First of all: Thank you for this great plugin!

For customizing the installation-process of the Installer generated by Inno Setup (e.g. licence, desktop Icon, installation folder) it would be very useful to pass a script-file to Inno Setup.

Looking into the (icon-) paths if there exists a script-file might be a good idea:
Windows: src/main/deploy/package/windows/[project-final-name].iss
Mac: src/main/deploy/package/macosx/[project-final-name].iss

JDK 8u20 compatibility

When I use the javafx-maven-plugin with the latest 8u20 b05 Build, I get:

Apr 01, 2014 9:39:49 PM org.sonatype.guice.bean.reflect.Logs$JULSink warn
WARNUNG: Error injecting: com.zenjava.javafx.maven.plugin.NativeMojo
java.lang.NoClassDefFoundError: Lcom/sun/javafx/tools/packager/bundlers/Bundler$BundleType;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2570)
at java.lang.Class.getDeclaredFields(Class.java:1903)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:651)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:358)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:155)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:585)
at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:542)
at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:528)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:833)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:758)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:255)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:204)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:954)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:950)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1000)
at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:45)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:84)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:52)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
at org.sonatype.guice.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:138)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:108)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.tools.packager.bundlers.Bundler$BundleType
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
[ ... ]

It looks like they removed the entire bundling API from JavaFX and replaced it with the "Packager API". I didn't look into it any further, maybe this is a false alarm. Reverting to JDK8 b132 (the GA release) resolves the problem for me. It would be great if the javafx-maven-plugin could be used also with future JDK versions.

Windows Native. Missing MSVCR100.dll

Hi. I'm building a JavaFX application using Maven with this plugin. Building an executable jar works fine. Building a native executable succeeds, but when I run the Application I get a few errors:

  1. "The program can't start because MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem." Click OK to...
  2. "Error loading jvm.dll" Click OK to...
  3. "Failed to launch JVM"

The JVM is 1.7.0_51 (64 bit) on Windows 7.

Any thoughts?

adding JavaFX runtime to the classpath fails on OS X 10.8.3

After running the maven command as explained, it fails as follows:


Are you sure you want to continue? (y/n)
y
[WARNING] Fixing JRE bootclasspath to include JavaFX runtime and native files
[WARNING] All applications using JRE will be affected: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre
[INFO] Copying JFX Runtime JAR '/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/jfxrt.jar' to '/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/ext'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.817s
[INFO] Finished at: Sun May 19 14:59:34 CEST 2013
[INFO] Final Memory: 6M/142M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:1.5:fix-classpath (default-cli) on project standalone-pom: Error while copying JFX Runtime JAR '/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/jfxrt.jar' to '/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/ext': java.nio.file.AccessDeniedException: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/ext/jfxrt.jar -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Here is Maven & Java details:


serge-mac:~ serge-mac$ mvn -v
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /usr/share/maven
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.8.3", arch: "x86_64", family: "mac"

Any idea? Thanks

Update jvmArgs documentation

Is this the correct way to pass jvmArgs?
Can you please update the jvmArgs Documentation.
jvmargs
The tag "jvmArg" should at least be mentioned.

Unable to retrieve component configurator for plugin configuration / Artifact has been relocated to commons-io:commons-io:1.3.2

I am trying to use zonski's javafx-maven-plugin, however when executing

mvn com.zenjava:javafx-maven-plugin:1.2:fix-classpath

(more details on Fixing the JRE classpath) I get one warning and one error:

[WARNING] While downloading org.apache.commons:commons-io:1.3.2
  This artifact has been relocated to commons-io:commons-io:1.3.2.
  https://issues.sonatype.org/browse/MVNCENTRAL-244

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve component configurator for plugin configuration

Here's the full log:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [com.zenjava:javafx-maven-plugin:1.5:fix-classpath] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[WARNING] While downloading org.apache.commons:commons-io:1.3.2
  This artifact has been relocated to commons-io:commons-io:1.3.2.
  https://issues.sonatype.org/browse/MVNCENTRAL-244


-----------------------------------------------------
this realm = app0.child-container[com.zenjava:javafx-maven-plugin:1.5]
urls[0] = file:/C:/Users/myuser/.m2/repository/com/zenjava/javafx-maven-plugin/1.5/javafx-maven-plugin-1.5.jar
urls[1] = file:/C:/Users/myuser/.m2/repository/org/twdata/maven/mojo-executor/2.0/mojo-executor-2.0.jar
urls[2] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
urls[3] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-inject-plexus/1.4.2/sisu-inject-plexus-1.4.2.jar
urls[4] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
urls[5] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
urls[6] = file:/C:/Users/myuser/.m2/repository/org/sonatype/aether/aether-api/1.7/aether-api-1.7.jar
urls[7] = file:/C:/Users/myuser/.m2/repository/com/zenjava/javafx-deploy-lib/1.2/javafx-deploy-lib-1.2.jar
urls[8] = file:/C:/Users/myuser/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
urls[9] = file:/C:/Users/myuser/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
urls[10] = file:/C:/Users/myuser/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
urls[11] = file:/C:/Users/myuser/.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar
urls[12] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
urls[13] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8


this realm = plexus.core
urls[0] = file:/C:/maven/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
-----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve component configurator for plugin configuration
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun Apr 21 17:36:51 CEST 2013
[INFO] Final Memory: 9M/22M
[INFO] ------------------------------------------------------------------------

Any hints on how to fix this? Thanks :-)

(Also posted on Stackoverflow: http://stackoverflow.com/questions/16133036/unable-to-retrieve-component-configurator-for-plugin-configuration-artifact-ha=

Update: Using -e switch for maven:

C:\Users\myuser> mvn -e com.zenjava:javafx-maven-plugin:1.5:fix-classpath
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [com.zenjava:javafx-maven-plugin:1.5:fix-classpath] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[WARNING] While downloading org.apache.commons:commons-io:1.3.2
  This artifact has been relocated to commons-io:commons-io:1.3.2.
  https://issues.sonatype.org/browse/MVNCENTRAL-244


-----------------------------------------------------
this realm = app0.child-container[com.zenjava:javafx-maven-plugin:1.5]
urls[0] = file:/C:/Users/myuser/.m2/repository/com/zenjava/javafx-maven-plugin/1.5/javafx-maven-plugin-1.5.jar
urls[1] = file:/C:/Users/myuser/.m2/repository/org/twdata/maven/mojo-executor/2.0/mojo-executor-2.0.jar
urls[2] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
urls[3] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-inject-plexus/1.4.2/sisu-inject-plexus-1.4.2.jar
urls[4] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
urls[5] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
urls[6] = file:/C:/Users/myuser/.m2/repository/org/sonatype/aether/aether-api/1.7/aether-api-1.7.jar
urls[7] = file:/C:/Users/myuser/.m2/repository/com/zenjava/javafx-deploy-lib/1.2/javafx-deploy-lib-1.2.jar
urls[8] = file:/C:/Users/myuser/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
urls[9] = file:/C:/Users/myuser/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
urls[10] = file:/C:/Users/myuser/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
urls[11] = file:/C:/Users/myuser/.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar
urls[12] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
urls[13] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8


this realm = plexus.core
urls[0] = file:/C:/maven/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
-----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve component configurator for plugin configuration
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve component confi
gurator for plugin configuration
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve compon
ent configurator for plugin configuration
        at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1368)
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:724)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.codehaus.plexus.component.conf
igurator.ComponentConfigurator', it could not be created
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
        at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1351)
        ... 20 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException: Could not instanciate component: role: 'org.codehaus.plexus.componen
t.configurator.ComponentConfigurator', implementation: 'org.codehaus.plexus.component.configurator.BasicComponentConfigurator', role hint: 'basic'
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77)
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62)
        at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
        at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
        at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
        ... 21 more
Caused by: java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/realm/ClassRealm
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
        at java.lang.Class.getConstructor0(Class.java:2723)
        at java.lang.Class.newInstance0(Class.java:345)
        at java.lang.Class.newInstance(Class.java:327)
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
        ... 25 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.realm.ClassRealm
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
        at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
        at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
        at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 31 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Apr 21 17:52:00 CEST 2013
[INFO] Final Memory: 9M/22M
[INFO] ------------------------------------------------------------------------

Unknown archiver type: No such archiver: 'pom'

Attempting to include the eclipselink-wrapper dependency results in the following error while executing the jfx:build-jar goal of the javafx-maven-plugin:

[INFO] Unpacking /home/zzz/.m2/repository/org/glassfish/persistence/eclipselink-wrapper/3.1.1/eclipselink-wrapper-3.1.1.pom to /nfs/home/zzz/Development/projects/xxx/yyy/yyy/target/jfx-dependencies with includes "" and excludes ""
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:1.3:build-jar (default-cli) on project desktop: Unable to execute mojo: Unknown archiver type: No such archiver: 'pom'. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.zenjava:javafx-maven-plugin:1.3:build-jar (default-cli) on project desktop: Unable to execute mojo
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:95)
at com.zenjava.javafx.maven.plugin.BuildJarMojo.unpackDependencies(BuildJarMojo.java:68)
at com.zenjava.javafx.maven.plugin.BuildJarMojo.execute(BuildJarMojo.java:52)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Unknown archiver type
at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:270)
at org.apache.maven.plugin.dependency.UnpackDependenciesMojo.execute(UnpackDependenciesMojo.java:91)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:93)
... 23 more
Caused by: org.codehaus.plexus.archiver.manager.NoSuchArchiverException: No such archiver: 'pom'.
at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getUnArchiver(DefaultArchiverManager.java:77)
at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getUnArchiver(DefaultArchiverManager.java:122)
at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:233)
... 26 more

Icons and Splash Screen Images are not Copied

I am placing my icon (icon.png) and splash (splash.jpg) into the correct template directories.

When I run the command

mvn -e -X jfx:build-webstart -DskipTests

The output indicates that the icon file is found.
Using icon file at 'C:...\src\main\deploy\icon.png'

But is is not copied into the output directory.

Inspecting the code in AbstractBundleMojo.java, you are setting the local variable icon to the class level defined icon and then setting the local icon. When the subclass for this class called BuildWebstartMojo.java attempts to use the class level icon variable, it is still null. Your code checks for null and then does nothing, no icon file is copied.

The fix for this is to delete the lines

    File icon = this.icon;

    File splashImage = this.splashImage;

from AbstractBundleMojo.java.

I hope you can make a new revision for me as we are deploying our software by the end of April.

Sincerely,

Brian

Create a native javafx app with Inno Setup and Maven

I've a little JavaFX app and I use Maven for managing the dependencies thanks to the javafx-maven-plugin.

I want to use the option who will build a native installer based on the settings (mvn jfx:build-native) using InnoSetup (on windows)

That's work pretty well but I can't find where I can specify all the Inno Setup options (like those visible here : http://www.jrsoftware.org/ishelp/index.php?topic=setup_setupiconfile). Did I have to add something on my pom ? Did I have to create a .iss file ? If yes, how to specify the link to this file ?

Any idea ?

Failed to execute goal com.zenjava:javafx-maven-plugin:1.5:build-jar

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Calotes 1.0b10
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> javafx-maven-plugin:1.5:build-native (default-cli) @ Calotes >>>
[INFO]
[INFO] >>> javafx-maven-plugin:1.5:build-jar (build-jar) @ Calotes >>>
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ Calotes ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ Calotes ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< javafx-maven-plugin:1.5:build-jar (build-jar) @ Calotes <<<
[INFO]
[INFO] --- javafx-maven-plugin:1.5:build-jar (build-jar) @ Calotes ---
[INFO] Assembling JavaFX executable JAR to '/home/development/workspaces/eclipse_workspace/Calotes/target/Calotes-1.0b10-jfx.jar'
[INFO] Unpacking module dependendencies to: /home/development/workspaces/eclipse_workspace/Calotes/target/jfx-dependencies
[INFO] log4j-api-2.0-beta4.jar already exists in destination.
[INFO] slf4j-simple-1.7.2.jar already exists in destination.
[INFO] commons-lang-2.6.jar already exists in destination.
[INFO] slf4j-api-1.7.2.jar already exists in destination.
[INFO] log4j-core-2.0-beta4.jar already exists in destination.
[INFO] javafx-2.2.7.jar already exists in destination.
[INFO] Java home is: /usr/lib/jvm/java-7-oracle/jre
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.315s
[INFO] Finished at: Mon Feb 25 20:29:21 IST 2013
[INFO] Final Memory: 11M/159M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:1.5:build-jar (build-jar) on project Calotes: Invocation of JavaFX method 'packageAsJar' failed with an error. It's possible this plugin is not compatible with the version of JavaFX you are using. InvocationTargetException: Error: jfxrt.jar needs to be on classpath for -createbss and for -createJar without -nocss2bin: com.sun.javafx.css.parser.Css2Bin -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.zenjava:javafx-maven-plugin:1.5:build-jar (build-jar) on project Calotes: Invocation of JavaFX method 'packageAsJar' failed with an error. It's possible this plugin is not compatible with the version of JavaFX you are using.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Invocation of JavaFX method 'packageAsJar' failed with an error. It's possible this plugin is not compatible with the version of JavaFX you are using.
at com.zenjava.javafx.maven.plugin.util.JfxToolsWrapper.invoke(JfxToolsWrapper.java:262)
at com.zenjava.javafx.maven.plugin.util.JfxToolsWrapper.invoke(JfxToolsWrapper.java:234)
at com.zenjava.javafx.maven.plugin.util.JfxToolsWrapper.invoke(JfxToolsWrapper.java:228)
at com.zenjava.javafx.maven.plugin.util.JfxToolsWrapper.packageAsJar(JfxToolsWrapper.java:75)
at com.zenjava.javafx.maven.plugin.BuildJarMojo.execute(BuildJarMojo.java:63)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 23 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.zenjava.javafx.maven.plugin.util.JfxToolsWrapper.invoke(JfxToolsWrapper.java:251)
... 29 more
Caused by: com.sun.javafx.tools.packager.PackagerException: Error: jfxrt.jar needs to be on classpath for -createbss and for -createJar without -nocss2bin
at com.sun.javafx.tools.packager.PackagerLib.loadClassFromRuntime(PackagerLib.java:1413)
at com.sun.javafx.tools.packager.PackagerLib.createBinaryCss(PackagerLib.java:1438)
at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1345)
at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1324)
at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1324)
at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1288)
at com.sun.javafx.tools.packager.PackagerLib.packageAsJar(PackagerLib.java:236)
... 34 more
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.parser.Css2Bin
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at com.sun.javafx.tools.packager.PackagerLib.loadClassFromRuntime(PackagerLib.java:1411)
... 40 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


Operating System: Ubuntu 12.10 x86_64
JDK Version : 1.7.0_15
jfxrt version : 2.2.7
maven : 3.0.4

Getting error when used with eclipse or from command line

Please ask if more info needed.

Provide convenience mechanism for setting application icon

One of the more frustrating aspects of trying to use the JavaFX packaging tools with Maven is overriding the configuration resources. Part of the issue has to do with figuring out how to put these resources on the Maven->Ant->javafxpackager classpath. Adding a capability for providing OS specific (or crossplatform?) application icons via the plugin configuration would be a giant step in the direction of making the Maven+JavaFX pairing easier to deal with.

Kudos on the "fix classpath" goal, btw.

native bundle with lib folder

Parameter should be created to allow native bundle creation with lib folder. Dependent jars should be placed into lib folder. In the current version 1.5 one merged jar is created it causes serious problems, file overrides, file conflicts with the same name in the same folder between jars. Final solutions should be a parameter to allow bundle creation with lib folder.

Problems with Java SE Development Kit 7u40

Due to changes in JDK 7u40, the javafx-maven-plugin seems to be unable to execute jfx:run. I successfully tested the javafx-maven-plugin using JDK 7u21.

I received the following error message using jfx:run on Mac OS X:

[INFO] --- javafx-maven-plugin:2.0:run (default-cli) @ Test ---
[INFO] Running JavaFX Application
[WARNING] 
java.lang.NoClassDefFoundError: javafx/application/Application
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285)
    at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 13 more
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:2.0:run (default-cli) on project Test: Unable to execute mojo: An exception occured while executing the Java class. javafx/application/Application: javafx.application.Application -> [Help 1]

I received the following error message using jfx:run on Windows:

[INFO] Running JavaFX Application
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 59.989s
[INFO] Finished at: Thu Sep 19 09:56:49 CEST 2013
[INFO] Final Memory: 15M/43M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:2.0:run (default-cli) on project Test: Execution default-cli of goal com.zenjava:javafx-maven-plugin:2.0:run failed: An API incompatibility was encountered while executing com.zenjava:javafx-maven-plugin:2.0:run: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.zenjava:javafx-maven-plugin:2.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/xyz/.m2/repository/com/zenjava/javafx-maven-plugin/2.0/javafx-maven-plugin-2.0.jar
[ERROR] urls[1] = file:/C:/Users/xyz/.m2/repository/org/twdata/maven/mojo-executor/2.0/mojo-executor-2.0.jar
[ERROR] urls[2] = file:/C:/Users/xyz/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[3] = file:/C:/Users/xyz/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[4] = file:/C:/Users/xyz/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[5] = file:/C:/Users/xyz/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[6] = file:/C:/Users/xyz/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[7] = file:/C:/Users/xyz/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[8] = file:/C:/Users/xyz/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[9] = file:/C:/Users/xyz/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[10] = file:/C:/Users/xyz/.m2/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
[ERROR] urls[11] = file:/C:/Users/xyz/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[12] = file:/C:/Users/xyz/.m2/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
[ERROR] urls[13] = file:/C:/Program%20Files%20(x86)/Java/jdk1.7.0_40/jre/../lib/ant-javafx.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

Mac OS build-native problem

There is some problem when bilding native app on Mac OS. First the application created is called Null.app and then the creation of the DMG image file fail with the following error:

[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:1.3:build-native (default-cli) on project MyTestApp: Invocation of JavaFX method 'generateDeploymentPackages' failed with an error. It's possible this plugin is not compatible with the version of JavaFX you are using. InvocationTargetException: NullPointerException -> [Help 1]

But the Application (called Null.app) that is created in the "bundles" directory work perfectly!

On Mac OS you don't need any extra tools to create the dmg image file. Using the Ant method on the same project works perfectly. (But I hate Ant!!)

Default WebStart Html Template correction

There's a minor problem in the default html template for WebStart :
The javafx version shouldn't be suffixed with "+" as the app.jfxVersion is already 2.2.+

And there's a major problem :
The url parameter is kept to ${app.jnlpFileName} instead of be replacer by the template processor engine. In fact, the class ApplicationProfile does not contain the attribute jnlpFileName at all.

Cannot create project using javafx-basic-archetype

Below is the output from running mvn archetype:generate com.zenjava:javafx-basic-archetype:1.3

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.438s
[INFO] Finished at: Tue Apr 30 10:12:44 EST 2013
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to parse plugin descriptor for com.zenjava:javafx-basic-archetype:1.3 (c:.m2\repository\com\zenjava\javafx-basic-archetype
.3\javafx-basic-archetype-1.3.jar): No plugin descriptor found at META-INF/maven/plugin.xml -> [Help 1]
org.apache.maven.plugin.PluginDescriptorParsingException: Failed to parse plugin descriptor for com.zenjava:javafx-basic-archetype:1.3 (c:
m2\repository\com\zenjava\javafx-basic-archetype\1.3\javafx-basic-archetype-1.3.jar): No plugin descriptor found at META-INF/maven/plugin.x
l
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.extractPluginDescriptor(DefaultMavenPluginManager.java:212)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:147)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:235)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalcu
ator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalcu
ator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.io.IOException: No plugin descriptor found at META-INF/maven/plugin.xml
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.extractPluginDescriptor(DefaultMavenPluginManager.java:207)
... 20 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginDescriptorParsingException

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.