It's all about the answers!

Ask a question

.jazzignore exclusions not made with lscm cli


Aretha Kebirungi (1314) | asked Mar 03 '15, 10:53 p.m.
edited Mar 03 '15, 11:18 p.m.
Using command line lscm in RTC 4.0.6, my component projects are loaded into subdirectories in my workspace and I place a .jazzignore file in each (java) project root directory.

Project directory structure
workspace_dir                    #.jazz5 here & run lscm commands here
|
---workspace_subdir
   |
   ---MyProjectRoot               #the java project root
        [project files....]  
        MyProjectRoot.iml target .idea .jazzignore .project
.jazzignore file contains:
core.ignore =  {.jazzignore} {.idea} {target}
With the above, I still see all the files and folders specified in my ignore list as Unresolved changes when I run 'lscm show status'. Did take look at Qn 104068: .jazzignore not working w/RTC CLI? but in my case, all the resources I want to ignore are in the project root directory so creating a .jazzignore shouldn't be needed in subdirectories.

Not sure why this doesn't work. Quite a few of the tools in the graphical client don't necessarily have a corresponding CLI implementation. Perhaps this is one of them in this version?



Comments
Evan Hughes commented Mar 04 '15, 2:55 p.m. | edited Mar 04 '15, 3:00 p.m.
JAZZ DEVELOPER

That's strange. It works for me with a 5.0.2 client:

echughes@tpechughes igCheck3$ lscm status
Workspace: (1000) "ignoreTestWs" <-> (1000) "ignoreTestWs"
  Component: (1001) "ignoreTestWs Default Component"
    Baseline: (1002) 1 "Initial Baseline"
    Unresolved:
      a-- /shared/child/dir_with_ignore_file/.jazzignore
      a-- /shared/child/dir_with_ignore_file/.project
      a-- /shared/child/dir_with_ignore_file/idea
      a-- /shared/child/dir_with_ignore_file/MyProjectRoot.iml
      a-- /shared/child/dir_with_ignore_file/target
    Outgoing:
      Change sets:
        (1003) ---@  "Share" 04-Mar-2015 02:44 PM
# Set the contents of the ignore file here
echughes@tpechughes igCheck3$ lscm status
Workspace: (1000) "ignoreTestWs" <-> (1000) "ignoreTestWs"
  Component: (1001) "ignoreTestWs Default Component"
    Baseline: (1002) 1 "Initial Baseline"
    Unresolved:
      a-- /shared/child/dir_with_ignore_file/.project
      a-- /shared/child/dir_with_ignore_file/idea
      a-- /shared/child/dir_with_ignore_file/MyProjectRoot.iml
    Outgoing:
      Change sets:
        (1003) ---@  "Share" 04-Mar-2015 02:44 PM

(I'm trying with 4.0.6 now, btw)

Accepted answer


permanent link
Evan Hughes (2.4k1318) | answered Mar 04 '15, 3:38 p.m.
JAZZ DEVELOPER
I've verified that I can create a layout similar to yours, run 'status', add a .jazzignore file, and hide the selected items:
echughes@tpechughes project_dir$ lscm status
Workspace: (1001) "igTest" <-> (1001) "igTest"
  Component: (1002) "igTest Default Component"
    Baseline: (1003) 1 "Initial Baseline"
    Unresolved:
      a-- /share_root/directory/project_dir/.idea
      a-- /share_root/directory/project_dir/.jazzignore
      a-- /share_root/directory/project_dir/.project
      a-- /share_root/directory/project_dir/MyProjectRoot.iml
      a-- /share_root/directory/project_dir/target
    Outgoing:
      Change sets:
        (1004) -*--@  "Share" 04-Mar-2015 03:32 PM
echughes@tpechughes project_dir$ cd ..
echughes@tpechughes directory$ cd ..
echughes@tpechughes share_root$ cd ..
Add rules to the .jazzignore file
echughes@tpechughes ig4$ vim share_root/directory/project_dir/.jazzignore
echughes@tpechughes ig4$ lscm status
Workspace: (1001) "igTest" <-> (1001) "igTest"
  Component: (1002) "igTest Default Component"
    Baseline: (1003) 1 "Initial Baseline"
    Unresolved:
      a-- /share_root/directory/project_dir/.project
      a-- /share_root/directory/project_dir/MyProjectRoot.iml
    Outgoing:
      Change sets:
        (1004) -*--@  "Share" 04-Mar-2015 03:32 PM
echughes@tpechughes ig4$ cat share_root/directory/project_dir/.jazzignore
core.ignore =  {.jazzignore} {.idea} {target}
echughes@tpechughes ig4$ find
.
snipped contents of .jazz5
./share_root
./share_root/directory
./share_root/directory/project_dir
./share_root/directory/project_dir/.project
./share_root/directory/project_dir/.jazzignore
./share_root/directory/project_dir/MyProjectRoot.iml
./share_root/directory/project_dir/target
./share_root/directory/project_dir/.idea

Is there anything else about your configuration that you can tell me about?

Aretha Kebirungi selected this answer as the correct answer

Comments
Aretha Kebirungi commented Mar 09 '15, 2:02 p.m.

Thanks Evan,

Strange indeed! Can't imagine why this isn't working for me with RTC4.0.6, don't believe I have any special configurations for the eclipse project or IDE. Just have a checked out Maven eclipse project that I imported into IDEA.

Perplexing...


Aretha Kebirungi commented Mar 09 '15, 2:12 p.m.

Could it have something to do with my projects being Maven(single module) projects?


Evan Hughes commented Mar 10 '15, 9:09 a.m.
JAZZ DEVELOPER

It shouldn't have anything to do with maven. As far as we're concerned, maven just generates files. 


At some point we had a bug where a .jazzignore file would be cached, and the cache would never be cleared, but that was fixed in 2.0. I wonder if it could be something similar to that? 

There's a background daemon that handles SCM tasks. Could you make sure there's no process named 'scm' running on your machine, then run 'scm status' from your sandbox root (the directory containing .jazz5). I doubt the answer will be different, but that should uncover any in-process caching issues. 


Evan Hughes commented Mar 10 '15, 9:09 a.m.
JAZZ DEVELOPER

Out of curiosity, did you load the project with Eclipse?


Aretha Kebirungi commented Mar 11 '15, 7:39 p.m.

While it's an eclipse project, I loaded it with (IntelliJ) IDEA.

Now your mention of caching got me thinking, I tried to kill all running scm processes & restart the lscm daemon & this exposed the issue - I switched to open-jdk (& set $JAVA_HOME to that) all the while still running with lscm daemon started with ibm java. Since jazz uses ibm jdk when I killed & attempted to restart lscm, the failure to restart correctly tipped me to the problem - looks like this jdk mix up tripped up jazz ignore. Included a blanket answer in case anyone runs into this later.

Thanks Evan!

One other answer



permanent link
Aretha Kebirungi (1314) | answered Mar 11 '15, 8:02 p.m.
edited Mar 11 '15, 8:03 p.m.
Found the reason for this issue in my case. I switched my $JAVA_HOME to a different jdk from IBM jdk required by Jazz. Because I did this while I had an lscm daemon started with IBM java running, I tripped up some scm tools and so my .jazzignore wasn't getting picked up.

Fixed this by:
1. Killed running lscm daemon
2. In scm.ini, specify the JRE to use to run scm to avoid mix up if using multiple jdk's.

$RTC_INSTALL_DIR/jazz/scmtools/eclipse/scm.ini

#Uncomment following 2 lines to configure JRE.    <--- existing comment
-vm
$IBM_JAVA_HOME/bin

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.