Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

buschmais/jaxbfx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jaxbfx

Build Status

A JAXB2 XJC plugin to generate JavaFX properties.

##Getting Started

###Using Maven

Configure the JAXB-2 Maven Plugin and add jaxbfx plugin configuration:

<project>
...
<build>
    <plugins>
        <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb22-plugin</artifactId>
            <version>0.11.0</version>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <schemaDirectory>src/main/resources/xsd</schemaDirectory>
                <schemaIncludes>
                    <schemaInclude>*.xsd</schemaInclude>
                </schemaIncludes>
                <specVersion>2.2</specVersion>
                <strict>true</strict>
                <extension>true</extension>
                <removeOldOutput>true</removeOldOutput>
                <args>
                    <arg>-Xgenerate-fx-properties</arg>
                </args>
                <plugins>
                    <plugin>
                        <groupId>com.buschmais.jaxbfx</groupId>
                        <artifactId>jaxbfx-plugin</artifactId>
                        <version>1.1.0</version>
                    </plugin>
                </plugins>
            </configuration>
        </plugin>
    </plugins>
</build>
  ...
</project>

If you're running the plugin with Java 7 you might have to prevent compilation issues by adding the following dependency:

...
 <dependencies>
     <dependency>
         <groupId>com.oracle</groupId>
         <artifactId>javafx</artifactId>
         <version>2.2</version>
         <systemPath>${java.home}/lib/jfxrt.jar</systemPath>
         <scope>system</scope>
     </dependency>
 </dependencies>
 ...

To force the plugin to generate Java 8+ introduced lambda expressions (instead of anonymous classes) you have to extend the plugins configuration:

                    <arg>-Xjaxbfx-java-version</arg>
                    <arg>8</arg>

Diving In

Bugs?

Check out current issues, report a new one, or (even better) help us making it better by forking, fixing and providing Pull Requests.

##License

jaxbfx is released under the [Apache License, Version 2.0] (http://www.apache.org/licenses/LICENSE-2.0.html)

About

A JAXB2 XJC plugin to generate JavaFX properties.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages