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. |
Accepted answer
![]()
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
|
One other answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Feb 02 '16, 1:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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. Comments Hi, Ralph. Thanks for the links to the articles!
|
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.
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.