How can I add jars to ant's classpath?

Hi,

how can I add additional jars to the classpath that is used by the internal Team City ant? Ant tasks like <script language="javascript"> require additional bsf, log4j and rhino jar files to be present on the class path of ant.

TeamCity is running as SYSTEM on windows.

Thanks,

Dirk

0
3 comments

Usually there is no need to add additional jars to the Ant itself. You need to define task with help of <taskdef/> with correct classpath.

0

Thanks for the tip. Unfortunately, this is only true for custom ant task and not for the <script> tag that is already included with the ant distribution.

The only workaround that I have found so far is to add the required jars (bsf.jar, js.jar, log4j.jar) the ant/lib directory of the worker. But that feels like a workaround. I also tried adding a -classpath parameter to the java command line but that didn't solve the problem.

Any ideas?

Dirk

0

I think you can try to add necessary jars via Ant command line parameter

-lib
0

Please sign in to leave a comment.