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

Correct format of team.scm.componentLoadRules property

I am programmatically submitting build requests using the Jazz Client APIs. I'm calling ITeamBuildRequestClient. requestBuild(IBuildDefinitionHandle buildDefinitionHandle, IBuildProperty[] newOrModifiedBuildProperties, IBuildProperty[] deletedBuildProperties, boolean allowDuplicateRequests, org.eclipse.core.runtime.IProgressMonitor progressMonitor) . I would like to be able to specify loadrules, and among the array of IBuildProperty of newOrModifiedBuildProperties (the second parameter), I created an IBuildProperty representing "team.scm.componentLoadRules." I've set its value to a string that is the filename of the loadrule file. e.g., "batch.loadrule".

I get this exception:

2016-01-28 14:00:05 [Jazz build engine] Fetching files to fetch destination "/home/Jazz_Build/_hvrqscW9EeWV6McxFPPRiQ-EBC_PROD03_WASRTC-BSK-000-00-00/jbe/build" ...
java.lang.IllegalArgumentException: Malformed component load rules property setting batch.loadrule
    at com.ibm.team.build.internal.scm.ComponentLoadRules.<init>(ComponentLoadRules.java:82)
    at com.ibm.team.build.internal.engine.JazzScmPreBuildParticipant.preBuild(JazzScmPreBuildParticipant.java:235)
    at com.ibm.team.build.internal.engine.BuildLoop.invokePreBuildParticipants(BuildLoop.java:934)
    at com.ibm.team.build.internal.engine.BuildLoop$2.run(BuildLoop.java:740)
    at java.lang.Thread.run(Thread.java:809)

Obviously, that is not the correct setting. What does the RTC server expect the team.scm.componentLoadRules value format to be in? When submitting build requests through the RTC client and specifying the loadrule, nothing goes wrong because I assume the server/build engine does the calculating of this property on its own. But whatever its value is hidden from me.

Any insight?

Is there any easier way to specify a load rule, other than creating an IBuildProperty for it? So far I haven't found anything in the APIs specifically related to load rules.

0 votes

Comments

So, I have written some logic to calculate this property's value. I am using the UUID of the component and the UUID of the file. However, my build never completes--it always fails when trying to build source. Apparently, not every project specified in the loadrule is being loaded. Does anyone have any thoughts please? Thanks.


Accepted answer

Permanent link
Okay, the reason why this was happening is because there was another set of load rule files in a different location, different than the location that I thought I was specifying. I was using the UUID for the wrong component. Thanks.
Ralph Schoon selected this answer as the correct answer

0 votes


One other answer

Permanent link
I would try to create the load rules from the UI.

the load rues format can be found here: https://jazz.net/library/article/1015 and here: https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.concert.dotnet.doc/topics/t_create_load_rule.html&scope=null

If you are unsure about how it is to be represented in the API, try to access a build definition you created in the UI and read the data.

0 votes

Comments

Hi, Ralph. Thanks for the links to the articles!

However, I'm not looking to create the load rule files--they are already there, and have been tested, and again, submitting build requests through the "regular" RTC client and specifying the load rule files works perfectly fine.

I'm concerned with the team.scm.componentLoadRules property value. I have not found any articles explaining how one set its value. I am passing this into the com.ibm.team.build.client.ITeamBuildRequestClient.requestBuild() method. The build engine doesn't complain about the values I have given it so far, but not all the projects are being loaded. I don't suspect that the actual load rule file is at fault because again, the same load rule specified with a request through the RTC client is just fine.

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
× 12,019

Question asked: Jan 28 '16, 11:26 a.m.

Question was seen: 1,766 times

Last updated: Feb 02 '16, 2:19 p.m.

Confirmation Cancel Confirm