I'm trying to build my JavaFX app with Maven and javafx-maven-plugin. It is not working and I cannot understand the error. I visited the first 30 pages on Google without a good answer to fix it. I'm using `mvn clean jfx:jar` to build it.

My POM looks like this:

```
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>br.com.empresa</groupId>
<artifactId>projeto</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>projeto</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <javafx.version>2.2</javafx.version>
</properties>

<dependencies>

    <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.1-901-1.jdbc4</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>eclipselink</artifactId>
        <version>2.5.0-RC1</version>
        <exclusions>
            <exclusion>
                <groupId>org.eclipse.persistence</groupId>
                <artifactId>commonj.sdo</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>5.6.1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-math3</artifactId>
        <version>3.3</version>
    </dependency>

    <dependency>
        <groupId>org.controlsfx</groupId>
        <artifactId>controlsfx</artifactId>
        <version>8.0.6_20</version>
    </dependency>

    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.0.1</version>
    </dependency>

    <dependency>
        <groupId>gov.nist.math</groupId>
        <artifactId>jama</artifactId>
        <version>1.0.3</version>
    </dependency>

    <dependency>
        <groupId>org.neuroph</groupId>
        <artifactId>neuroph-core</artifactId>
        <version>2.9</version>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.4</version>
    </dependency>

</dependencies>

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

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.2</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>

    </plugins>
</build>

<repositories>
    <repository>
        <id>oss.sonatype.org</id>
        <name>OSS Sonatype Staging</name>
        <url>https://oss.sonatype.org/content/groups/staging</url>
    </repository>

    <repository>
        <id>central</id>
        <url>http://repo1.maven.org/maven2/</url>
    </repository>

    <repository>
        <id>neuroph.org</id>
        <url>http://neuroph.sourceforge.net/maven2</url>
    </repository>
</repositories>

</project>

```

And the log looks like this:

