User defined task for Ant

User defined task for Ant

Hello, I need to run ant build runner with user-defined task. I have the tasks defined in rbuild.jar and I have specified this commands on 'JVM command line parameters:'

-Xmx256m -classpath C:\rbuild\build\lib\rbuild.jar

Unfortunatelly, the build still fails with following message:

: taskdef class com.systinet.rbuild.task.DocValidate cannot be found[11:50:56]: The following error occurred while executing this line:
c:\TeamCity\buildAgent\work\Server\Documentation\documentation-ng\buildsystem\build.xml:25: taskdef class com.systinet.rbuild.task.DocValidate cannot be found

When looking into the teamcity-agent.log, I found this info (excerpt):
...
-Dant.home=c:\TeamCity\buildAgent\bin\..\plugins\ant "-Dbuild.vcs.number.4=04 Jun 11:37:42" -Dpath.separator=; -Xmx256m -classpath C:\rbuild\build\lib\rbuild.jar -classpath C:\TeamCity\buildAgent\plugins\ant\lib\ant-launcher.jar org.apache.tools.ant.launch.Launcher -lib
...

Since the parameter classpath is there twice, it can not work. Is there another way to specify the library for user-defined tasks? I'm using build 4161.

2 comments

Hello,

Try using additional Ant command line parameters, pass your library using -lib ]]>.

Kind regards,

KIR

0

Thanks Kirill, it helped!

0

Please sign in to leave a comment.