Thanks a lot, Steve... I tried with a snapshot version as well, but the behaviour is still the same, the jar gets downloaded once, but if the file has changed on the server, it does not get downloaded again... I was using
m_hBlock = m_hModel.addContainmentModel( new URL(null, "artifact:xyz/SampleModule#SNAPSHOT", new ArtifactHandler())); ..anything I missed out? One other query re. file based repository - if I add a file-based repository to the list of hosts to search for, the block installed using the code below does NOT get copied to the user's avalon cache... ..if the repository is a HTTP server, it gets downloaded... The reason we need this is because in our situation, in some cases, the file server is located behind a slow link... Re. the block.xml file vs. the jar's .meta file : the jar's .meta file has the list of dependent jars generated using the artifact:install maven goal. Do I need to explicitly specify this list in the <classloader> section in the block.xml file or will this list be automatically added to the block's classloader from the .meta file? If I have to specify this in the block.xml file, is there any way to auto generate this from maven's project.xml? Any pointers will be helpful... Brgds, R. Saravanan On Wed, 15 Sep 2004 02:40:46 +0200, Stephen McConnell <[EMAIL PROTECTED]> wrote: > > > > -----Original Message----- > > From: Rajamani Saravanan [mailto:[EMAIL PROTECTED] > > Sent: 14 September 2004 20:57 > > To: Avalon framework users > > Subject: Repository API query > > > > Hi, > > > > I have one query re. the repository API: I'm loading a block > > dynamically from inside my code - the block's jar and the .meta files > > are located on a local repository (locally running tomcat instance). > > The code I've used is this: > > > > m_hBlock = m_hModel.addContainmentModel( > > new URL(null, "artifact:xyz/SampleModule#0.1", new > > ArtifactHandler())); > > > > m_hBlock.commission(); > > > > The code works fine, the block gets downloaded, installed to the local > > avalon repository, and instantiated. The question is: if the timestamp > > of the jar is changed on the server but the version number is not > > changed (the .meta file contains the changes), will the next call to > > the above code check for the timestamp change? > > No. > > > If no, can this be done > > at all, what should I do to enable this check? > > Set the artifact to SNAPSHOT. > > > Again, the URL can also be of the form "block:xyz/SampleBlock#0.1" : > > what is the difference between using this syntax and the above one? If > > I use this code, the file that gets tried for downloading is > > "xyz/SampleBlock-0.1.block" - what is the structure of a .block file? > > A block file is exactly the same as the file in BLOCK-INF/block.xml with > one addition - it contains a reference to the jar within the > classloader. Personally I just use blocks (referred to as standalone > blocks) because it gives me a little more flexibility on deployment (you > can play around with the block without having to rebuild the jar). > > Cheers, Steve. > > > > Any pointers will be helpful... > > > > Brgds, > > > > R. Saravanan > > > > --------------------------------------------------------------------- > > 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]