Like all Java frameworks Naked Objects is essentially a set of classes and other resources that you run your code with. There are a number of ways of developing with Naked Objects: downloading a traditional distribution and installing it on your machine; or using Maven to create and manage your Naked Object projects. Which you choose is a matter of preference and familiarity.
To develop or run Naked Objects applications you need Java version 1.5 or above installed on your machine.
To develop applications you will need a suitable development environment. If you have the choice, we recommend using Eclipse, because there are some specific plug-ins available for Eclipse to facilitate developing with Naked Objects. However, Naked Objects may be used with any IDE, or even just the JDK.
The latest version of the Naked Objects framework can be downloaded from the downloads page, which is essentially a set of links to the Naked Objects Sourceforge project as shown below. You may download either the Ant release (suffixed with -for-ant ), the Maven release (suffixed with -for-maven), the full source release (suffixed with -source) if you wish to build the framework yourself, or simply a Jar file that bundles in all the dependencies but has no documentation or other resources.
TODO: update the following screenshot
Extract the downloaded file's content into a suitable directory (a root directory is created upon extraction so there is no need to create a directory in which to install everything).
The binary release for Ant provides the following directories and files:-
For more details on developing using Ant, see Building Apps with Ant.
The binary release for Maven contains supporting resources (including icons, examples and this documentation) but does not include the Naked Objects or third party libraries themselves however, because Maven itself downloads them from the Maven central repository when they are needed.
The distribution contains the following directories and files:-
Because the Maven distribution does not include the libraries, there is no immediately runnable demo. However as indicated above the examples are still there and can be built using Maven (or imported into an Eclipse or other IDE and built there).
For more details on developing using Maven, see Building Apps with Maven.
The source release contains a series of Maven projects for the different subcomponents of Naked Objects, it libs, examples and documentation. This source can be used, with the templates in the distribution directories, to recreate the distributions that are made publicly available.
To install the framework and all its components into your local repository, and generate the distribution files use the maven install goal with the all profile:
$ cd nakedobjects-4.0 $ mvn clean install -P all
Any missing resources that maven complains about are can be installed into the repository by specifying the specific Jar file from the lib directory when following the instructions that Maven gives you.
Using the source release Maven will build the same files that you would download if you had downloaded a binary version. The distribution files (as detailed for the binary release above) are to be found within the directory distribution/tarball/target as shown below.
distribution/ |-- documentation |-- examples |-- pom.xml |-- tarball | |-- pom.xml | |-- src | `-- target | |-- archive-tmp | |-- nakedobjects-4.0-for-ant.tar.gz | |-- nakedobjects-4.0-for-ant.zip | |-- nakedobjects-4.0-for-maven.tar.gz | |-- nakedobjects-4.0-for-maven.zip | |-- nakedobjects-4.0-source.zip | `-- nakedobjects-4.0-libs-only-with-dependencies.jar `-- target
With the core libraries and plugins build, the final step is to install the archetype so that new projects can be created from the local archetype, rather then the publicly available one.
$ cd archetypes/application $ mvn clean install
A final option is to use the jar of jars. This is a single jar file that contains all the other jars. This allows you simplify your projects by simply having that one jar on your classpath. However, this leaves you to set up your projects from scratch.
This release is often useful later, however, when you have created an application and wish to distribute your own way.