Adam Bien's Weblog

Tuesday Apr 10, 2012

Building Java FX 2 Libraries From Source With Maven 3

  1. Get the sources: hg clone http://hg.openjdk.java.net/openjfx/2.2/master/rt. For subsequent updates use: hg pull -u
  2. Create a JavaFX profile with a pointer to the javafx 2.2. SDK. Hence not all sources are open yet, this is a necessary step:
    
    <profile>
    	<id>javafx</id>
    <activation>
    	<activeByDefault>false</activeByDefault>
    </activation>
    <properties>
    	<fx.home>[PATH TO JAVAFX INSTALLATION]/javafx-sdk2.2.0-beta/</fx.home>
    </properties>
    </profile>
    
       
  3. Execute: mvn -Pjavafx clean install
  4. You should see the following output:

    
    [INFO] javafx ............................................ SUCCESS [0.740s]
    [INFO] test-stub-toolkit ................................. SUCCESS [2.676s]
    [INFO] javafx-beans-dt ................................... SUCCESS [1.080s]
    [INFO] javafx-concurrent ................................. SUCCESS [1.385s]
    [INFO] javafx-ui-controls ................................ SUCCESS [9.607s]
    [INFO] javafx-designtime ................................. SUCCESS [0.479s]
    [INFO] javafx-ui-common .................................. SUCCESS [8.973s]
    [INFO] javafx-rt ......................................... SUCCESS [2.241s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 27.337s
    
    

  5. Pick your own fx-runtime library from: javafx-ueber-jar/target/jfxrt.jar
  6. Run tests, file bugs: Java FX Jira :-)


NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Comments:

The build seems to work, the tests in javafx-beans-dt fail.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] javafx ............................................ SUCCESS [0.860s]
[INFO] test-stub-toolkit ................................. SUCCESS [6.812s]
[INFO] javafx-beans-dt ................................... FAILURE [3.000s]
[INFO] javafx-concurrent ................................. SKIPPED
[INFO] javafx-ui-controls ................................ SKIPPED
[INFO] javafx-designtime ................................. SKIPPED
[INFO] javafx-ui-common .................................. SKIPPED
[INFO] javafx-rt ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Failed tests:
displayNameOnBeanWithNoAnnotationBut_resources_entryMatchesTheEntry(com.sun.ja
vafx.beans.metadata.BeanMetaDataTest): expected:<[Golden Delicious]> but was:<[A
pple]>
displayNameOnBeanWithNoAnnotationBut_OrangeResources_entryMatchesTheEntry(com.
sun.javafx.beans.metadata.BeanMetaDataTest): expected:<[Florida ]Orange> but was
:<[]Orange>
displayNameOnBeanWithNoAnnotationBut_bothResources_entryMatchesThePearResource
sEntry(com.sun.javafx.beans.metadata.BeanMetaDataTest): expected:<[Juicy ]Pear>
but was:<[]Pear>
displayNameOnBeanWithAnnotationWithLeadingPercentResultsInResourceBundleLookup
(com.sun.javafx.beans.metadata.BeanMetaDataTest): expected:<[Raspberry]> but was
:<[%imposter]>
displayNameOnBeanWithAnnotationWithLeadingPercentResultsInResourceBundleLookup
2(com.sun.javafx.beans.metadata.BeanMetaDataTest): expected:<[Fruit]> but was:<[
%Wannabe]>

Posted by tbee on April 15, 2012 at 03:44 PM CEST #

I tried to build JavaFX 2.2 but I'm getting the following test errors:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on project javafx-beans-dt: There are test failures.

Posted by Tobi on April 16, 2012 at 01:03 PM CEST #

@All,

yes, some unit tests are failing, but I'm glad the maven script is working for you :-)

We have now two possibilities:
1. -DskipTests
2. Fix the bugs, write a patch (hg patch --git > my.patch), create a JIRA issue: http://javafx-jira.kenai.com/

I will try to fix some tests as well!

OpenSource is harder, than expected :-)

--adam

Posted by Adam Bien on April 18, 2012 at 02:27 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
...the last 150 posts
...the last 10 comments
Links
License