Unless I screwed something up in my commits (I am getting a touch
tired...) :
I added this evening the mechanism to allow us to distribute the JJAR
repository information to individual projects. The example guinea pig
is the 'Veltag' JSP taglib in the Velocity project, found in
/contrib/temporary/veltag. The intent is to allow someone to get the
veltag source (or get from CVS), fire off an ant target
$ant getjars
and have all the dependency jars show up from the repository. No muss,
no fuss, no jars in CVS (well, ok one, and we can deal with that...) -
and the developers of Veltag (ok, me...) controls the dependencies in
the Veltag project CVS.
It works like this :
1) The Veltag project is a standalone project that builds by itself. It
has in its CVS a repository.xml file that contains the JJAR definition
for Veltag. It looks like
<?xml version="1.0" ?>
<!DOCTYPE repository SYSTEM "repository.dtd">
<repository>
<!-- Velocity taglib packagegroup -->
<packagegroup name="veltag">
<!-- Veltag package -->
<package name="veltag" default="0.01-dev" latest="0.01-dev">
<definition>
<info>
<desc>Velocity JSP taglibrary</desc>
<href>http://jakarta.apache.org/velocity/</href>
</info>
<versionset>
<version version="0.01-dev">
<note>first version</note>
<jar>veltag-0.01-dev.jar</jar>
<dependencies>
<dep package="jakarta-servletapi" version="4.0"/>
<dep package="jakarta-velocity" version="1.2-dev"/>
</dependencies>
</version>
</versionset>
</definition>
</package>
</packagegroup>
</repository>
Note that it depends upon servletapi4.0 and velocity1.2-dev. I
emphasize again that this is in the Veltag project CVS, not on the
central repository.
2) The JJAR main repository (still located at a public machine I manage
- yes, I promised to move to Jakarta and will do tomorrow ["Yeah, that's
what you said last time..."] ) has an addition for Veltag that looks
like :
<package name="veltag" default="0.01-dev" latest="0.01-dev">
<remotedefinition>
http://cvs.apache.org/viewcvs/~checkout~/jakarta-velocity/contrib/temporary/veltag/repository.xml?rev=1.2&content-type=text/plain
</remotedefinition>
</package>
This directs jjar to go fetch the repository definition for veltag from
the veltag CVS, and use that to get the dependency information. There
are some yecchy things about this (like the damn rev #) but we can work
those out. This also is intended for slicing and dicing repositories
for enterprise or local use into as many bits and pieces as you wish.
As long as there is a protocol handler...
3) Finally, the Veltag project has a bin/ directory with a jjar.jar in
it (I guess I can drop into ant's lib...) and the following small mods
to the build.xml :
<property name="repository" value="lib/" />
<target name="getjars">
<jjar package = "veltag" onlydependencies="true"
localrepository="${repository}" />
</target>
so when invoked, the proper jars get downloaded to the lib/ directory.
(Yes, I need a touch more work in the build.xml to totally decouple the
build.xml, but I know how to do that.)
Anyhow, give it a look if you get a moment. I am currently inspired to
work on this, so will get a few more things cleaned up tomorrow. I will
also do my best to add as many things as possible to the repository, and
move it here to Jakarta for maximum utility.
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
System and Software Consulting
Developing for the web? See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb