ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: Adding specific jar to classpath
Date Tue, 24 Mar 2009 14:15:18 GMT
So, you already have a classpath defined, and you just want to add an
additional JAR to it?

If you have that path as a property:

<path id="new.classpath">
     <pathelement path="${old.classpath}"/>
     <pathelement location="${additional.jar}"/>
</path>

If you have that previous path as a reference:

<path id="new.classpath">
    <path refid="old.classpath"/>
    <pathelement location="${additional.jar}"/>
</path>

Or, you can cheat (For example, this is for a <javac> task):

<java
    srcdir="${src.dir}"
    destdir="${dest.dir}"
    classpath="${old.classpath}:${additional.jar}"/>

Note that the colon in the value for "classpath" will convert over to
a semicolon on Windows systems.


On Mon, Mar 23, 2009 at 6:14 PM, eyalg1972 <eyal_goren@bmc.com> wrote:
>
> Hi,
>
> Does anyone knows how to add a specific jar to the classpath?
>
> I know that there is a property- additional.classpath, but I don't know how
> to use it...
>
> Eyal
> --
> View this message in context: http://www.nabble.com/Adding-specific-jar-to-classpath-tp22670440p22670440.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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