You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Russell Gold <ru...@gmail.com> on 2004/08/26 14:23:09 UTC

Contribution: dependencies task

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.


Re: Contribution: dependencies task

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Russell Gold wrote:
> On Thu, 26 Aug 2004 17:24:29 +0200, Nicola Ken Barozzi
> <ni...@apache.org> wrote:
> 
>>Russell Gold wrote:
>>
>>>Attached is code and unit tests for a task which will download and
>>>manage dependencies from a maven-style remote repository.
>>
>>If you are interested, Incubator Depot
>>http://incubator.apache.org/depot/ has a similar tasl and goals, and we
>>could work together.
> 
> I must have missed something. The page you cited shows projects to get
> the *latest* version of dependencies, but not specified versions.

Not at all, it's meant to also do what your task does.

"The Depot Project deals with integrated tools for automating 
downloading (with security checks), publishing (new artifacts) and 
managing the contents of the apache repository. It also focuses on 
additional tools for manipulating metadata of the artifacts.
"

> Can you tell me more about Incubator Depot?

It's OT on this list, so if you are interested we could talk over at 
depot-dev@incubator.apache.org .

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Contribution: dependencies task

Posted by Russell Gold <ru...@gmail.com>.
On Thu, 26 Aug 2004 17:24:29 +0200, Nicola Ken Barozzi
<ni...@apache.org> wrote:
> Russell Gold wrote:
> 
> > Attached is code and unit tests for a task which will download and
> > manage dependencies from a maven-style remote repository.
> 
> If you are interested, Incubator Depot
> http://incubator.apache.org/depot/ has a similar tasl and goals, and we
> could work together.

I must have missed something. The page you cited shows projects to get
the *latest* version of dependencies, but not specified versions.  Can
you tell me more about Incubator Depot?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Contribution: dependencies task

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Russell Gold wrote:

> Attached is code and unit tests for a task which will download and
> manage dependencies from a maven-style remote repository.

If you are interested, Incubator Depot 
http://incubator.apache.org/depot/ has a similar tasl and goals, and we 
could work together.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Contribution: dependencies task

Posted by Matt Benson <gu...@yahoo.com>.
Russell:  This sounds cool but would be considered to
be an external task.  If you have or can find a place
to host it we will be happy to add it to the External
Tools and Tasks section on the Ant site.

Thanks,
Matt

--- Russell Gold <ru...@gmail.com> wrote:

> 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.
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
dev-help@ant.apache.org



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org