Javafx Compiler Maven Plugin
Total Page:16
File Type:pdf, Size:1020Kb
JavaFX Compiler Maven Plugin New version found at JavaFX Maven Plugin What does it do? The unique goal of this plugin is "compile". The plugin will compile javafx source files without interfering with the java compiler. It activates the javafxc Ant task using the Maven model to fill the classpath and other parameters. All generated class files will be generated under the standard maven dir "target /classes" and so packaged and distributed by Maven automatically. Resources Binaries distribution On JFrog public Artifactory repository jfrog-javafx-plugin The source code on JFrog subversion repository: jfrog-javafx-plugin The JIRA project for bug reports and next features: JFXCP The maven generated site: jfrog-javafx-plugin Activating the plugin Just add the following plugin to your pom.xml file: <plugin> <groupId>org.jfrog.maven.plugins</groupId> <artifactId>jfrog-javafx-plugin</artifactId> <executions> <execution> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> And the following plugin repository to your settings.xml or pom.xml (best practice is to do it in a profile): <pluginRepository> <id>jfrog-plugins-dist</id> <name>jfrog-plugins-dist</name> <url>http://repo.jfrog.org/artifactory/plugins-releases-local</url> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> JavaFX dependencies has Maven2 POM declaration To use javafx SDK jars in your project you need to declare the following dependencies in your POM file: <dependencies> <dependency> <groupId>javafx</groupId> <artifactId>javafxrt</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>javafx</groupId> <artifactId>javafxgui</artifactId> <version>1.1.1</version> </dependency> </dependencies> Standard configuration The default source path for javafx project is: src/main/javafx and if you have resources under it you need to add in your POM: <resource> <directory>${project.basedir}/src/main/javafx</directory> <excludes> <exclude>**/*.fx</exclude> </excludes> </resource>.