Bruce,
I'm pretty sure the ObjectName isn't sensitive to ordering, but in any
case the domain is always separated from the rest of the name=value
components, so all together I don't think any ordering is necessary
for the name keys.
David,
I could go either way on the syntax. I think overall I prefer
distinct elements for things with separate meanings, but it wouldn't
break my heart to do it the other way. The best I can come up with
for "scope" is "behavior" or "load". Maybe load is better --
load="classes" or load="gbeans" or load="both"....
The biggest change I'd request is to take the Id of the end of group
and artifact. I don't think it adds anything, and it makes it harder
to read and repeat (is that Id or ld, for example). If we really have
to keep it, I'd prefer artifact-id and group-id, but I really don't
see why we shouldn't just use group, type, artifact, and version.
Thanks,
Aaron
On 2/14/06, Bruce Snyder <[EMAIL PROTECTED]> wrote:
> On 2/14/06, David Jencks <[EMAIL PROTECTED]> wrote:
> > We need some widespread thought about the new xml schema we're
> > getting in 1.1. Dain and I are not particularly thrilled with the
> > element names but haven't thought of improvements. We also thought
> > of an alternate way of presenting the info and would like opinions on
> > which is better.
> >
> > The schema currently in svn in the configid branch results in plans
> > that start like this:
> >
> > <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
> > <environment>
> > <configId>
> > <groupId>geronimo</groupId>
> > <type>car</type>
> > <artifactId>geronimo-gbean-deployer</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > </configId>
> > <!-- name-key elements are very unlikely to be used by anything
> > except "root" system plans
> > such as j2ee-system. Included here only to show what they look like -->
> > <name-key>
> > <key>domain</key>
> > <value>geronimo.maven</value>
> > </name-key>
> > <name-key>
> > <key>J2EEServer</key>
> > <value>geronimo</value>
> > </name-key>
> > <classloader>
> > <import>
> > <groupId>geronimo</groupId>
> > <type>car</type>
> > <artifactId>geronimo-system</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > </import>
> > <dependency>
> > <groupId>geronimo</groupId>
> > <artifactId>geronimo-common</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > </dependency>
> > <include>
> > <groupId>geronimo</groupId>
> > <artifactId>geronimo-deployment</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > </include>
> > </classloader>
> > <!--reference is a new element, the meaning is that the configuration
> > must be loaded and started before this one, but the classloader of
> > the config is not a parent -->
> > <reference>
> > <groupId>geronimo</groupId>
> > <type>car</type>
> > <artifactId>geronimo-j2ee</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > </reference>
> > </environment>
> > <!--Deployer used to process modules and plans-->
> > <gbean name="Deployer"
> > class="org.apache.geronimo.deployment.Deployer">
> >
> >
> > An alternate layout is more similar to m2 with the idea of different
> > functions for a dependency shown by a "scope" element. Scope doesn't
> > seem like the right element name for us. (sorry about the lousy
> > indenting)
> >
> > <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
> > <environment>
> > <configId>
> > <groupId>geronimo</groupId>
> > <type>car</type>
> > <artifactId>geronimo-gbean-deployer</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > </configId>
> > <!-- name-key elements are very unlikely to be used by anything
> > except "root" system plans
> > such as j2ee-system. Included here only to show what they look like -->
> > <name-key>
> > <key>domain</key>
> > <value>geronimo.maven</value>
> > </name-key>
> > <name-key>
> > <key>J2EEServer</key>
> > <value>geronimo</value>
> > </name-key>
> > < dependency>
> > <groupId>geronimo</groupId>
> > <type>car</type>
> > <artifactId>geronimo-system</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > <scope>full</scope>
> > </dependency>
> > <dependency>
> > <groupId>geronimo</groupId>
> > <artifactId>geronimo-common</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > <scope>class</scope>
> > </dependency>
> > < dependency>
> > <groupId>geronimo</groupId>
> > <artifactId>geronimo-deployment</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > <scope>include</scope>
> > </dependency>
> > < dependency>
> > <groupId>geronimo</groupId>
> > <type>car</type>
> > <artifactId>geronimo-j2ee</artifactId>
> > <version>1.0.1-SNAPSHOT</version>
> > <scope>service</scope>
> > </dependency>
> > </environment>
> > <!--Deployer used to process modules and plans-->
> > <gbean name="Deployer"
> > class="org.apache.geronimo.deployment.Deployer">
> >
> > Here, the scopes have meaning as follows:
> >
> > both -- both classes and services (gbeans), like import
> > classes -- only classes, if a car don't start the gbeans for us, like
> > dependency
> > services -- only gbeans, don't add classes to our classpath, like
> > reference (new element shown in first example)
> > include -- copy the artifact into the current configuration. This
> > seems like a separate dimension not related to the previous scopes.
> >
> > Again, please study these and comment.
>
> Here are my thoughts so far.
>
> I definitely prefer the second example better because it requires
> specifying the scope on a per dependency basis. In fact, I think that
> specifying everything for a given dependency with that dependency is
> far easier to understand. I also think that this is less confusing and
> much more like Maven which many people already understand.
>
> Speaking of dependencies, I'm thinking that an element named
> dependencies should be used as a container element for each dependency
> element. Again, similar to Maven which many people already understand.
>
> I also have some additional suggestions:
>
> 1) It seems like the name-key elements should be wrapped in another
> element. Perhaps an element named name-pattern or something similar.
>
> 2) How is order specified on the name-key elements? It's important to
> assemble these elements in the proper order.
>
> 3) In fact, just allowing a single string pattern would also be a nice
> alternative too.
>
> Here is one example:
>
> <name-pattern>
> <name-key index="0">
> <key>domain</key>
> <value>geronimo.maven</value>
> </name-key>
> <name-key index="1">
> <key>J2EEServer</key>
> <value>geronimo</value>
> </name-key>
> </name-pattern>
>
> Here is another example:
>
> <name-pattern>
> domain=geronimo.maven,J2EEServer=geronmo
> </name-pattern>
>
> I know that this second example needs a bit more parsing, but it
> should be minimal.
>
> Just my $0.02.
>
> Bruce
> --
> perl -e 'print unpack("u30","D0G)[EMAIL
> PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> Apache Geronimo (http://geronimo.apache.org/)
>
> Castor (http://castor.org/)
>