It's all about the answers!

Ask a question

Load rules in JBE aren't working as expected


Karthik Krishnan (8899123165) | asked Jun 15 '16, 10:22 a.m.
edited Jun 17 '16, 11:34 a.m. by David Lafreniere (4.8k7)
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

Comments
Karthik Krishnan commented Jun 17 '16, 10:02 a.m. | edited Jun 17 '16, 11:26 a.m.

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

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Jun 17 '16, 11:30 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
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

Comments
Karthik Krishnan commented Jun 20 '16, 12:03 p.m. | edited Jun 22 '16, 9:59 a.m.

 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.


David Lafreniere commented Jun 22 '16, 10:43 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

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)


Ralph Schoon commented Jun 22 '16, 10:49 a.m. | edited Jun 22 '16, 10:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Karthik Krishnan commented Jun 23 '16, 11:54 a.m.

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


Your answer


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