You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Zeleznik <dz...@ilog.com> on 2003/06/06 15:28:15 UTC

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>

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.

--------------------------------------
David Zeleznik
ILOG - Changing the rules of business
mailto:dzeleznik@ilog.com
http://www.ilog.com
--------------------------------------





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


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

Posted by Rafal Krzewski <Ra...@caltha.pl>.
David Zeleznik wrote:

 > 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">

This seems to me to be the most elegant notation from the propoosed
to date.

The reason why attributes where not used at all in POM was the Betwixt
based parser. I consider this a big disadvantage -- it's kind of like
wearing shoes with shoelaces missing... I know that maven-new is using
xmlpull, but I don't know how will that affect attribute support in
POM. There are some things could certainly used id/ref semantics, for
example <organization> sections.

> 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.

Make sense. I hope we'll be able to limit the number of neccessary 
dependedncy annotations, but if we can't get rid of them, this syntax 
seems quite appealing.

R.



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


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

Posted by Michal Maczka <mm...@interia.pl>.
Few more things to this thread:

I would like to prioritize what we have to do with maven-new like this:

1. Put every thing together
2. Add support for group dependencies (define it, implement, test, test,
test)
3. Add support for transitive dependencies


we have still a lot of work for point #1 (few week I would say).


Only thing I want to add  to maven-new: is notion of "kind" of dependency.
I don't want to touch the transitive/group dependencies now.

But to discuss what <kind> tag means (will mean) it's necessary to see a big
picture
and already think ahead about group/transitive dependencies.

For me <kind> tag should be seen as the name of the classpath to which given
dependency will be added.
And certainly one dependency can be added to few classpath.
For me <kind> should be purely used for naming classpath and should not be
used for noting "transitive nature"
of the dependency.

Regarding <properties> tag:

<properties>
  <classloader>root</classloader>
</properties>

<properties>
  <war.bundle.jar>root</war.bundle.jar>
</properties>


those things probably can be expressed using notion of <kind>.

So I would like to hear opinions just about the idea (forget about how it
will look in XML ..those are just low level technical details).

Once we will agree on what we want to do... we will surly find an XML syntax
for that.


Michal

> -----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>
>
> 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.
>
> --------------------------------------
> David Zeleznik
> ILOG - Changing the rules of business
> mailto:dzeleznik@ilog.com
> http://www.ilog.com
> --------------------------------------
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ----------------------------------------------------------------------
> Miejsce WARSZAWSKICH spotkan >>> http://link.interia.pl/f1736
>
>
>



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