It's all about the answers!

Ask a question

RTC Build error for MSBuild


Arun Sathiamurthy (5675) | asked Jun 29 '11, 10:54 a.m.
Hi,

I'm trying to build .NET project using RTC. I have configired the build using RTC visual studio integraation and used msbuild command.

The build fails with the error message
C:\play_load_area\ConsoleApplication2\jazzbuild.xml:5: The following error occurred while executing this line:
C:\3.0\TeamConcertBuild\buildsystem\buildtoolkit\BuildToolkitTaskDefs.xml:24: taskdef class com.ibm.team.build.ant.task.ArtifactFilePublisherTask cannot be found

I googled around and found this issue happens if the build system in installed in a path with spaces
https://www-304.ibm.com/support/docview.wss?uid=swg21432073


But my Buildkit path does not have any space. Interestingly when I go inside the folder "C:\3.0\TeamConcertBuild\buildsystem\buildtoolkit", I m not able to find the relevant class file for which the build is failing..

Any help,pointers would really be appreciated...

Thanks
Arun

6 answers



permanent link
Brent Ulbricht (2.5k11) | answered Jun 29 '11, 11:50 a.m.
JAZZ DEVELOPER
Hi,

I'm trying to build .NET project using RTC. I have configired the build using RTC visual studio integraation and used msbuild command.

The build fails with the error message
C:\play_load_area\ConsoleApplication2\jazzbuild.xml:5: The following error occurred while executing this line:
C:\3.0\TeamConcertBuild\buildsystem\buildtoolkit\BuildToolkitTaskDefs.xml:24: taskdef class com.ibm.team.build.ant.task.ArtifactFilePublisherTask cannot be found

I googled around and found this issue happens if the build system in installed in a path with spaces
https://www-304.ibm.com/support/docview.wss?uid=swg21432073


But my Buildkit path does not have any space. Interestingly when I go inside the folder "C:\3.0\TeamConcertBuild\buildsystem\buildtoolkit", I m not able to find the relevant class file for which the build is failing..

Any help,pointers would really be appreciated...

Thanks
Arun


Hi Arun,

The error indicates that the Jazz build toolkit Ant tasks are not on the Ant library path. If you're using a build template type of 'Ant - Jazz Build Engine', then you can check the 'Include the Jazz build toolkit tasks on the Ant library path' and it will be included automatically.

If you're invoking Ant directly from a command line, then you would need to use the -lib argument with the directory of the build toolkit (ex. 'ant -f build.xml -lib installdir/buildsystem/buildtoolkit').

If these solutions don't work for you, let me know which build definition template you're using and how you're invoking Ant.

Brent Ulbricht
RTC Build Lead

permanent link
Arun Sathiamurthy (5675) | answered Jun 29 '11, 12:04 p.m.
Hi Brent,

Thanks for the quick reply.

I'm tyring to build .net projet so i'm using build template for visual studio (jazz visual stdio build engine). In the template, I have configured to use msbuild.

Forgot to mention earlier, i have used -lib option in my build xml file to point to buildkit folder. But still I get the error. The interesting part is that i have checked inside the buildkit folder and can't locate the class file it is expeciting in the error message.

permanent link
Pradeep Balachandran (663) | answered Jun 29 '11, 1:09 p.m.
JAZZ DEVELOPER

I have used -lib option in my build xml file to point to buildkit folder. But still I get the error.


Hi Arun,

Could you please paste the lib option in here for our reference?

Pradeep

permanent link
Arun Sathiamurthy (5675) | answered Jun 30 '11, 12:44 a.m.
Hi Pradeep,

This was the command -

"C:\3.0\TeamConcertBuild\jre\bin\java.exe" -cp "C:\3.0\TeamConcertBuild\buildsystem\buildengine\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\lib\ant-launcher.jar" org.apache.tools.ant.launch.Launcher -cp "C:\Program Files\ibm\TeamConcert\jdk\lib" -lib "C:\3.0\TeamConcertBuild\buildsystem\buildtoolkit"-DactivityLabel=startActivity -propertyfile "C:\3.0\TeamConcertBuild\buildsystem\buildengine\eclipse\mybuild.properties" -f C:\play_load_area\ConsoleApplication2\jazzbuild.xml startActivity"

permanent link
Krishna Kishore (50112) | answered Jun 30 '11, 1:52 a.m.
JAZZ DEVELOPER
Hi Arun,

Are you following the article "https://jazz.net/library/article/518" to setup you build?

Also would you let us know if the build works correctly with out the ant callbacks, i.e can you just run the build with out the ant callbacks and check if the compilation and other build steps are executed successfully. This would help us to know if the problem is in the ant callbacks or in the MSBuild template.

Hi Brent,

Thanks for the quick reply.

I'm tyring to build .net projet so i'm using build template for visual studio (jazz visual stdio build engine). In the template, I have configured to use msbuild.

Forgot to mention earlier, i have used -lib option in my build xml file to point to buildkit folder. But still I get the error. The interesting part is that i have checked inside the buildkit folder and can't locate the class file it is expeciting in the error message.

permanent link
J D (111) | answered May 15 '15, 5:19 p.m.
This is an oldy but didn't see an answer to it so I thought I'd comment on what caused this for me and then see if someone has an answer for the issue I'm having.
I converted an old cmd line build that we we had for VS that ran in RTC to follow using msbuild with ant.  I used a combination of https://jazz.net/library/article/518 mentioned above along with http://blog.boriskuschel.com/2012/03/automated-builds-using-visual-studio.html  - the main difference between the two is that in Boris's blog instead of using pre and post build events you actually modify the .csproj and add the BeforeBuild and AfterBuild target.  By copying and modifying this example, it caused the same error listed  taskdef class com.ibm.team.build.ant.task.ArtifactFilePublisherTask cannot be found for the BeforeBuild target but not for the second.  I modified the Exec command to add a space between "$(AntCommand) -Dactivity so it looked like the following and this worked for both the pre and post build targets.  So similar to what was referenced above with white spaces for the build engine but not quite.

 <Exec Command="$(AntCommand) -DactivityLabel=startActivity $(propertyFile) $(jazzbuildxml) startActivity" />

My question is now that I have this resolved - when I was having this problem, I would see in the log file that BUILD FAILED for this section but the overall build succeeded.  So my question is why didn't the build fail?  If there are errors anywhere else in the build or if the compile fails the build will fail but not for this.  I have it working currently but want to make sure that if there is an issue in the future with either of my pre or post build tasks that these are captured by the RTC build and the build fails.


Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.