> -----Original Message----- > From: mark mark [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 22, 2004 10:21 > To: Avalon Framework Users > Subject: Avalon and Magic - index file, imports, and dependencies > Importance: High > > In an effort to understand more about Avalon, Merlin > and Magic, I decided to try creating my own component > from scratch. Basically, I just created a very basic > component similar to the HelloComponent in the > tutorial. However, I created it in my own Eclipse > workspace area in a separate part of the filesystem > from the Avalon sources. > > I guessed that my project would depend on > avalon-framework-api and the avalon-meta-tools plugin. > > So on creating the index.xml file, I found that I > needed to import another index.xml file which defined > these dependencies. Specifically: > <import > href="http://svn.apache.org/repos/asf/avalon/trunk/runtime/index.xml"/> > > I also noted that this file imports another file: > <import index="../tools/index.xml" > href="http://svn.apache.org/repos/asf/avalon/trunk/tools/index.xml"/> > > Now I began thinking that what if my filesystem did > contain another file "../tools/index.xml" then > presumably ant would import this first before > attempting to download it using the href link.
When you import a file - the definition are handled differently. In particular, project basedirs are set to null so that the only relevant information is the resource, project or plugin identifier and dependency information. > So, is this the correct way to arrange the imports > from the index.xml file? Is there a generic file that > defines all the dependencies in Avalon which does not > bind me to a particular layout that I can include > instead of the one used below? Importing does not bind to a layout - just doing the following is the best way to include external project definitions: <import href="http://svn.apache.org/repos/asf/avalon/trunk/tools/index.xml"/> > My index.xml file looks like: > <?xml version="1.0" encoding="iso-8859-1"?> > <index> > <import > href="http://svn.apache.org/repos/asf/avalon/trunk/runtime/index.xml"/ > <project basedir="echo"> > <info> > <group>test/echo</group> > <name>test-echo</name> > </info> > <dependencies> > <include key="avalon-framework-api" > runtime="false"/> > </dependencies> > <plugins> > <include key="avalon-meta-tools"/> > </plugins> > </project> > </index> > > My component does work with the above setup. I am > just interested to find out how it should be done. > Specifically, how to include information which allows > ant/Magic to get the dependencies and plugins the > component needs. All looks fine to me. Just a note - a some time in the future we need to come up with an index that contains the released artifacts at a particular time (as opposed to the version your using which is basically the current svn truck version status). Cheers, Steve. > Regards. > Mark. > > Find local movie times and trailers on Yahoo! Movies. > http://au.movies.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
