Getting started with the Maven archetype

Creating new Java projects from scratch can be a bit tortuous as you have to
provide the right component, some initial code and some way of building
it. Using Maven these problems can all be resolved so that starting a new
project is exceptionally easy process. Specifically it will create a new
set of directories and files, add in the build definitions and ensure all
the dependent resources are available. This is the work of the Maven
Archetype plugin.

Naked Objects uses the feature of Maven to create new Naked Object
application in a couple of commands. What I am going to describe now is
the same as for other Maven archetype, the only additional task is to
specify where the archetype is to be found. We maintain that catalog on
our website so to build a application from scratch type in the following
(assuming that you have Maven 2.1 or 2.2 installed, see
http://maven.apache.org/download.html).

$ mvn archetype:generate -DarchetypeCatalog=http://nakedobjects.org

You will then be prompted with a list of archetypes (at time of
writing there is only one).

Read more »

Scimpi release 0.4

Following on from Dan Haywood’s talk yesterday at Devoxx09, I have made Scimpi available for you to play with.  Instructions are available on the new web page (see http://scimpi.org/) .  It’s very simple to get started using Maven’s archetype facility. To create a new webapp use the following command:

$ mvn archetype:generate -DarchetypeCatalog=http://nakedobjects.org/snapshot-catalog.xml

Select the scimpi-archetype-quickstart archetype and after entering a suitable group id and artifact id you are ready to build and run the application.

$ cd mywebapp
$ mvn install
$ mvn jetty:run

Now browse to http://localhost:8080/mywebapp/ (where the last part needs to be the artifact ID that you specified in the first step) to see the opening page. This uses a very simple domain model with only one class so the view is not very interesting yet.

Screenshot-Application template - Mozilla Firefox

With it running, it’s time to add details to the existing class and add some new ones. And it’s time to look at the documentation (see http://scimpi.org).

New web sites

We have been reviewing our documentation strategy and have now adopted Maven’s site format.  This allows us to keep the website and documentation in perfect sync and avoid both the need for duplication and the problem of having to hunt for the content when it is only in one place.  The existing documentation is now an integral part of the web site, and the whole thing can also be downloaded as a set of web pages or a single PDF file.

With such a dramatic changes there could be a few teething problems so please bear with us as we resolve these and let us know if you come across anything that’s not right. Specifically email webmaster at nakedobjects dot org.

The web sites are http://www.nakedobjects.org and http://www.scimpi.org.

Getting started with Naked Objects Version 4.0

As we have recently released the next version of Naked Objects I thought it would be a good idea to do a series of blogs introducing various aspects of it.  The first is about how to get it and run it.

Naked Objects is available, as before, from SourceForge (http://sourceforge.net/projects/nakedobjects/) but now you have a choice about how you use it: with Maven, Ant or just using the jars with your favourite IDE. Maven provides the most flexibility, so that is what I’m going to look at now.  Although with Maven you can get up and running without downloading anything from SourceForge, I strongly recommend that you start off by downloading nakedobjects-4.n.n-for-maven.zip or nakedobjects-4.n.n-for-maven.tar.gz from the download page.  This will ensure that you have access to the documentation, some useful resources like icons and a set of examples that you can browse and run, and later experiment with. Once downloaded extract the contents and you’ll end up with a directory called nakedobjects-4.n.n.

Read more »

Next Page »