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

component load rules don't work on files.

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.

0 votes


Accepted answer

Permanent link
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

0 votes


One other answer

Permanent link
Hi Jeff,
Not sure if you've seen this article, but it may help you:  https://jazz.net/library/article/1015

0 votes

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

Question asked: Nov 09 '12, 6:09 p.m.

Question was seen: 5,609 times

Last updated: Nov 12 '12, 12:00 p.m.

Confirmation Cancel Confirm