I think we need to distinguish two kind of extra metadata: those used to identify the module, and those which are pure information. IMO extra attributes on the info tag are good candidates for the first kind of extra meta information: - because it's how they work now - because the info tag attributes are mainly identifying the module.
So I think it's better to distinguish the other kind of extra information, and you seem to agree, so this is fine :-) Now about how to define these extra information, how to name them, and how they can be used. IMO, if we introduce something in the core for maven 2 compatibility, it's better to try to find a use case for users who use Ivy files only. So I think we need at least to find a syntax in Ivy files to support setting this additional extra information. Now about calling them properties and making them available as properties in the Ivy file. What I like about that is that: - it uses an existing concept in Ivy, so we don't need to define a new one - it answers to a use case that at least I've had before (so I guess other users have too), where I need a property in an ivy file and don't want to define it outside my ivy file About the added complexity, I think we need to distinguish two kind of complexity: complexity in Ivy code, and complexity for users. IMO, it's something pretty easy to understand by users, because we reuse an existing and well known concept. In Ivy code, I don't think it make it really more complex, if we allow to use a property only after it is declared (so if the property definition comes after the info tag in the xsd, we won't be able to use locally defined properties in the info tag). We already do this kind of substitution for globally defined properties, and it can be easily factored at the beginning of the startElement method, so I don't see much added complexity here. So I'm still in favor of this properties support in Ivy files. Did I manage to change your mind ? :-) Xavier On Thu, Feb 14, 2008 at 8:51 AM, Gilles Scokart <[EMAIL PROTECTED]> wrote: > I think that storing some extra free values is nice, but I'm not convinced > that using real properties is a good thing. It add some complexity to the > parsing of the ivy files (where can you use property, can use it inside > proerty declaration for instance). If I look at maven pom, it is one of > the > thing that make it more complexe, with making it more powerfull. > > I think the extra value should just be values. For instance, if someone > want to store a bug tracking url, an organisation specific code, or > anything > else in its ivy file, he could store it there. > > I thought the extra data could be used for that. In the doc [1], it is > not > clear that when you use extra data in the info tag, you MUST use it also > in > the dependency tag of the module that use it. I think that should be > enhanced. > > Anyway, I will add an extraInfo field to the module descriptor. Maybe, we > can even retrofit all the content of info into it. > > > [1] http://ant.apache.org/ivy/history/latest-milestone/concept.html#extra > > Gilles > > > 2008/2/13, Xavier Hanin <[EMAIL PROTECTED]>: > > > > On Feb 13, 2008 9:10 AM, Gilles Scokart <[EMAIL PROTECTED]> wrote: > > > > > In the rewrite of the pom parser, I would like to store the maven > > > dependency > > > managment (and maybe also the properties) into the extra data of the > > > moduleRevisionId. > > > > > > That way, the corresponding ivy module descriptor would contains all > the > > > info coming from the pom. I think it might be usefull when it is > > > serialized > > > are reused from the cache (thought I'm not sure if it's the original > pom > > > or > > > the serialized ivy.xml that is used in that case). > > > > > > However, I have noticed that the extra attributes are used to compare > > > moduleRevisionId, and I fear that might bring some problem. Does it? > > > > > > Probably. > > > > > > > > > And > > > is it normal to use the extra attributes in this comparison? > > > > > > I think so, many time people use extra attributes in the info tag to add > > extra identification attributes. I don't really think putty meta > > information > > such as the dependency management information in extra attributes is a > > good > > fit. But I like the idea of keeping data from dependency management > > section. > > Maybe a good way to do it would be to add a Map of properties to the > > module > > descriptor. This would be another area of flexibility for Ivy users, and > > I'd > > even see usage for Ivy files, if we actually make them usable as > > properties > > in the Ivy file. Something like: > > <ivy-module version="2.0"> > > <info org="foo" name="bar" /> > > <property name="foo.baz.revision" value="1.0.4" /> > > <dependencies> > > <dependency org="foo" name="baz-api" rev="${foo.baz.revision}" /> > > <dependency org="foo" name="baz-main" rev="${foo.baz.revision}" /> > > <dependency org="foo" name="baz-other" rev="${foo.baz.revision}" /> > > </dependencies> > > </ivy-module> > > > > WDYT? > > > > Xavier > > > > > > > > > > > -- > > > Gilles Scokart > > > > > > > > > > > > > -- > > Xavier Hanin - Independent Java Consultant > > http://xhab.blogspot.com/ > > http://ant.apache.org/ivy/ > > http://www.xoocode.org/ > > > > > > -- > Gilles Scokart > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/