Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Build result kjm_test_snapshot2 does not have a "start" request

I create a build def using the java api
I create a build result using the java api
When I display the build result using the eclipse client it displays correctly, bu I see this this
error in the error log.
How do I fix this this problem? Do I have to create a start request, how would I do that?


IBuildDefinition buildDef = BuildItemFactory.createBuildDefinition(projectArea);
IBuildResult result = BuildItemFactory.createBuildResult(buildDef);
ITeamBuildClient buildClient = (ITeamBuildClient) repo.getClientLibrary(ITeamBuildClient.class);      
buildClient.save(result,MONITOR);

0 votes



One answer

Permanent link
Add a build request and the error goes away, this require the the build definition to have a build engine

        ITeamBuildRequestClient requestClient = (ITeamBuildRequestClient) repo.getClientLibrary(ITeamBuildRequestClient.class);
        IBuildRequest buildRequest = requestClient.requestBuild(buildDef, true, MONITOR);
        IBuildResultHandle buildResultHandle = buildRequest.getBuildResult();
        IBuildResult result_real = (IBuildResult)repo.itemManager().fetchCompleteItem(buildResultHandle,IItemManager.DEFAULT, MONITOR);           
        IBuildResult result = (IBuildResult) result_real.getWorkingCopy();

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Nov 25 '13, 12:49 p.m.

Question was seen: 5,918 times

Last updated: Nov 25 '13, 4:47 p.m.

Confirmation Cancel Confirm