David Let me try to answer some of your questions. Ill answer inline.
On 5 October 2010 18:03, David Sills <dsi...@datasourceinc.com> wrote: > Archie: > > Thanks so much for your example. However, there's still a lot I don't > understand. Let's start with the (simple?) first thing: > > <dependencies> > <dependency org="org.apache.log4j" name="log4j" rev="1.2.15" > conf="javac,test->default"/> > <dependency org="net.sourceforge.jibx" name="jibx" rev="1.2.2" > conf="base->runtime-xpp3,extras;bind->bind"/> > <dependency org="org.xmlpull.xpp3" name="xpp3" rev="1.1.3.4.O" > conf="javac->default"/> > </dependencies> > > I understand that this means: > > 1. There are 3 dependencies for the module. Correct. As so far in direct API dependencies. There could be transitive dependencies drawn in. > 2. The JAR file log4j-1.2.15 is required in some cases. Yes in your javac and test configurations you require log4j's default configuration. > 3. The JAR file jibx-1.2.2 is required in some cases. Yes. in your base configuration you require jibix's runtime-xpp3 and extras configuration and in your bind configuration you require jibix's bind configuration. > 4. The JAR file xpp3-1.1.3.4.0 is required in some cases. Yes, in your javac configuration you require xpp3's default configuration. > > After that, I part company from understanding. > > It seems to me that the "conf" attribute means: > > 5. The JAR file log4j-1.2.15 is used in the javac and test > configurations. I have no idea at all what "->default" means, and the > discussion in the documentation has successfully confused my entire > office. Perhaps a bit of clarification might be possible? Effectivly -> does this mapping: main -> runtime means my main needs the dependencies runtime configuration. As spelt out more verbosly above. These can be seperate lists so main,test->runtime,testutils means my main and test confs need the dependencies runtime and testutils. you can also have multiple mappings seperated by ';' as you see in your second dependency. > 6. The JAR file jibx-1.2.2 is required in the javac, test, and runtime > configurations by virtue of being required in base. What "bind->bind" > means is completely obscure. Again, what "->runtime-xpp3,extras" means > is also not clear - these are not configurations that are defined in > your file, so I would hazard a guess that they must be defined in some > Ivy file at the "net.sourceforge.jibx" organization in the Google code > repository (guessing based on ivysettings.xml). If this is correct, how > on earth can one keep track of other people's Ivy files, which I presume > may change at will? Its not obscure its your name of your conf saying it needs the artifcats and dependeices that are needed in the dependencies 'bind' configuration. looking at the ivy file will show what is drawn in. hopefully the author will have this documented in description. Big enterpriose repositorys should not change there exposed files but later versions may have more confs / less artifacts etc. you will see this when changing version. > 7. The JAR file xpp3-1.1.3.4.0 is required in the javac configuration > (that is, not for runtime or test). Again, "javac->default" is not > clear, as no default is defined in this file (but may be somewhere else, > as before). see above :) however default is special. If no confs are stated then it uses one configuration only which is called default. Also if you state conf="runtime" it will automatically look for the dependencies 'runtime' configuration as conf="runtime" is short hand for conf="runtime->runtime". > > I understand quite well what the file is supposed to do - the overall > concept is clear, it's the little things, like this. > > Any help would be gratefully received. Sorry for a short answer but trying to give as much information without to much verbosity. confs are not immediatly apparent but when you understand them they are truly great and very powerful. HTH in some way. > > David Sills > > > -----Original Message----- > From: archie.co...@gmail.com [mailto:archie.co...@gmail.com] On Behalf > Of Archie Cobbs > Sent: Tuesday, October 05, 2010 11:50 AM > To: ivy-user@ant.apache.org > Subject: Re: Question about documentation > > Maybe a simple example would help? > > If you are familiar with ant, then you should be able to decode this > little > project <http://code.google.com/p/jibx-bindings/source/browse/>. All it > does > is use ivy to pull in a few JARs during the build, test, etc. phases. It > uses some included ant macros to simplify the build.xml, etc. The ivy > files > are under trunk/src/ivy. > > There is a separate "public" ivy file that is used to represent this > code > module in a repository, which is viewable (styled as HTML) > here<http://ivyroundup.googlecode.com/svn/trunk/repo/modules/org.dellroa > d/jibx-bindings/1.0.7/ivy.xml> > . > > -Archie > > -- Alex Foreman