geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bohn <joe.b...@earthlink.net>
Subject Samples yet again .... archetype
Date Mon, 08 Sep 2008 21:50:26 GMT

I'm looking at samples yet again in the hopes of getting them in shape 
to release them .... we really, really need to get them out.

One of the outstanding issues regards the archetype.  I'm wondering if 
it still makes sense to provide and document the archetype function.

The archetype was created to assist in creating new samples.  I think 
the original idea was that it would make it easy for users to create new 
samples that could then be contributed back to Geronimo.  A good idea.

With some local fixes I have it mostly working again and I can create a 
sample from under our /Samples/ directory with the following command:

mvn -Pcreate -DsampleName=mySample -DsampleVersion=myVersion

This basically creates a shell of a sample that can then be enhanced.


Here are some of my concerns and why I'm thinking it might make sense to 
drop the capability.

- In order to create a sample that can cover just about anything, the 
archetype produces the following structure:
/Users/bohn/geronimo-samples-2.1/samples/mySample
    |-mySample-ear
    |---src
    |-----main
    |-------resources
    |---------META-INF
    |-mySample-ejb
    |---src
    |-----main
    |-------java
    |---------org
    |-----------apache
    |-------------geronimo
    |---------------samples
    |-----------------ejb
    |-mySample-jetty
    |---src
    |-----main
    |-------plan
    |-mySample-tomcat
    |---src
    |-----main
    |-------plan
    |-mySample-war
    |---src
    |-----main
    |-------java
    |---------org
    |-----------apache
    |-------------geronimo
    |---------------samples
    |-----------------servlets
    |-------webapp
    |---------WEB-INF
    |-src
    |---main
    |-----resources


- The above structure no longer matches what we have in other samples 
where we cleaned-up unnecessary ear packaging.  I think it would be very 
complicated to attempt to make the structure more intelligent based upon 
the type of the sample the user wanted to create.  If we keep it, we'll 
keep the catch-all structure.

- Having the archetype complicates our version management for samples. 
If we allow a user to create their own sample with their own version 
under /Samples/ it means that we must hard-code the "released" sample 
version in more places rather than using $version (which might be a 
different version when the user is creating their own sample).

- We have converted all current samples over generate plugins and we 
point the user to the plan.xml to look into the deployment plan.  This 
was also included in the output of the archetype.  That's good from a 
consistency perspective.  However, it implies that a user contributing a 
sample would also be well versed in plugins and know to provide plan.xml 
content rather than or in addition to geronimo-application.xml.

What are your thoughts on keeping the sample archetype or removing it?

Joe

Mime
View raw message