You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michal Maczka <Mm...@cqs.ch> on 2003/06/06 15:57:28 UTC

RE: [Proposla] changes in POM needed by new features of maven-new [was:RE: Refining dependencies for test and non-test]


> -----Original Message-----
> From: David Zeleznik [mailto:dzeleznik@ilog.com]
> Sent: Friday, June 06, 2003 3:28 PM
> To: Maven Users List
> Subject: RE: [Proposla] changes in POM needed by new features of maven-new
> [was:RE: Refining dependencies for test and non-test]
> 
> Hi Michal,
> 
> I don't have a lot to add to the comments that others have already made.
> But, here goes...
> 
> When parsing XML, I prefer to see separate elements rather than
> comma-separated or multi-line text within a single element. Despite the
> verbosity increase, I therefore prefer:
> 
>    <kind>kind1</kind>
>    <kind>kind2</kind>
> 
> or
> 
>    <kind id="kind1" />
>    <kind id="kind2" />
> 
> over
> 
>    <kind>kind1,kind2</kind>
> 

I said before that this in minor issue and has nothing to do with
conception.

I am not 100 % sure if one dependency can have (or should have) two
different "kinds".
It is this what I rather wanted to dissuss...

BTW:

Somebody has better English word for "kind"?




> This also means that I don't care for property-style definitions declared
> as
> the inline text of an XML element as you propose. But, I think that the
> <properties> issue needs to be rethought as others have already suggested.
> 
> Also, I personally don't like the name "kind", it is very generic and
> conveys no meaning. If we think of a dependency belonging to 1-n sets,
> then
> I start to think of the CSS class or psuedo-class mechanisms. I am not
> sure
> why we are not taking advantage of that type of syntax in parsing the POM,
> but I could imagine something like:
> 
>     <dependency class="kind1 kind2">
> 
> Now to dependency properties. As others have said, kinds/classes/etc.
> provide a perfect substitute for binary properties. The only issue is the
> definition of non-binary properties. In XML, I prefer to stay with a
> syntax
> that looks something like:
> 
>    <property name="theProperty">theValue</property>
> 
> If properties must be defined on a per kind/class basis, then nest the
> property element under a kind element:
> 
>   <dependency>
>     <property name="aProperty">theValueForAllKinds</property>
>     <kind id="kind1">
>       <property name="aKind1Property">theValueForKind1</property>
>     </kind>
>   </dependency>
> 
> In summary, I would stick to standard XML-style syntax rather than trying
> to
> embed other textual structures inside of XML elements.
> 



For historical reason Maven XML project descriptor is not using attributes
(it was simpler to implement it in this way with betwixt). From this point
of view it will be inconsistent to use attributes in XML now.

I also don't like when in XML file you can enter whatever you like.
I think that it is equally bad to what I have proposed. So as for me my
proposition still wins as it is simpler.


Again: This is issue the less important of those 3issues I wanted to discuss
is just technical details...and certainly we (I? ;))  can make it exactly
works like it used to be.

Regards


Michal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org