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

Load rules in JBE aren't working as expected

I have a stream with > 150 components. I would like to load only certain components(50). So I "Generated" a Load rule using Eclipse with the loaded components.

I used this load rule in Build definitions, but it didn't work as it was trying to load the selected components and excluding the others components (names) but loading the contents of excluded components

I started adding the following for "Exclude" components in the load rule like below

<itemLoadRule alternateName="Development">
        <component name="Development" /> 
        <item repositoryPath="/.project" />
</itemLoadRule>
This works but fails for components which doesn't have .project file (obviously)

My questions are the following:
  • Are there any ways to exclude components without entering one by one in the load rule file? 
  • How can this be maintained for newer components?
using RTC 6.0.1 build toolkit and server

0 votes

Comments

In other words, how can I exclude components from loading using "Load Rules" ?


Accepted answer

Permanent link
Please see comment 5 and comment 7 in Load workspace from load rules file behaves differently when performed by a build (371621).
What you would need to do is add the components you do not want to load to the list of "Components to exclude" on the "Jazz Source Control" tab of the build definition; or if using the 'TeamFetchTask' Ant task, you can use the 'componentsToExcludeByName' or 'componentsToExcludeByUUID' Ant property. The other option is to modify the build workspace to only include the components you intend to load during a build.
Ralph Schoon selected this answer as the correct answer

0 votes

Comments

 Hi @Daviddl


Thanks for your feedback. Writing this as answer as comment field is less.

- We have 1 stream with 4 variants
- Each variant has differnt sets of components to load, hence we have 4 load rules
- Dev's use the load rules to load the respective variant
- We have 4 build definitions, one for each variants

Expectations:
- Use respective Load rules in respective build defintions 
to be sure that Dev's and Builds use same set of components

As you have mentioned in comments of ER 371621, Build loads all folders. 

We have issues with following methods:
- Buid workspace having only respective components
- Using "Components Exclude list" in build defintions 

Issue: Someone need to maintain either (when a component is added/removed) of this and more error prone. 

If the "Load rule" in build definition is enabled, then we are sure that this picks up correct and updated load rule.
Yes the load rule needs to be maintained by hand but this can be done by a developer and deliver this change set.

As mentioned in my question, close to exclude component loading is by poviding a .project file to load . Sadly this file isn't present in all components and that throws error.

Isn't there any exlcude filter in component to exclude all files & folders? excluding a component would be the best.

I understand the concerns around having to manage either the 'components to exclude' list or the actual components in the build workspace (coupled with scoped flow targets so they are not re-added on every build).

It would be nice if this enhancement were to be fixed to avoid these problems: Load workspace from load rules file behaves differently when performed by a build (371621)

As David's answer is correct, i will accept it as such. If Karthik expects a different behavior in the tool I would suggest to create a PMR/ER or to support the work item David mentions above.

Thank you. We will look to create RFE/ER via Support.


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
× 562

Question asked: Jun 15 '16, 10:22 a.m.

Question was seen: 2,763 times

Last updated: Jun 23 '16, 11:54 a.m.

Confirmation Cancel Confirm