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

How can I prevent named files in subdirectory from being loaded via "Load Rules" file?

I have a component called "CompA" with directory structure of:

/code
  fileA.txt
  fileB.txt
  fileC.txt
/config
  conf1.props
  conf2.props
Can I use a load rules file to prevent fileC.txt from being loaded by developers?  I've tried the following load rule file with no success:

<scm:sourceControlLoadRule eclipseProjectOptions="import" version="1" xmlns:scm="http://com.ibm.team.scm">
    <parentLoadRule>
        <component name="CompA"/>
        <parentFolder repositoryPath="/"/>
  <exclude>
   <filter name="fileC.txt"/>
  </exclude>
    </parentLoadRule>
</scm:sourceControlLoadRule>

0 votes



One answer

Permanent link
Hi Chris,

It looks like you've got the right idea, taken right from Loading with Load Rules in Rational Team Concert 4.0 and later, section Example: Loading with filters.  It just looks like you're missing the XML declaration and the xmlns is an encoded link.  Try the loadrules below.

Scott

<?xml version="1.0" encoding="UTF-8"?>
<scm:sourceControlLoadRule xmlns:scm="http://com.ibm.team.scm" version="1">
    <parentLoadRule>
        <component name="CompA"/>
        <parentFolder repositoryPath="/"/>
        <exclude>
            <filter name="fileC.txt"/>
        </exclude>
    </parentLoadRule>
</scm:sourceControlLoadRule>

2 votes

Comments

Dang!  I can't seem to get the forum to display the xml declaration or the camel case, but you can see it in Example: Loading with filters.

The XML in the description looks right but I don't think the "exclude" tag will work on files. There article that Scott posted mentions the "excludeFilter" tag that looks like it will work on files. https://jazz.net/library/article/1015#excludeFilter

1 vote

Scott,


I had the same problem with the XML declaration, that's why i left it out. 

Tim,


I've tried to get the excludeFilter to work, but every time I've gotten an error.  It may be my inability to decipher the syntax from the document....

Anyone have an example on how to use excludeFilter? 

Hi Chris,

I believe this will work for you,

<?xml version="1.0" encoding="UTF-8"?>
<scm:sourceControlLoadRule xmlns:scm="http://com.ibm.team.scm" version="1">
    <excludeFilter>
        <filter name="fileC.txt"/>
    </excludeFilter>
    <parentLoadRule>
        <component name="CompA"/>
        <parentFolder repositoryPath="/"/>
    </parentLoadRule>
</scm:sourceControlLoadRule>

1 vote

FYI, I had to look at the Appendix : Load Rule schema to figure out where to put the excludeFilter element in relation to the parentLoadRule element, and the order matters.

showing 5 of 6 show 1 more comments

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,034

Question asked: Aug 13 '13, 2:43 p.m.

Question was seen: 4,915 times

Last updated: Aug 15 '13, 10:47 a.m.

Confirmation Cancel Confirm