openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Gallimore <jonathan.gallim...@gmail.com>
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:
http://openejb.apache.org/functional-testing-with-openejb-jetty-and-selenium.html)
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=http://jrg.me.uk/repository/ -DarchetypeRepository=
http://jrg.me.uk/repository/ 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]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[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
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: http://jrg.me.uk/repository/ -> maven-openejb-quickstart
(maven-openejb-quickstart)
2: http://jrg.me.uk/repository/ -> maven-openejb-quickstart-ear
(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: http://jrg.me.uk/assets/quickstart.zip -
I'm more than happy to check it into SVN if anyone thinks its useful. Any
comments will be gratefully received.

Cheers,

Jon

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