# Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

27 messages
12
Open this post in threaded view
|

 Hi everyone,I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 26.967s Final Memory: 26M/376M INFO: ------------------------------------------------------------------------ ERROR: Error during Sonar runner execution ERROR: Unable to execute Sonar ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?Regards, _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 Reply | Threaded Open this post in threaded view | ## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0  Hi Cesar,Could you send the screenshot of the window opened by the "tf workspace" command?Moreover, could you also send the absolute paths of one of the file you are trying to analyze?Thank youDinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 12:59 PM, César Tomás wrote:Hi everyone,I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 26.967s Final Memory: 26M/376M INFO: ------------------------------------------------------------------------ ERROR: Error during Sonar runner execution ERROR: Unable to execute Sonar ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 Hi Dinesh,I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case:Thanks in advance.2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn :Hi Cesar,Could you send the screenshot of the window opened by the "tf workspace" command?Moreover, could you also send the absolute paths of one of the file you are trying to analyze?Thank youDinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 12:59 PM, César Tomás wrote:Hi everyone,I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 26.967s Final Memory: 26M/376M INFO: ------------------------------------------------------------------------ ERROR: Error during Sonar runner execution ERROR: Unable to execute Sonar ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                 -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 Thanks for the info.Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 1:43 PM, César Tomás wrote:Hi Dinesh,I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case:Thanks in advance.2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn :Hi Cesar,Could you send the screenshot of the window opened by the "tf workspace" command?Moreover, could you also send the absolute paths of one of the file you are trying to analyze?Thank youDinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 12:59 PM, César Tomás wrote:Hi everyone,I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 26.967s Final Memory: 26M/376M INFO: ------------------------------------------------------------------------ ERROR: Error during Sonar runner execution ERROR: Unable to execute Sonar ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                 -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 Hi Dinesh,The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace.Regards,2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn :Thanks for the info.Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 1:43 PM, César Tomás wrote:Hi Dinesh,I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case:Thanks in advance.2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn :Hi Cesar,Could you send the screenshot of the window opened by the "tf workspace" command?Moreover, could you also send the absolute paths of one of the file you are trying to analyze?Thank youDinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 12:59 PM, César Tomás wrote:Hi everyone,I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 26.967s Final Memory: 26M/376M INFO: ------------------------------------------------------------------------ ERROR: Error during Sonar runner execution ERROR: Unable to execute Sonar ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                 -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                 -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 It sadly looks like I won't be able to help you much.I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.Debugging further would probably be require you to get the sources of SonarTfsAnnotate:You can try to remove the following check, and see if it (and how) the program still fails:Let me know how that goesKind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás wrote:Hi Dinesh,The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace.Regards,2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn :Thanks for the info.Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 1:43 PM, César Tomás wrote:Hi Dinesh,I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case:Thanks in advance.2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn :Hi Cesar,Could you send the screenshot of the window opened by the "tf workspace" command?Moreover, could you also send the absolute paths of one of the file you are trying to analyze?Thank youDinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 12:59 PM, César Tomás wrote:Hi everyone,I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 26.967s Final Memory: 26M/376M INFO: ------------------------------------------------------------------------ ERROR: Error during Sonar runner execution ERROR: Unable to execute Sonar ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                 -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                 -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case: Thanks in advance. 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this: INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case: Thanks in advance. 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this: INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.  I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since. Anyways…I’ll see if I can reproduce this. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:50To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled? I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case: Thanks in advance. 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this: INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here. From: Espen Berglund [mailto:[hidden email]] Sent: 23. februar 2015 15:21To: [hidden email]Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.  I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since. Anyways…I’ll see if I can reproduce this. From: Dinesh Bolkensteyn [[hidden email]] Sent: 23. februar 2015 14:50To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled? I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case: Thanks in advance. 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this: INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 In reply to this post by Espen Berglund Hi Dinesh,I have found that the problem is related to the path of the files that are passed to SonarTfsAnnotate.If I execute in the command line the command that is causing the error using the absolute paths of the files it works fine. So, I think that the analysis fails because the sonar-scm-tfs plug-in pass wrong paths to SonarTfsAnnotate. Maybe the key is on https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.javaIf you need some help trying to solve this problem, please do not hesitate to telll us.Thanks in advance,César.2015-02-23 15:21 GMT+01:00 Espen Berglund :I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.  I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since. Anyways…I’ll see if I can reproduce this. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:50To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled? I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case: Thanks in advance. 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this: INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 In reply to this post by Espen Berglund Hi Espen,The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.Regards,César2015-02-24 8:42 GMT+01:00 Espen Berglund :I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here. From: Espen Berglund [mailto:[hidden email]] Sent: 23. februar 2015 15:21To: [hidden email]Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.  I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since. Anyways…I’ll see if I can reproduce this. From: Dinesh Bolkensteyn [[hidden email]] Sent: 23. februar 2015 14:50To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled? I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case: Thanks in advance. 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this: INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

 Hi guys,Thanks for the investigation. Do you confirm the following:Given a project:  $tf module1 module2 ...This works:cd SonarTfsAnnotate module1/someFile.csThis don't work:cd module1SonarTfsAnnotate someFile.csThis works:SonarTfsAnnotate absolute\path\to\soneFile.csThanks2015-02-24 8:53 GMT+01:00 César Tomás :Hi Espen,The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on the paths that sonar-scm-tfs pass to SonarTfsAnnotate.Regards,César2015-02-24 8:42 GMT+01:00 Espen Berglund :I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here. From: Espen Berglund [mailto:[hidden email]] Sent: 23. februar 2015 15:21To: [hidden email]Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem. I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since. Anyways…I’ll see if I can reproduce this. From: Dinesh Bolkensteyn [[hidden email]] Sent: 23. februar 2015 14:50To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled? I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the$tf folder.    I also attach a screenshot of my sonar properties (Jenkins properties) just in case:  Thanks in advance.  2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:  INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs  I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 -- _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 -- _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 -- _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 Reply | Threaded Open this post in threaded view | ## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0  Hi Julien,I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:SonarTfsAnnotate someFile.cs (without doing the 'cd module')Regards,César2015-02-24 9:28 GMT+01:00 Julien HENRY :Hi guys,Thanks for the investigation. Do you confirm the following:Given a project:$tf  module1  module2  ...This works:cd SonarTfsAnnotate module1/someFile.csThis don't work:cd module1SonarTfsAnnotate someFile.csThis works:SonarTfsAnnotate absolute\path\to\soneFile.csThanks2015-02-24 8:53 GMT+01:00 César Tomás :Hi Espen,The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.Regards,César2015-02-24 8:42 GMT+01:00 Espen Berglund :I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here. From: Espen Berglund [mailto:[hidden email]] Sent: 23. februar 2015 15:21To: [hidden email]Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.  I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since. Anyways…I’ll see if I can reproduce this. From: Dinesh Bolkensteyn [[hidden email]] Sent: 23. februar 2015 14:50To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled? I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case: Thanks in advance. 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this: INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                 -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|

 Strange, because it should cd to module base dir (see https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L131). Sorry guys but I have no idea of what's wrong.2015-02-24 9:47 GMT+01:00 César Tomás :Hi Julien,I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:SonarTfsAnnotate someFile.cs (without doing the 'cd module')Regards,César2015-02-24 9:28 GMT+01:00 Julien HENRY :Hi guys,Thanks for the investigation. Do you confirm the following:Given a project:  $tf module1 module2 ...This works:cd SonarTfsAnnotate module1/someFile.csThis don't work:cd module1SonarTfsAnnotate someFile.csThis works:SonarTfsAnnotate absolute\path\to\soneFile.csThanks2015-02-24 8:53 GMT+01:00 César Tomás :Hi Espen,The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on the paths that sonar-scm-tfs pass to SonarTfsAnnotate.Regards,César2015-02-24 8:42 GMT+01:00 Espen Berglund :I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here. From: Espen Berglund [mailto:[hidden email]] Sent: 23. februar 2015 15:21To: [hidden email]Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem. I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since. Anyways…I’ll see if I can reproduce this. From: Dinesh Bolkensteyn [[hidden email]] Sent: 23. februar 2015 14:50To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled? I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the$tf folder.    I also attach a screenshot of my sonar properties (Jenkins properties) just in case:  Thanks in advance.  2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:  INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs  I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 -- _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 -- _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 -- _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 -- _____________________________________________________César Tomás Franco Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08 Reply | Threaded Open this post in threaded view | ## Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0  First, there is no difference between the SonarTfsAnnotate.exe embedded in the plugin and the one available as an independent download.The problem doesn't seem to be related to the current working directory : I can run SonarTfsAnnotate from the command line from anywhere and it works (passing it both relative and absolute paths).Another idea... could it perhaps be related to user permissions?For example, when you are logged in, you have some user A, but when running the SonarQube analysis, you are user B.Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY wrote:Strange, because it should cd to module base dir (see https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L131). Sorry guys but I have no idea of what's wrong.2015-02-24 9:47 GMT+01:00 César Tomás :Hi Julien,I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:SonarTfsAnnotate someFile.cs (without doing the 'cd module')Regards,César2015-02-24 9:28 GMT+01:00 Julien HENRY :Hi guys,Thanks for the investigation. Do you confirm the following:Given a project:$tf  module1  module2  ...This works:cd SonarTfsAnnotate module1/someFile.csThis don't work:cd module1SonarTfsAnnotate someFile.csThis works:SonarTfsAnnotate absolute\path\to\soneFile.csThanks2015-02-24 8:53 GMT+01:00 César Tomás :Hi Espen,The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.Regards,César2015-02-24 8:42 GMT+01:00 Espen Berglund :I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here. From: Espen Berglund [mailto:[hidden email]] Sent: 23. februar 2015 15:21To: [hidden email]Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.  I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since. Anyways…I’ll see if I can reproduce this. From: Dinesh Bolkensteyn [[hidden email]] Sent: 23. februar 2015 14:50To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled? I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes. Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue. From: Dinesh Bolkensteyn [mailto:[hidden email]] Sent: 23. februar 2015 14:19To: [hidden email]Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0 It sadly looks like I won't be able to help you much. I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools. Debugging further would probably be require you to get the sources of SonarTfsAnnotate: You can try to remove the following check, and see if it (and how) the program still fails: Let me know how that goes Kind regards,Dinesh Bolkensteynwww.SonarSource.comtwitter.com/DBolkensteyn On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. I don't have any cloack folders in my workspace. Regards, 2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Thanks for the info. Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ? Is that file checked-in TFS, is it is a cloak folder?Dinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:Hi Dinesh, I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. I also attach a screenshot of my sonar properties (Jenkins properties) just in case: Thanks in advance. 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:Hi Cesar, Could you send the screenshot of the window opened by the "tf workspace" command? Moreover, could you also send the absolute paths of one of the file you are trying to analyze? Thank youDinesh Bolkensteynwww.SonarSource.com On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:Hi everyone, I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this: INFO: ------------------------------------------------------------------------INFO: EXECUTION FAILUREINFO: ------------------------------------------------------------------------Total time: 26.967sFinal Memory: 26M/376MINFO: ------------------------------------------------------------------------ERROR: Error during Sonar runner executionERROR: Unable to execute SonarERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs I have a local copy of my workspace with the$tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information? Regards, _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                   -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08                 -- _____________________________________________________César Tomás Franco   Área de Innovación, Arquitectura y Calidad de Software t: 96 325 48 08
Open this post in threaded view
|