> -----Original Message-----
> From: Tim O'Brien [mailto:[EMAIL PROTECTED]
> Sent: mardi 12 février 2008 16:03
> To: Maven Developers List
> Subject: Re: An Attribute Based POM
> 
> 
> On Feb 12, 2008, at 3:58 AM, Benjamin Bentmann wrote:
> 
> >> For example, we'd can group groupId/artifactId/version into one
> >> attribute
> >> like this:
> >>
> >> <dependency artifact="org.apache.maven:maven-project:2.0.8" [...] />
> >
> > Please don't do this. This would require another parsing step after
> > the XML
> > parsing and introduces further error sources. Use XML to structure
> > the data,
> > not some proprietary format. Third-party tools dealing with the POM
> > will
> > also appreciate a proper/pure XML representation of the project model.
> > Consider for instance the pain such string aggregates would cause
> > for XSLT
> > processing of the POM. Merging different pieces of data into a
> > single string
> > is in general a bad idea.
> 
> 
> Couldn't disagree more.   Certain data has a native format.  Consider
> something like a 24 hour time.   Is:
> 
>        <time>23:22:22.003</time>
> 
> an "undue burden" on different parsers?   No, this is reasonable.
> This would be unreasonable:
> 
>        <time hour="23" minute="22" second="22" millis="003"/>
> 
> The idea that we have to design data around parsers means that you
> sacrifice usability and readability.
> 
> I'd take it one step further than Emmanuel:
> 
> <dependencyGroup root="org.apache.maven">
>   <dependency artifact="maven-project:2.0.8"/>
>   <dependency artifact="continuum:continuum-model:1.1"/>
> </dependencyGroup>
> 
> Should be:
> 
> <dependGroup root="org.apache.maven">
>    maven-project:2.0.8
>    continuum:continuum-model:1.1
> </dependGroup>
> 
> XSLT can tokenize strings just fine.
> 


Than why to use XML?  Why not have simple text?

No seriously, keep the organisation and artefact separated from the version.  
There are plenty of use case that needs to
identify them separately (like the management of the conflict, the management 
of the dependent projects).

If you really want something more textual, I suggest you look at buildr.  It 
give you something like this :

AXIOM  = group("axiom-api", "axiom-impl", "axiom-dom",  
                   :under=>"org.apache.ws.commons.axiom", version=>"1.2.4")
AXIS2 = "org.apache.axis2:axis2:jar:1.2"
OPENJPA = ["org.apache.openjpa:openjpa-all:jar:0.9.7", 
"net.sourceforge.serp:serp:jar:1.12.0"]
AXIS_OF_WS = [AXIS2, AXIOM]

compile.with OPENJPA, AXIS_OF_WS


Why not?  It might be user friendly (for some users...).  But I don't want to 
see this in a repository.  IMO, XML is
much better.


Gilles







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to