openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Gallimore <>
Subject Maven Quickstart Archetypes
Date Fri, 06 Nov 2009 00:09:00 GMT
Hi All,

I don't know if anyone will find this useful, but I've been playing around a
bit with Maven Archetypes, and I created a couple of quickstart archetypes
for OpenEJB. One creates a simple EJB project, complete with a simple
stateless bean, a unit test, includes all the necessary dependencies and
will add the right Eclipse WTP configuration to work with the OpenEJB
Eclipse Plugin. The other does the same for a complete EAR project. The
latter still needs a bit of work (and I'd quite like to add the functional
testing stuff I wrote about here:
but I thought I'd post them up in case anyone had any comments.

Currently I've deployed a mini-repository on my website with the necessary
stuff, and you can generate a project by doing the following:

$ mvn -DarchetypeCatalog= -DarchetypeRepository= archetype:generate (the trailing / on the URL
is necessary for some reason)

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:generate] (aggregator-style)
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =>
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart
Choose archetype:
1: -> maven-openejb-quickstart
2: -> maven-openejb-quickstart-ear
Choose a number:  (1/2):

Once you've followed the wizard, you should be able to cd to the newly
created project, and run:

$ mvn install eclipse:eclipse

This should compile everything, run the tests and create an Eclipse project
ready to be imported to your workspace.

I've put some source code up here: -
I'm more than happy to check it into SVN if anyone thinks its useful. Any
comments will be gratefully received.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message