ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: Getting task class *only* from specified path
Date Mon, 01 Nov 2010 16:23:48 GMT
When you use a <taskdef>, you can specify the classpath to use to
point to the jarfile. ut the jarfile used by <taskdef> inside your
project, and then set classpath to load that jarfile. For example, Put
the jarfile in "${basedir}/antlib" and then define your taskdef like
this:

<taskdef resource="path/to/resource.xml">
    <classpath>
        <fileset dir="${basedir}/antlib"/>
    </classpath>
</taskdef>

If you use a version control system, put the jarfile in your version
control system, and users will check out the correct version when they
checkout the project.

On Sun, Oct 31, 2010 at 11:53 AM, Andreas Krey <a.krey@gmx.de> wrote:
> Question: I need a user task; I do load it via explicit class path in
> the taskdef. Unfortunately I need to use that version, but users may
> have older ones in their .ant/lib. How can I keep ant (1.7) from
> loading that version?
>
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
David Weintraub
qazwart@gmail.com

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


Mime
View raw message