incubator-depot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject [Fwd: Contribution: dependencies task]
Date Thu, 26 Aug 2004 12:32:12 GMT


-------- Original Message --------
Subject: Contribution: dependencies task
Date: Thu, 26 Aug 2004 08:23:09 -0400
From: Russell Gold <russgold@gmail.com>
Reply-To: Ant Developers List <dev@ant.apache.org>
Newsgroups: gmane.comp.jakarta.ant.devel

Attached is code and unit tests for a task which will download and
manage dependencies from a maven-style remote repository. The
unit-tests contain detailed descriptions of the functionality:

Here is an example:

<dependencies pathId=all.jars>
     <dependency group="rhino"      version="1.5R4.1"/>
     <dependency group="junit"      version="3.8.1"  if="use.junit"/>
     <dependency group="nekohtml"   version="0.8.1" />
</dependencies>

This will download to a local cache if necessary the rhino, junit, and
nekohtml jars and define an ant-path which contains them and can be
used in a javac/java task. Specifying a "fileSetId" attribute on the
dependencies task would define a fileset, as would be useful for a
copy or jar task.

Each dependency must specify its group and version, and optionally
type and artifact, which have the same meanings as in maven. That is,
the file will be identitied as
<group>/<type>s/<artifact>-<version>.<type>. If not specified,
artifact defaults to the same as group, and type defaults to "jar".
Alternately, the name attribute can override the name computed from
artifact and version.

Each dependency may specify an "if" and/or "unless" attribute to make
its inclusion in the path/fileset (and download) dependent on the
values of the properties.



-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------

Mime
View raw message