Hey, A generic archetypes for only OpenEJB would be really useful. Just one for an OpenEJB embedded client - where you get a sample EJB, the dependencies and a unit test that loads up the embedded container. Many times i find myself just wanting to create a quick project for trying/testing something. Such an archetype would save a lot of time.
I've never done this, so the source code in quickstart.zip. Does that contain everything I would need to make such an archetype? Quintin Beukes On Fri, Nov 6, 2009 at 2:09 AM, Jonathan Gallimore < [email protected]> wrote: > 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 >
