Welcome to FEST's JavaFX Maven Plugin Documentation

This Maven plugin can be used to compile JavaFX source files.

Features

  • Compiles JavaFX sources (currently supports desktop profile only)
  • Does not require JavaFX distribution to be in a Maven repository (according to its license, only Sun can distribute JavaFX)
  • Does not require to list the JavaFX libraries as dependencies in your pom.xml

Configuration

  1. The JavaFX Maven plugin needs to know the home directory where JavaFX is. The JavaFX home directory can be specified as the environment variable JAVAFX_HOME, in the "compile" goal, or as a property in the settings.xml file. For more details please read Setting the JavaFX Home.
  2. Configure the plugin in your pom.xml file:
    <build>
      <plugins>
        <plugin>
          <groupId>org.easytesting</groupId>
          <artifactId>javafxc-maven-plugin</artifactId>
          <version>1.0b1</version>
          <executions>
            <execution>
              <id>compile</id>
              <phase>compile</phase>
              <goals>
                <goal>compile</goal>
              </goals>
            </execution>
            <execution>
              <id>test-compile</id>
              <phase>test-compile</phase>
              <goals>
                <goal>testCompile</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>

The listing above will:

  1. call the "compile" goal in the standard Maven "compile" phase.
  2. call the "testCompile" goal in the standard Maven "test-compile" phase.

For example, if we execute "mvn test" both JavaFX sources and test sources will compiled automatically.

For more details about the build lifecycle and phases please see Maven's documentation.