Correct format of team.scm.componentLoadRules property
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
One other answer
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!
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.
Comments
Wendy Raschke
Feb 01 '16, 6:12 p.m.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.