```
[INFO] Copying 103 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ projeto ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 230 source files to C:\Trindade\workspace_trindade\projeto\trun
k\target\classes
[WARNING] /C:/Trindade/workspace_trindade/projeto/trunk/src/main/java/br/com/lug
ati/projeto/service/report/montecarlo/ExportMonteCarloReport.java:[19,16] sun.mis
c.BASE64Decoder is internal proprietary API and may be removed in a future relea
se
[WARNING] /C:/Trindade/workspace_trindade/projeto/trunk/src/main/java/br/com/lug
ati/projeto/util/UsuarioUtil.java:[6,16] sun.misc.BASE64Encoder is internal propr
ietary API and may be removed in a future release
[WARNING] /C:/Trindade/workspace_trindade/projeto/trunk/src/main/java/br/com/lug
ati/projeto/service/report/montecarlo/ExportMonteCarloReport.java:[69,25] sun.mis
c.BASE64Decoder is internal proprietary API and may be removed in a future relea
se
[WARNING] /C:/Trindade/workspace_trindade/projeto/trunk/src/main/java/br/com/lug
ati/projeto/service/report/montecarlo/ExportMonteCarloReport.java:[69,53] sun.mis
c.BASE64Decoder is internal proprietary API and may be removed in a future relea
se
[WARNING] /C:/Trindade/workspace_trindade/projeto/trunk/src/main/java/br/com/lug
ati/projeto/util/UsuarioUtil.java:[29,25] sun.misc.BASE64Encoder is internal prop
rietary API and may be removed in a future release
[WARNING] /C:/Trindade/workspace_trindade/projeto/trunk/src/main/java/br/com/lug
ati/projeto/util/UsuarioUtil.java:[29,53] sun.misc.BASE64Encoder is internal prop
rietary API and may be removed in a future release
[INFO] /C:/Trindade/workspace_trindade/projeto/trunk/src/main/java/br/com/empresa
/projeto/service/neurais/core/importacao/ColunaArquivoImportacaoNeural.java: Some
 input files use unchecked or unsafe operations.
[INFO] /C:/Trindade/workspace_trindade/projeto/trunk/src/main/java/br/com/empresa
/projeto/service/neurais/core/importacao/ColunaArquivoImportacaoNeural.java: Reco
mpile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ ep
risk ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ projeto
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Trindade\workspace_trindade\projeto\trunk\t
arget\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ projeto ---
[INFO] Surefire report directory: C:\Trindade\workspace_trindade\projeto\trunk\t
arget\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running projeto.UsuarioUtilTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ projeto ---
[INFO] Building jar: C:\Trindade\workspace_trindade\projeto\trunk\target\projeto-
0.0.1-SNAPSHOT.jar
[INFO]
[INFO] <<< javafx-maven-plugin:2.0:jar (default-cli) @ projeto <<<
[INFO]
[INFO] --- javafx-maven-plugin:2.0:jar (default-cli) @ projeto ---
[INFO] Building JavaFX JAR for application
[INFO] Adding 'deploy' directory to Mojo classpath: C:\Trindade\workspace_trinda
de\projeto\trunk/src/main/deploy
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.491s
[INFO] Finished at: Thu Mar 12 17:59:39 BRT 2015
[INFO] Final Memory: 20M/50M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:2.0:jar (default-
cli) on project projeto: Execution default-cli of goal com.zenjava:javafx-maven-p
lugin:2.0:jar failed: An API incompatibility was encountered while executing com
.zenjava:javafx-maven-plugin:2.0:jar: java.lang.NoSuchMethodError: com.sun.javaf
x.tools.packager.Log.setLogger(Lcom/sun/javafx/tools/packager/Log$Logger;)V
[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/empresa/.m2/repository/com/zenjava/javafx-maven-
plugin/2.0/javafx-maven-plugin-2.0.jar
[ERROR] urls[1] = file:/C:/Users/empresa/.m2/repository/org/twdata/maven/mojo-exe
cutor/2.0/mojo-executor-2.0.jar
[ERROR] urls[2] = file:/C:/Users/empresa/.m2/repository/org/sonatype/aether/aethe
r-util/1.7/aether-util-1.7.jar
[ERROR] urls[3] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexu
s-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[4] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexu
s-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[5] = file:/C:/Users/empresa/.m2/repository/org/sonatype/plexus/plexu
s-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[6] = file:/C:/Users/empresa/.m2/repository/org/sonatype/plexus/plexu
s-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[7] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexu
s-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[8] = file:/C:/Users/empresa/.m2/repository/org/sonatype/sisu/sisu-in
ject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[9] = file:/C:/Users/empresa/.m2/repository/org/sonatype/sisu/sisu-gu
ice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[10] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plex
us-archiver/2.1.1/plexus-archiver-2.1.1.jar
[ERROR] urls[11] = file:/C:/Users/empresa/.m2/repository/junit/junit/3.8.1/junit-
3.8.1.jar
[ERROR] urls[12] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plex
us-io/2.0.3/plexus-io-2.0.3.jar
[ERROR] urls[13] = file:/C:/Program%20Files%20(x86)/Java/jdk1.8.0_40/jre/../lib/
ant-javafx.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal c
om.zenjava:javafx-maven-plugin:2.0:jar (default-cli) on project projeto: Executio
n default-cli of goal com.zenjava:javafx-maven-plugin:2.0:jar failed: An API inc
ompatibility was encountered while executing com.zenjava:javafx-maven-plugin:2.0
:jar: java.lang.NoSuchMethodError: com.sun.javafx.tools.packager.Log.setLogger(L
com/sun/javafx/tools/packager/Log$Logger;)V
-----------------------------------------------------
realm =    plugin>com.zenjava:javafx-maven-plugin:2.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/empresa/.m2/repository/com/zenjava/javafx-maven-plugin/2
.0/javafx-maven-plugin-2.0.jar
urls[1] = file:/C:/Users/empresa/.m2/repository/org/twdata/maven/mojo-executor/2.
0/mojo-executor-2.0.jar
urls[2] = file:/C:/Users/empresa/.m2/repository/org/sonatype/aether/aether-util/1
.7/aether-util-1.7.jar
urls[3] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-interp
olation/1.14/plexus-interpolation-1.14.jar
urls[4] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-compon
ent-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[5] = file:/C:/Users/empresa/.m2/repository/org/sonatype/plexus/plexus-sec-di
spatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[6] = file:/C:/Users/empresa/.m2/repository/org/sonatype/plexus/plexus-cipher
/1.4/plexus-cipher-1.4.jar
urls[7] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-utils/
1.5.1/plexus-utils-1.5.1.jar
urls[8] = file:/C:/Users/empresa/.m2/repository/org/sonatype/sisu/sisu-inject-bea
n/1.4.2/sisu-inject-bean-1.4.2.jar
urls[9] = file:/C:/Users/empresa/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.
7/sisu-guice-2.1.7-noaop.jar
urls[10] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-archi
ver/2.1.1/plexus-archiver-2.1.1.jar
urls[11] = file:/C:/Users/empresa/.m2/repository/junit/junit/3.8.1/junit-3.8.1.ja
r
urls[12] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-io/2.
0.3/plexus-io-2.0.3.jar
urls[13] = file:/C:/Program%20Files%20(x86)/Java/jdk1.8.0_40/jre/../lib/ant-java
fx.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:224)
        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.buildProje
ct(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-c
li of goal com.zenjava:javafx-maven-plugin:2.0:jar failed: An API incompatibilit
y was encountered while executing com.zenjava:javafx-maven-plugin:2.0:jar: java.
lang.NoSuchMethodError: com.sun.javafx.tools.packager.Log.setLogger(Lcom/sun/jav
afx/tools/packager/Log$Logger;)V
-----------------------------------------------------
realm =    plugin>com.zenjava:javafx-maven-plugin:2.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/empresa/.m2/repository/com/zenjava/javafx-maven-plugin/2
.0/javafx-maven-plugin-2.0.jar
urls[1] = file:/C:/Users/empresa/.m2/repository/org/twdata/maven/mojo-executor/2.
0/mojo-executor-2.0.jar
urls[2] = file:/C:/Users/empresa/.m2/repository/org/sonatype/aether/aether-util/1
.7/aether-util-1.7.jar
urls[3] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-interp
olation/1.14/plexus-interpolation-1.14.jar
urls[4] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-compon
ent-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[5] = file:/C:/Users/empresa/.m2/repository/org/sonatype/plexus/plexus-sec-di
spatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[6] = file:/C:/Users/empresa/.m2/repository/org/sonatype/plexus/plexus-cipher
/1.4/plexus-cipher-1.4.jar
urls[7] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-utils/
1.5.1/plexus-utils-1.5.1.jar
urls[8] = file:/C:/Users/empresa/.m2/repository/org/sonatype/sisu/sisu-inject-bea
n/1.4.2/sisu-inject-bean-1.4.2.jar
urls[9] = file:/C:/Users/empresa/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.
7/sisu-guice-2.1.7-noaop.jar
urls[10] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-archi
ver/2.1.1/plexus-archiver-2.1.1.jar
urls[11] = file:/C:/Users/empresa/.m2/repository/junit/junit/3.8.1/junit-3.8.1.ja
r
urls[12] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-io/2.
0.3/plexus-io-2.0.3.jar
urls[13] = file:/C:/Program%20Files%20(x86)/Java/jdk1.8.0_40/jre/../lib/ant-java
fx.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:144)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
        ... 19 more
Caused by: org.apache.maven.plugin.PluginContainerException: An API incompatibil
ity was encountered while executing com.zenjava:javafx-maven-plugin:2.0:jar: jav
a.lang.NoSuchMethodError: com.sun.javafx.tools.packager.Log.setLogger(Lcom/sun/j
avafx/tools/packager/Log$Logger;)V
-----------------------------------------------------
realm =    plugin>com.zenjava:javafx-maven-plugin:2.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/empresa/.m2/repository/com/zenjava/javafx-maven-plugin/2
.0/javafx-maven-plugin-2.0.jar
urls[1] = file:/C:/Users/empresa/.m2/repository/org/twdata/maven/mojo-executor/2.
0/mojo-executor-2.0.jar
urls[2] = file:/C:/Users/empresa/.m2/repository/org/sonatype/aether/aether-util/1
.7/aether-util-1.7.jar
urls[3] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-interp
olation/1.14/plexus-interpolation-1.14.jar
urls[4] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-compon
ent-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[5] = file:/C:/Users/empresa/.m2/repository/org/sonatype/plexus/plexus-sec-di
spatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[6] = file:/C:/Users/empresa/.m2/repository/org/sonatype/plexus/plexus-cipher
/1.4/plexus-cipher-1.4.jar
urls[7] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-utils/
1.5.1/plexus-utils-1.5.1.jar
urls[8] = file:/C:/Users/empresa/.m2/repository/org/sonatype/sisu/sisu-inject-bea
n/1.4.2/sisu-inject-bean-1.4.2.jar
urls[9] = file:/C:/Users/empresa/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.
7/sisu-guice-2.1.7-noaop.jar
urls[10] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-archi
ver/2.1.1/plexus-archiver-2.1.1.jar
urls[11] = file:/C:/Users/empresa/.m2/repository/junit/junit/3.8.1/junit-3.8.1.ja
r
urls[12] = file:/C:/Users/empresa/.m2/repository/org/codehaus/plexus/plexus-io/2.
0.3/plexus-io-2.0.3.jar
urls[13] = file:/C:/Program%20Files%20(x86)/Java/jdk1.8.0_40/jre/../lib/ant-java
fx.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:142)
        ... 20 more
Caused by: java.lang.NoSuchMethodError: com.sun.javafx.tools.packager.Log.setLog
ger(Lcom/sun/javafx/tools/packager/Log$Logger;)V
        at com.zenjava.javafx.maven.plugin.AbstractJfxToolsMojo.getPackagerLib(A
bstractJfxToolsMojo.java:109)
        at com.zenjava.javafx.maven.plugin.JarMojo.execute(JarMojo.java:108)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:106)
        ... 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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine
rException
'cmd' is not recognized as an internal or external command,
operable program or batch file.
C:\Trindade\workspace_trindade\projeto\trunk>

```