Last updated April 18, 2012 18:06, by sonyabarry
Feedicon  

The Nelson Framework Wiki


Nelson Mandela

This is the Nelson Project

Created by Peter Pilgrim, who is a Java Champion, founder and organiser of the JAVAWUG (Java Web User Group, London, UK

Peter wrote a blog entry The Nelson Framework, which describes the project in its JavaFX 1.1 state. At JavaOne 2009 in his technical session, Peter announced to audience that he would open source the JavaFX framework that he was developing privately. This, then, is the Nelson Framework.

The current code base is JavaFX 1.2 and is a work-in-progress.

There is no official release yet.

License

The Nelson Framework software is open source and licensed under Mozilla Public License (MPL 1.1).

How To Get Started?

Software Tools

These are the recommended tools and software


Environment Variables

Configure the following environment variables for your operating system. Here are Windows XP / Vista / 7 settings:

 JAVA_HOME=C:\Program Files\Java\jdk1.6.0_14

It helps to point to a version of the JDK

 JAVAFX_HOME=C:\opt\javafx-sdk1.2

Obviously, one needs a JavaFX installation on one's machine

 ANT_HOME=C:\opt\apache-ant-1.7.1

Nelson FX requires an Apache Ant build the software

 
 ANT_OPTS=-Dplatform.fxhome=%JAVAFX_HOME%

The setting above, points Ant to the correct JavaFX, when building the project(s), standalone outside of NetBeans IDE.

Finally you need to set your PATH environment variable, before you raise a brand new Windows CMD shell.

 PATH=%JAVAFX_HOME%\bin;%JAVAFX_HOME%\emulator\bin;%ANT_HOME%\bin;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;.... ETC ...


Getting the Source Code

If really does help to be a member of Kenai. Some people have had some trouble registering with Kenai. One suggests an alternative. Register as a Sun Developer Network member first. SDN member can log into Kenai with their SDN user name.

To get the latest source code, perform the following:

 svn checkout https://kenai.com/svn/nelson~nelson-framework-svn/nelson-fx1.2/core/trunk
 nelson-core

This will bring down the Nelson Core project.

 svn checkout https://kenai.com/svn/nelson~nelson-framework-svn/nelson-fx1.2/examples/trunk
 nelson-examples

This will bring down the codebase for the Nelson Examples project.

(In the future, there is a plan to create a Nelson Master project in a similar vain, which build everything. As they used to say in the X Windows 11 development distribution make world | tee make_world.log 2>&1 and then everyone who did this would go away and make a cup of tea, have dinner, take the kids to a movie or so. Just kidding ;-) There will be a Nelson Master project though)

How To Get The Dependencies

Getting back to the Nelson Core project. After the check out of the source code from Kenai, please invoke the bootstrap build file like this:

 ant -f bootstrap.xml

This command will pull down from the Internet, iBliblio, a copy of Apache Ivy, Findbugs, Corbertura etc. These will be installed in the tool folder of the project.

Now execute Apache Ivy

 ant ivy-resolve

This command invokes Ivy to pull down the project's dependencies into the lib folder of the project.

Unfortunately before you can build you need grab some dependencies manually.

Manual Dependencies

Goto Stephen Chin's JFXtras Project and perform the following sub-steps.

  • Download the JFXtras-0.5.jar from JFXtras project. Copy the jar to the project's lib folder.
  • Download the JFXtras-Test-05.jar also, but also copy and rename that JAR to lib folder with the filename ``JFXtras-test-05.jar



Build The Software

In the Core project, execute the following

 ant jar

This Ant command builds the entire project and creates the project JAR file

The following ANT commands are useful

 ant -f bootstrap.xml

Executes the bootstrap Ant build file to download external project tools. This separate build file downloads Apache Ivy, Cobertura, Findbugs into the ``tools folder for the project. (Note: You only have to do this once).

 ant prepare

Prepares the build environment, downloads artifacts from Maven 2 and external repositories, if required

 ant compile

Compiles the main application code

 ant jar

Builds the project and creates the target JAR

 ant clean

Removes the build environment targets and compiled artificats

 ant install-local

Installs the target JAR into your local Apache Ivy repository.

 ant compile

Compiles the unit test code

 ant test-compile

Compiles the unit test code

 ant test

Runs unit test and generates results

 ant ivy-resolve

Resolves the project dependencies with Apache Ivy (see ``ivy.xml and ``ivysettings.xml)

 ant ivy-report

Generates dependencies HTML Report with Apache Ivy (see ``ivy.xml)

EXTRAS

 ant findbugs

Runs FindBugs on the code base and generates reports, if enabled in the project

 ant coverage

Runs Cobertura on the code base and generates reports, if enabled in the project


By the way, these Ant build targets also work in the Nelson Examples project too.


Project Organisation


Source code is under the ``src directory and follows the Maven 2 directory layout conventions.

  • src/main/javafx The folder for main JavaFX source code
  • src/main/resources The folder for main resources
  • src/test/javafx The folder for unit test JavaFX source code
  • src/main/resources The folder for unit test resources

The build file is compatible with the NetBeans 6.5 Ant file, however you do not need NetBeans to run it. In order to compile the code, you need to set the variables `nbprojects/project.properties' in order to point to the JavaFX SDK 1.2 distribution on your machine.

Good Luck

After following these instructions, you will have a working project. Please let us know how you get on. Contact us on the mailing list or Twitter

Peter Pilgrim http://twitter.com/peter_pilgrim Blog http://jroller.com/peter_pilgrim

  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close