It's all about the answers!

Ask a question

Can I use a directory name variable in the .jazzignore list?

Chad Baker (1315) | asked Jun 17 '15, 1:31 p.m.
 I have a .txt file that needs to be on my ignore list, but I can't use "*.txt" because there are .txt files that I actually care about.  The file that needs to be ignored will always have a name that is the same as the directory that contains it.  Is there a way to ignore "PresentWorkingDirectory.txt" where PresentWorkingDirectory is a variable?   

One answer

permanent link
Ralph Schoon (61.4k33643) | answered Jun 18 '15, 4:12 a.m.
You can not use a variable, you can use specific file names, also recursively.

From my .jazzignore:

### Jazz Ignore 0
# Ignored files and folders will not be committed, but may be modified during 
# accept or update.  
# - Ignore properties should contain a space separated list of filename patterns.  
# - Each pattern is case sensitive and surrounded by braces ('{' and '}').  
# - "*" matches zero or more characters.  
# - "?" matches a single character.  
# - The pattern list may be split across lines by ending the line with a 
#     backslash and starting the next line with a tab.  
# - Patterns in core.ignore prevent matching resources in the same 
#     directory from being committed.  
# - Patterns in core.ignore.recursive matching resources in the current 
#     directory and all subdirectories from being committed.  
# - The default value of core.ignore.recursive is *.class 
# - The default value for core.ignore is bin 
# To ignore shell scripts and hidden files in this subtree: 
#     e.g: core.ignore.recursive = {*.sh} {\.*} 
# To ignore resources named 'bin' in the current directory (but allow 
#  them in any sub directorybelow): 
#     e.g: core.ignore.recursive = {*.sh} {\.*} 
# NOTE: modifying ignore files will not change the ignore status of 
#     Eclipse derived resources.

core.ignore.recursive= \

core.ignore= \
{artifacts.jar} \
{bin} \
{content.jar} \
{features} \

A file name is also just a pattern, just without variables, so you should be able to do that. 
If you use the Team>Add to ignore list, the dialog actually allows you to select this very specific:

Your answer

Register or to post your answer.