It's all about the answers!

Ask a question

component load rules don't work on files.


Jeff Foege (45266960) | asked Nov 09 '12, 6:09 p.m.
c:\folder1\src1
c:\folder1\src1\abc-fldr
c:\folder1\src1\123-fldr
c:\folder1\src1\file1

I'm having trouble getting the load rules to work on files. The example above, if I only wanted the 123-fldr then I can certainly just have that folder load. However if I also wanted the file1 to load but can't seem to get the rules to load it. I did modify a rule file to include the file but when I use the rule to load a component the file won't be loaded.

Accepted answer


permanent link
Andrew Niefer (7135) | answered Nov 12 '12, 11:53 a.m.
JAZZ DEVELOPER
edited Nov 12 '12, 12:00 p.m.
Hi Jeff,
Below is a rule file that I modified to include single files.   I wrote this after reviewing the article linked by Lauren.

I created this by first using the load wizard with "Browse the components to select the folders to be loaded".  Then I generated the load file under Window > Preferences "Team > Jazz Source Control > Sandboxes > Generate Load Rules..."

I added two sections.  Here are a few comments:
  • You can only have one <item> per <itemLoadRule>, so you need to add an entire new itemLoadRule to specify your item.
  • I specified items using repositoryPath, using itemId/itemType may be more robust in case of renames/moves, you can probably use the command line to find the ids.
  • The below example shows two ways to do this. 
    1. an itemLoadRule to load a single file beside the folder that was part of the original generated rules.
    2. a parentLoadRule which specifies a folder under which everything matching the include filters will be loaded.
<scm:sourceControlLoadRule version="1" xmlns:scm="http://com.ibm.team.scm">
    <itemLoadRule>
        <component itemId="_erpo0BDuEdyJqvumb3iZNg"/>
        <!-- <component name="Repository" /> -->
        <item itemId="_Ig-SMBD1EdyPep3tN74vWg" itemType="folder"/>
        <!-- <item repositoryPath="/com.ibm.team.repository.client/links/com/ibm/team/links/client/internal" /> -->
    </itemLoadRule>

    <!-- addition 1 -->
    <itemLoadRule>
        <component itemId="_erpo0BDuEdyJqvumb3iZNg"/>
        <item repositoryPath="/com.ibm.team.repository.client/links/com/ibm/team/links/client/ILinkEvent.java" />
    </itemLoadRule>

    <!-- addition 1 -->
    <parentLoadRule>
        <component itemId="_erpo0BDuEdyJqvumb3iZNg"/>
        <parentFolder repositoryPath="/com.ibm.team.repository.client" />
        <include>
            <filter name="META-INF" />
            <filter name="plugin.xml" />
        </include>
    </parentLoadRule>
</scm:sourceControlLoadRule>
David Lafreniere selected this answer as the correct answer

One other answer



permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Nov 12 '12, 6:55 a.m.
JAZZ DEVELOPER
Hi Jeff,
Not sure if you've seen this article, but it may help you:  https://jazz.net/library/article/1015

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.