Discussion:
[sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0
César Tomás
2015-02-23 11:59:55 UTC
Permalink
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*
<http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
Área de Innovación, Arquitectura y Calidad de Software
t: 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
<http://www.excentia.es/privacy.html>
Dinesh Bolkensteyn
2015-02-23 12:09:33 UTC
Permalink
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 you

Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
> Área de Innovación, Arquitectura y Calidad de Software
> t: 96 325 48 08
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
César Tomás
2015-02-23 12:43:12 UTC
Permalink
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.

[image: Imágenes integradas 2][image: Imágenes integradas 1]


I also attach a screenshot of my sonar properties (Jenkins properties) just
in case:

[image: Imágenes integradas 3]

Thanks in advance.


2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
***@sonarsource.com>:

> 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 you
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>
> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>> Área de Innovación, Arquitectura y Calidad de Software
>> t: 96 325 48 08
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>
>


--
_____________________________________________________
*César Tomás Franco*
<http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
Área de Innovación, Arquitectura y Calidad de Software
t: 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
<http://www.excentia.es/privacy.html>
Dinesh Bolkensteyn
2015-02-23 12:50:19 UTC
Permalink
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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>
> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>
>
> I also attach a screenshot of my sonar properties (Jenkins properties)
> just in case:
>
> [image: Imágenes integradas 3]
>
> Thanks in advance.
>
>
> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
> ***@sonarsource.com>:
>
>> 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 you
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>>
>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>> t: 96 325 48 08
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>
>>
>
>
> --
> _____________________________________________________
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
> Área de Innovación, Arquitectura y Calidad de Software
> t: 96 325 48 08
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
César Tomás
2015-02-23 13:07:34 UTC
Permalink
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 <
***@sonarsource.com>:

> 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 Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>
> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>>
>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>
>>
>> I also attach a screenshot of my sonar properties (Jenkins properties)
>> just in case:
>>
>> [image: Imágenes integradas 3]
>>
>> Thanks in advance.
>>
>>
>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>> ***@sonarsource.com>:
>>
>>> 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 you
>>>
>>> Dinesh Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>>>
>>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es>
>>> 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*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>> t: 96 325 48 08
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>
>>>
>>
>>
>> --
>> _____________________________________________________
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>> Área de Innovación, Arquitectura y Calidad de Software
>> t: 96 325 48 08
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>
>


--
_____________________________________________________
*César Tomás Franco*
<http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
Área de Innovación, Arquitectura y Calidad de Software
t: 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
<http://www.excentia.es/privacy.html>
Dinesh Bolkensteyn
2015-02-23 13:19:12 UTC
Permalink
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:
https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate

You can try to remove the following check, and see if it (and how) the
program still fails:

https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44

Let me know how that goes

Kind regards,

Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
> ***@sonarsource.com>:
>
>> 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 Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>>
>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>>>
>>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>>
>>>
>>> I also attach a screenshot of my sonar properties (Jenkins properties)
>>> just in case:
>>>
>>> [image: Imágenes integradas 3]
>>>
>>> Thanks in advance.
>>>
>>>
>>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>>> ***@sonarsource.com>:
>>>
>>>> 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 you
>>>>
>>>> Dinesh Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>>>>
>>>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es>
>>>> 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*
>>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>> t: 96 325 48 08
>>>>>
>>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>>> <http://www.linkedin.com/company/excentia>
>>>>> <https://plus.google.com/+ExcentiaEs>
>>>>> <http://www.excentia.es/contacto.html>
>>>>> <http://www.excentia.es/>
>>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>>> <http://www.excentia.es/privacy.html>
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> _____________________________________________________
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>> t: 96 325 48 08
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>
>>
>
>
> --
> _____________________________________________________
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
> Área de Innovación, Arquitectura y Calidad de Software
> t: 96 325 48 08
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
Espen Berglund
2015-02-23 13:41:41 UTC
Permalink
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:***@sonarsource.com]
Sent: 23. februar 2015 14:19
To: ***@sonar.codehaus.org
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:

https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate



You can try to remove the following check, and see if it (and how) the program still fails:

https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44



Let me know how that goes



Kind regards,




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 you




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad
Dinesh Bolkensteyn
2015-02-23 13:50:25 UTC
Permalink
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-7

Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <***@outlook.com>
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:***@sonarsource.com]
> *Sent:* 23. februar 2015 14:19
> *To:* ***@sonar.codehaus.org
> *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:
>
> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>
>
>
> You can try to remove the following check, and see if it (and how) the
> program still fails:
>
>
> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>
>
>
> Let me know how that goes
>
>
>
> Kind regards,
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
> ***@sonarsource.com>:
>
> 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 Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>
>
>
> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>
>
>
>
>
> I also attach a screenshot of my sonar properties (Jenkins properties)
> just in case:
>
>
>
> [image: Imágenes integradas 3]
>
>
>
> Thanks in advance.
>
>
>
>
>
> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
> ***@sonarsource.com>:
>
> 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 you
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
Espen Berglund
2015-02-23 14:21:20 UTC
Permalink
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:***@sonarsource.com]
Sent: 23. februar 2015 14:50
To: ***@sonar.codehaus.org
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-7




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <***@outlook.com <mailto:***@outlook.com> > 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:***@sonarsource.com <mailto:***@sonarsource.com> ]
Sent: 23. februar 2015 14:19
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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:

https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate



You can try to remove the following check, and see if it (and how) the program still fails:

https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44



Let me know how that goes



Kind regards,




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 you




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad
Espen Berglund
2015-02-24 07:42:44 UTC
Permalink
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:***@outlook.com]
Sent: 23. februar 2015 15:21
To: ***@sonar.codehaus.org
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 [mailto:***@sonarsource.com]
Sent: 23. februar 2015 14:50
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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-7




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <***@outlook.com <mailto:***@outlook.com> > 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:***@sonarsource.com <mailto:***@sonarsource.com> ]
Sent: 23. februar 2015 14:19
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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:

https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate



You can try to remove the following check, and see if it (and how) the program still fails:

https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44



Let me know how that goes



Kind regards,




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 you




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad
César Tomás
2015-02-24 07:53:36 UTC
Permalink
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ésar

2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:

> 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:***@outlook.com]
> *Sent:* 23. februar 2015 15:21
> *To:* ***@sonar.codehaus.org
> *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 [mailto:***@sonarsource.com
> <***@sonarsource.com>]
> *Sent:* 23. februar 2015 14:50
> *To:* ***@sonar.codehaus.org
> *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-7
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
> ***@outlook.com> 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:***@sonarsource.com]
> *Sent:* 23. februar 2015 14:19
> *To:* ***@sonar.codehaus.org
> *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:
>
> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>
>
>
> You can try to remove the following check, and see if it (and how) the
> program still fails:
>
>
> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>
>
>
> Let me know how that goes
>
>
>
> Kind regards,
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
> ***@sonarsource.com>:
>
> 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 Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>
>
>
> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>
>
>
>
>
> I also attach a screenshot of my sonar properties (Jenkins properties)
> just in case:
>
>
>
> [image: Imágenes integradas 3]
>
>
>
> Thanks in advance.
>
>
>
>
>
> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
> ***@sonarsource.com>:
>
> 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 you
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>



--
_____________________________________________________
*César Tomás Franco*
<http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
Área de Innovación, Arquitectura y Calidad de Software
t: 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
<http://www.excentia.es/privacy.html>
Julien HENRY
2015-02-24 08:28:29 UTC
Permalink
Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:
<project root>
$tf
module1
module2
...

This works:
cd <project root>
SonarTfsAnnotate module1/someFile.cs

This don't work:
cd module1
SonarTfsAnnotate someFile.cs

This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks


2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:

> 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ésar
>
> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>
>> 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:***@outlook.com]
>> *Sent:* 23. februar 2015 15:21
>> *To:* ***@sonar.codehaus.org
>> *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 [mailto:***@sonarsource.com
>> <***@sonarsource.com>]
>> *Sent:* 23. februar 2015 14:50
>> *To:* ***@sonar.codehaus.org
>> *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-7
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
>> ***@outlook.com> 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:***@sonarsource.com]
>> *Sent:* 23. februar 2015 14:19
>> *To:* ***@sonar.codehaus.org
>> *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:
>>
>>
>> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>>
>>
>>
>> You can try to remove the following check, and see if it (and how) the
>> program still fails:
>>
>>
>> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>>
>>
>>
>> Let me know how that goes
>>
>>
>>
>> Kind regards,
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
>> ***@sonarsource.com>:
>>
>> 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 Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>>
>>
>>
>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>
>>
>>
>>
>>
>> I also attach a screenshot of my sonar properties (Jenkins properties)
>> just in case:
>>
>>
>>
>> [image: Imágenes integradas 3]
>>
>>
>>
>> Thanks in advance.
>>
>>
>>
>>
>>
>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>> ***@sonarsource.com>:
>>
>> 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 you
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>
>
>
> --
> _____________________________________________________
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
> Área de Innovación, Arquitectura y Calidad de Software
> t: 96 325 48 08
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
César Tomás
2015-02-24 08:47:48 UTC
Permalink
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ésar


2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:

> Hi guys,
>
> Thanks for the investigation. Do you confirm the following:
>
> Given a project:
> <project root>
> $tf
> module1
> module2
> ...
>
> This works:
> cd <project root>
> SonarTfsAnnotate module1/someFile.cs
>
> This don't work:
> cd module1
> SonarTfsAnnotate someFile.cs
>
> This works:
> SonarTfsAnnotate absolute\path\to\soneFile.cs
>
> Thanks
>
>
> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>
>> 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ésar
>>
>> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>>
>>> 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:***@outlook.com]
>>> *Sent:* 23. februar 2015 15:21
>>> *To:* ***@sonar.codehaus.org
>>> *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 [mailto:***@sonarsource.com
>>> <***@sonarsource.com>]
>>> *Sent:* 23. februar 2015 14:50
>>> *To:* ***@sonar.codehaus.org
>>> *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-7
>>>
>>>
>>> Dinesh Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
>>> ***@outlook.com> 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:***@sonarsource.com]
>>> *Sent:* 23. februar 2015 14:19
>>> *To:* ***@sonar.codehaus.org
>>> *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:
>>>
>>>
>>> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>>>
>>>
>>>
>>> You can try to remove the following check, and see if it (and how) the
>>> program still fails:
>>>
>>>
>>> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>>>
>>>
>>>
>>> Let me know how that goes
>>>
>>>
>>>
>>> Kind regards,
>>>
>>>
>>> Dinesh Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
>>> ***@sonarsource.com>:
>>>
>>> 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 Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>>>
>>>
>>>
>>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>>
>>>
>>>
>>>
>>>
>>> I also attach a screenshot of my sonar properties (Jenkins properties)
>>> just in case:
>>>
>>>
>>>
>>> [image: Imágenes integradas 3]
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>>
>>>
>>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>>> ***@sonarsource.com>:
>>>
>>> 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 you
>>>
>>>
>>> Dinesh Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es>
>>> 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*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> _____________________________________________________
>>>
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> _____________________________________________________
>>>
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> _____________________________________________________
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>> Área de Innovación, Arquitectura y Calidad de Software
>> t: 96 325 48 08
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>
>


--
_____________________________________________________
*César Tomás Franco*
<http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
Área de Innovación, Arquitectura y Calidad de Software
t: 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
<http://www.excentia.es/privacy.html>
Julien HENRY
2015-02-24 09:14:24 UTC
Permalink
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 <***@excentia.es>:

> 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ésar
>
>
> 2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:
>
>> Hi guys,
>>
>> Thanks for the investigation. Do you confirm the following:
>>
>> Given a project:
>> <project root>
>> $tf
>> module1
>> module2
>> ...
>>
>> This works:
>> cd <project root>
>> SonarTfsAnnotate module1/someFile.cs
>>
>> This don't work:
>> cd module1
>> SonarTfsAnnotate someFile.cs
>>
>> This works:
>> SonarTfsAnnotate absolute\path\to\soneFile.cs
>>
>> Thanks
>>
>>
>> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>>
>>> 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ésar
>>>
>>> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>>>
>>>> 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:***@outlook.com]
>>>> *Sent:* 23. februar 2015 15:21
>>>> *To:* ***@sonar.codehaus.org
>>>> *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 [mailto:***@sonarsource.com
>>>> <***@sonarsource.com>]
>>>> *Sent:* 23. februar 2015 14:50
>>>> *To:* ***@sonar.codehaus.org
>>>> *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-7
>>>>
>>>>
>>>> Dinesh Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
>>>> ***@outlook.com> 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:***@sonarsource.com]
>>>> *Sent:* 23. februar 2015 14:19
>>>> *To:* ***@sonar.codehaus.org
>>>> *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:
>>>>
>>>>
>>>> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>>>>
>>>>
>>>>
>>>> You can try to remove the following check, and see if it (and how) the
>>>> program still fails:
>>>>
>>>>
>>>> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>>>>
>>>>
>>>>
>>>> Let me know how that goes
>>>>
>>>>
>>>>
>>>> Kind regards,
>>>>
>>>>
>>>> Dinesh Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es>
>>>> 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 <
>>>> ***@sonarsource.com>:
>>>>
>>>> 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 Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es>
>>>> 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.
>>>>
>>>>
>>>>
>>>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I also attach a screenshot of my sonar properties (Jenkins properties)
>>>> just in case:
>>>>
>>>>
>>>>
>>>> [image: Imágenes integradas 3]
>>>>
>>>>
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>>>> ***@sonarsource.com>:
>>>>
>>>> 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 you
>>>>
>>>>
>>>> Dinesh Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es>
>>>> 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*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> _____________________________________________________
>>>>
>>>> *César Tomás Franco*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> _____________________________________________________
>>>>
>>>> *César Tomás Franco*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> _____________________________________________________
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>> t: 96 325 48 08
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>
>>
>
>
> --
> _____________________________________________________
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
> Área de Innovación, Arquitectura y Calidad de Software
> t: 96 325 48 08
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
Dinesh Bolkensteyn
2015-02-24 09:32:59 UTC
Permalink
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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <***@sonarsource.com
> 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 <***@excentia.es>:
>
>> 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ésar
>>
>>
>> 2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:
>>
>>> Hi guys,
>>>
>>> Thanks for the investigation. Do you confirm the following:
>>>
>>> Given a project:
>>> <project root>
>>> $tf
>>> module1
>>> module2
>>> ...
>>>
>>> This works:
>>> cd <project root>
>>> SonarTfsAnnotate module1/someFile.cs
>>>
>>> This don't work:
>>> cd module1
>>> SonarTfsAnnotate someFile.cs
>>>
>>> This works:
>>> SonarTfsAnnotate absolute\path\to\soneFile.cs
>>>
>>> Thanks
>>>
>>>
>>> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>>>
>>>> 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ésar
>>>>
>>>> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>>>>
>>>>> 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:***@outlook.com]
>>>>> *Sent:* 23. februar 2015 15:21
>>>>> *To:* ***@sonar.codehaus.org
>>>>> *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 [mailto:***@sonarsource.com
>>>>> <***@sonarsource.com>]
>>>>> *Sent:* 23. februar 2015 14:50
>>>>> *To:* ***@sonar.codehaus.org
>>>>> *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-7
>>>>>
>>>>>
>>>>> Dinesh Bolkensteyn
>>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>>> twitter.com/DBolkensteyn
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
>>>>> ***@outlook.com> 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:***@sonarsource.com]
>>>>>
>>>>> *Sent:* 23. februar 2015 14:19
>>>>> *To:* ***@sonar.codehaus.org
>>>>> *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:
>>>>>
>>>>>
>>>>> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>>>>>
>>>>>
>>>>>
>>>>> You can try to remove the following check, and see if it (and how) the
>>>>> program still fails:
>>>>>
>>>>>
>>>>> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>>>>>
>>>>>
>>>>>
>>>>> Let me know how that goes
>>>>>
>>>>>
>>>>>
>>>>> Kind regards,
>>>>>
>>>>>
>>>>> Dinesh Bolkensteyn
>>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>>> twitter.com/DBolkensteyn
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es>
>>>>> 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 <
>>>>> ***@sonarsource.com>:
>>>>>
>>>>> 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 Bolkensteyn
>>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>>> twitter.com/DBolkensteyn
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es>
>>>>> 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.
>>>>>
>>>>>
>>>>>
>>>>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I also attach a screenshot of my sonar properties (Jenkins properties)
>>>>> just in case:
>>>>>
>>>>>
>>>>>
>>>>> [image: Imágenes integradas 3]
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>>>>> ***@sonarsource.com>:
>>>>>
>>>>> 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 you
>>>>>
>>>>>
>>>>> Dinesh Bolkensteyn
>>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>>> twitter.com/DBolkensteyn
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es>
>>>>> 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*
>>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>>
>>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>>
>>>>> t: 96 325 48 08
>>>>>
>>>>>
>>>>>
>>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>>> <http://www.linkedin.com/company/excentia>
>>>>> <https://plus.google.com/+ExcentiaEs>
>>>>> <http://www.excentia.es/contacto.html>
>>>>>
>>>>> <http://www.excentia.es/>
>>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>>
>>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>>> <http://www.excentia.es/privacy.html>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> _____________________________________________________
>>>>>
>>>>> *César Tomás Franco*
>>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>>
>>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>>
>>>>> t: 96 325 48 08
>>>>>
>>>>>
>>>>>
>>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>>> <http://www.linkedin.com/company/excentia>
>>>>> <https://plus.google.com/+ExcentiaEs>
>>>>> <http://www.excentia.es/contacto.html>
>>>>>
>>>>> <http://www.excentia.es/>
>>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>>
>>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>>> <http://www.excentia.es/privacy.html>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> _____________________________________________________
>>>>>
>>>>> *César Tomás Franco*
>>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>>
>>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>>
>>>>> t: 96 325 48 08
>>>>>
>>>>>
>>>>>
>>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>>> <http://www.linkedin.com/company/excentia>
>>>>> <https://plus.google.com/+ExcentiaEs>
>>>>> <http://www.excentia.es/contacto.html>
>>>>>
>>>>> <http://www.excentia.es/>
>>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>>
>>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>>> <http://www.excentia.es/privacy.html>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> _____________________________________________________
>>>> *César Tomás Franco*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>> t: 96 325 48 08
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>
>>>
>>
>>
>> --
>> _____________________________________________________
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>> Área de Innovación, Arquitectura y Calidad de Software
>> t: 96 325 48 08
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>
>
Espen Berglund
2015-02-24 10:11:56 UTC
Permalink
I’m running everything on my own machine, e.g. database, sonarqube, sonar-runner etc. I don’t see permissions being an issue as everything should be run as me unless something special is within sonarqube/sonar-runner itself.



From: Dinesh Bolkensteyn [mailto:***@sonarsource.com]
Sent: 24. februar 2015 10:33
To: ***@sonar.codehaus.org
Subject: Re: [sonar-user] 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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <***@sonarsource.com <mailto:***@sonarsource.com> > 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 <***@excentia.es <mailto:***@excentia.es> >:

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ésar





2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com <mailto:***@sonarsource.com> >:

Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:

<project root>

$tf

module1

module2

...

This works:

cd <project root>
SonarTfsAnnotate module1/someFile.cs



This don't work:

cd module1
SonarTfsAnnotate someFile.cs

This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks



2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es <mailto:***@excentia.es> >:

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ésar



2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com <mailto:***@outlook.com> >:

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:***@outlook.com <mailto:***@outlook.com> ]
Sent: 23. februar 2015 15:21
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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 [mailto:***@sonarsource.com]
Sent: 23. februar 2015 14:50
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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-7




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <***@outlook.com <mailto:***@outlook.com> > 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:***@sonarsource.com <mailto:***@sonarsource.com> ]
Sent: 23. februar 2015 14:19
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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:

https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate



You can try to remove the following check, and see if it (and how) the program still fails:

https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44



Let me know how that goes



Kind regards,




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 you




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad











--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad
César Tomás
2015-02-25 16:00:36 UTC
Permalink
Hi Dinesh,

Finally I solved the problem passing to sonarTfsAnnotate the absolute path
of the file to analyse.
I changed the line
https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L132
to:
*cl.addArgument(workingDirectory + "\\" + filename);*

Could you consider to launch a new version of the plugin including this
modification?

On the other hand, now I need to use login and password to access to TFS
information because it appears this error related to authorization with TFS:

*Excepci¢n no controlada:
Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException:
TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection.
---> System.Net.WebException: Error en el servidor remoto: (401) No
autorizado.*
* en System.Net.HttpWebRequest.GetResponse()*
* en
Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest
webRequest, WebException& webException)*

I've seen that you have an issue to add this feature to the plugin. Is it
possible to include this in the new release?


Thanks in advance,

César.




2015-02-24 11:11 GMT+01:00 Espen Berglund <***@outlook.com>:

> I’m running everything on my own machine, e.g. database, sonarqube,
> sonar-runner etc. I don’t see permissions being an issue as everything
> should be run as me unless something special is within
> sonarqube/sonar-runner itself.
>
>
>
> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
> *Sent:* 24. februar 2015 10:33
>
> *To:* ***@sonar.codehaus.org
> *Subject:* Re: [sonar-user] 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 Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <
> ***@sonarsource.com> 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 <***@excentia.es>:
>
> 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ésar
>
>
>
>
>
> 2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:
>
> Hi guys,
>
> Thanks for the investigation. Do you confirm the following:
>
> Given a project:
>
> <project root>
>
> $tf
>
> module1
>
> module2
>
> ...
>
> This works:
>
> cd <project root>
> SonarTfsAnnotate module1/someFile.cs
>
>
>
> This don't work:
>
> cd module1
> SonarTfsAnnotate someFile.cs
>
> This works:
> SonarTfsAnnotate absolute\path\to\soneFile.cs
>
> Thanks
>
>
>
> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>
> 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ésar
>
>
>
> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>
> 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:***@outlook.com]
> *Sent:* 23. februar 2015 15:21
> *To:* ***@sonar.codehaus.org
> *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 [mailto:***@sonarsource.com
> <***@sonarsource.com>]
> *Sent:* 23. februar 2015 14:50
> *To:* ***@sonar.codehaus.org
> *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-7
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
> ***@outlook.com> 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:***@sonarsource.com]
> *Sent:* 23. februar 2015 14:19
> *To:* ***@sonar.codehaus.org
> *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:
>
> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>
>
>
> You can try to remove the following check, and see if it (and how) the
> program still fails:
>
>
> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>
>
>
> Let me know how that goes
>
>
>
> Kind regards,
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
> ***@sonarsource.com>:
>
> 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 Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>
>
>
> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>
>
>
>
>
> I also attach a screenshot of my sonar properties (Jenkins properties)
> just in case:
>
>
>
> [image: Imágenes integradas 3]
>
>
>
> Thanks in advance.
>
>
>
>
>
> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
> ***@sonarsource.com>:
>
> 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 you
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>



--
_____________________________________________________
*César Tomás Franco*
<http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
Área de Innovación, Arquitectura y Calidad de Software
t: 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
<http://www.excentia.es/privacy.html>
Dinesh Bolkensteyn
2015-02-25 16:15:35 UTC
Permalink
I'm glad you solved your issue Cesar.

@Espen: Does this fix also solve yours?

Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Wed, Feb 25, 2015 at 5:00 PM, César Tomás <***@excentia.es> wrote:

> Hi Dinesh,
>
> Finally I solved the problem passing to sonarTfsAnnotate the absolute path
> of the file to analyse.
> I changed the line
> https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L132
> to:
> *cl.addArgument(workingDirectory + "\\" + filename);*
>
> Could you consider to launch a new version of the plugin including this
> modification?
>
> On the other hand, now I need to use login and password to access to TFS
> information because it appears this error related to authorization with TFS:
>
> *Excepci¢n no controlada:
> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException:
> TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection.
> ---> System.Net.WebException: Error en el servidor remoto: (401) No
> autorizado.*
> * en System.Net.HttpWebRequest.GetResponse()*
> * en
> Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest
> webRequest, WebException& webException)*
>
> I've seen that you have an issue to add this feature to the plugin. Is it
> possible to include this in the new release?
>
>
> Thanks in advance,
>
> César.
>
>
>
>
> 2015-02-24 11:11 GMT+01:00 Espen Berglund <***@outlook.com>:
>
>> I’m running everything on my own machine, e.g. database, sonarqube,
>> sonar-runner etc. I don’t see permissions being an issue as everything
>> should be run as me unless something special is within
>> sonarqube/sonar-runner itself.
>>
>>
>>
>> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
>> *Sent:* 24. februar 2015 10:33
>>
>> *To:* ***@sonar.codehaus.org
>> *Subject:* Re: [sonar-user] 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 Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <
>> ***@sonarsource.com> 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 <***@excentia.es>:
>>
>> 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ésar
>>
>>
>>
>>
>>
>> 2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:
>>
>> Hi guys,
>>
>> Thanks for the investigation. Do you confirm the following:
>>
>> Given a project:
>>
>> <project root>
>>
>> $tf
>>
>> module1
>>
>> module2
>>
>> ...
>>
>> This works:
>>
>> cd <project root>
>> SonarTfsAnnotate module1/someFile.cs
>>
>>
>>
>> This don't work:
>>
>> cd module1
>> SonarTfsAnnotate someFile.cs
>>
>> This works:
>> SonarTfsAnnotate absolute\path\to\soneFile.cs
>>
>> Thanks
>>
>>
>>
>> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>>
>> 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ésar
>>
>>
>>
>> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>>
>> 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:***@outlook.com]
>> *Sent:* 23. februar 2015 15:21
>> *To:* ***@sonar.codehaus.org
>> *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 [mailto:***@sonarsource.com
>> <***@sonarsource.com>]
>> *Sent:* 23. februar 2015 14:50
>> *To:* ***@sonar.codehaus.org
>> *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-7
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
>> ***@outlook.com> 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:***@sonarsource.com]
>> *Sent:* 23. februar 2015 14:19
>> *To:* ***@sonar.codehaus.org
>> *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:
>>
>>
>> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>>
>>
>>
>> You can try to remove the following check, and see if it (and how) the
>> program still fails:
>>
>>
>> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>>
>>
>>
>> Let me know how that goes
>>
>>
>>
>> Kind regards,
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
>> ***@sonarsource.com>:
>>
>> 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 Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>>
>>
>>
>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>
>>
>>
>>
>>
>> I also attach a screenshot of my sonar properties (Jenkins properties)
>> just in case:
>>
>>
>>
>> [image: Imágenes integradas 3]
>>
>>
>>
>> Thanks in advance.
>>
>>
>>
>>
>>
>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>> ***@sonarsource.com>:
>>
>> 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 you
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>
>
>
> --
> _____________________________________________________
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
> Área de Innovación, Arquitectura y Calidad de Software
> t: 96 325 48 08
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
Espen Berglund
2015-02-25 18:09:13 UTC
Permalink
Given to issue looks like the same thing, I’m going to go for a yes, but I haven’t tested though.



From: Dinesh Bolkensteyn [mailto:***@sonarsource.com]
Sent: 25. februar 2015 17:16
To: ***@sonar.codehaus.org
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0



I'm glad you solved your issue Cesar.



@Espen: Does this fix also solve yours?




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Wed, Feb 25, 2015 at 5:00 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > wrote:

Hi Dinesh,



Finally I solved the problem passing to sonarTfsAnnotate the absolute path of the file to analyse.

I changed the line https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L132 to:

cl.addArgument(workingDirectory + "\\" + filename);



Could you consider to launch a new version of the plugin including this modification?



On the other hand, now I need to use login and password to access to TFS information because it appears this error related to authorization with TFS:



Excepci¢n no controlada: Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection. ---> System.Net.WebException: Error en el servidor remoto: (401) No autorizado.

en System.Net.HttpWebRequest.GetResponse()

en Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)



I've seen that you have an issue to add this feature to the plugin. Is it possible to include this in the new release?





Thanks in advance,



César.









2015-02-24 11:11 GMT+01:00 Espen Berglund <***@outlook.com <mailto:***@outlook.com> >:

I’m running everything on my own machine, e.g. database, sonarqube, sonar-runner etc. I don’t see permissions being an issue as everything should be run as me unless something special is within sonarqube/sonar-runner itself.



From: Dinesh Bolkensteyn [mailto:***@sonarsource.com <mailto:***@sonarsource.com> ]
Sent: 24. februar 2015 10:33


To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
Subject: Re: [sonar-user] 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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <***@sonarsource.com <mailto:***@sonarsource.com> > 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 <***@excentia.es <mailto:***@excentia.es> >:

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ésar





2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com <mailto:***@sonarsource.com> >:

Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:

<project root>

$tf

module1

module2

...

This works:

cd <project root>
SonarTfsAnnotate module1/someFile.cs



This don't work:

cd module1
SonarTfsAnnotate someFile.cs

This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks



2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es <mailto:***@excentia.es> >:

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ésar



2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com <mailto:***@outlook.com> >:

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:***@outlook.com <mailto:***@outlook.com> ]
Sent: 23. februar 2015 15:21
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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 [mailto:***@sonarsource.com]
Sent: 23. februar 2015 14:50
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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-7




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <***@outlook.com <mailto:***@outlook.com> > 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:***@sonarsource.com <mailto:***@sonarsource.com> ]
Sent: 23. februar 2015 14:19
To: ***@sonar.codehaus.org <mailto:***@sonar.codehaus.org>
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:

https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate



You can try to remove the following check, and see if it (and how) the program still fails:

https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44



Let me know how that goes



Kind regards,




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <***@sonarsource.com <mailto:***@sonarsource.com> >:

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 you




Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://twitter.com/DBolkensteyn>



On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es <mailto:***@excentia.es> > 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 <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad











--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad









--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad











--

_____________________________________________________

César Tomás Franco <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>

Área de Innovación, Arquitectura y Calidad de Software

t: 96 325 48 08



<http://facebook.com/excentia> <http://twitter.com/excentia> <http://www.linkedin.com/company/excentia> <https://plus.google.com/+ExcentiaEs> <http://www.excentia.es/contacto.html>

<http://www.excentia.es/> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>

<http://www.excentia.es/legal.html> Aviso Legal - <http://www.excentia.es/privacy.html> Privacidad
Alejandro Piera Ferrer
2015-02-27 07:38:33 UTC
Permalink
Hi Dinesh and Julien,

When you think will be a new version of SonarTfsAnnotate and TFS Plugin? We
would like test a new version without the problem about paths and using a
username and password.

Thanks in advance

______________________________________________________
*Alejandro Piera Ferrer <http://es.linkedin.com/in/alejandropieraferrer/>*
Área de Innovación, Arquitectura y Calidad de Software
t: +34 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html>* - *Privacidad
<http://www.excentia.es/privacy.html>

2015-02-25 19:09 GMT+01:00 Espen Berglund <***@outlook.com>:

> Given to issue looks like the same thing, I’m going to go for a yes, but I
> haven’t tested though.
>
>
>
> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
> *Sent:* 25. februar 2015 17:16
>
> *To:* ***@sonar.codehaus.org
> *Subject:* Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0
>
>
>
> I'm glad you solved your issue Cesar.
>
>
>
> @Espen: Does this fix also solve yours?
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Wed, Feb 25, 2015 at 5:00 PM, César Tomás <***@excentia.es> wrote:
>
> Hi Dinesh,
>
>
>
> Finally I solved the problem passing to sonarTfsAnnotate the absolute path
> of the file to analyse.
>
> I changed the line
> https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L132
> to:
>
> *cl.addArgument(workingDirectory + "\\" + filename);*
>
>
>
> Could you consider to launch a new version of the plugin including this
> modification?
>
>
>
> On the other hand, now I need to use login and password to access to TFS
> information because it appears this error related to authorization with TFS:
>
>
>
> *Excepci¢n no controlada:
> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException:
> TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection.
> ---> System.Net.WebException: Error en el servidor remoto: (401) No
> autorizado.*
>
> * en System.Net.HttpWebRequest.GetResponse()*
>
> * en
> Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest
> webRequest, WebException& webException)*
>
>
>
> I've seen that you have an issue to add this feature to the plugin. Is it
> possible to include this in the new release?
>
>
>
>
>
> Thanks in advance,
>
>
>
> César.
>
>
>
>
>
>
>
>
>
> 2015-02-24 11:11 GMT+01:00 Espen Berglund <***@outlook.com>:
>
> I’m running everything on my own machine, e.g. database, sonarqube,
> sonar-runner etc. I don’t see permissions being an issue as everything
> should be run as me unless something special is within
> sonarqube/sonar-runner itself.
>
>
>
> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
> *Sent:* 24. februar 2015 10:33
>
>
> *To:* ***@sonar.codehaus.org
> *Subject:* Re: [sonar-user] 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 Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <
> ***@sonarsource.com> 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 <***@excentia.es>:
>
> 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ésar
>
>
>
>
>
> 2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:
>
> Hi guys,
>
> Thanks for the investigation. Do you confirm the following:
>
> Given a project:
>
> <project root>
>
> $tf
>
> module1
>
> module2
>
> ...
>
> This works:
>
> cd <project root>
> SonarTfsAnnotate module1/someFile.cs
>
>
>
> This don't work:
>
> cd module1
> SonarTfsAnnotate someFile.cs
>
> This works:
> SonarTfsAnnotate absolute\path\to\soneFile.cs
>
> Thanks
>
>
>
> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>
> 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ésar
>
>
>
> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>
> 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:***@outlook.com]
> *Sent:* 23. februar 2015 15:21
> *To:* ***@sonar.codehaus.org
> *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 [mailto:***@sonarsource.com
> <***@sonarsource.com>]
> *Sent:* 23. februar 2015 14:50
> *To:* ***@sonar.codehaus.org
> *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-7
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
> ***@outlook.com> 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:***@sonarsource.com]
> *Sent:* 23. februar 2015 14:19
> *To:* ***@sonar.codehaus.org
> *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:
>
> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>
>
>
> You can try to remove the following check, and see if it (and how) the
> program still fails:
>
>
> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>
>
>
> Let me know how that goes
>
>
>
> Kind regards,
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
> ***@sonarsource.com>:
>
> 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 Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>
>
>
> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>
>
>
>
>
> I also attach a screenshot of my sonar properties (Jenkins properties)
> just in case:
>
>
>
> [image: Imágenes integradas 3]
>
>
>
> Thanks in advance.
>
>
>
>
>
> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
> ***@sonarsource.com>:
>
> 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 you
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
Dinesh Bolkensteyn
2015-02-27 08:58:53 UTC
Permalink
Alejandro: Let's not rush too much on this... there are multiple issues to
be solved, and so far I wasn't even able to reproduce the issue locally.
Could you perhaps send over the project's layout? (i.e. where is the
sonar-project.properties, where are each modules, were is the $tf folder,
etc.)

Espen: I'd rather be sure than speculate, could you please give a try to
this update plugin which includes Cesar's fix?

https://sonarplugins.ci.cloudbees.com/job/scm-tfs/ws/target/sonar-scm-tfs-plugin-1.1-SNAPSHOT.jar

Thank you

Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Fri, Feb 27, 2015 at 8:38 AM, Alejandro Piera Ferrer <***@excentia.es>
wrote:

> Hi Dinesh and Julien,
>
> When you think will be a new version of SonarTfsAnnotate and TFS Plugin?
> We would like test a new version without the problem about paths and using
> a username and password.
>
> Thanks in advance
>
> ______________________________________________________
> *Alejandro Piera Ferrer
> <http://es.linkedin.com/in/alejandropieraferrer/>*
> Área de Innovación, Arquitectura y Calidad de Software
> t: +34 96 325 48 08
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
> Aviso Legal <http://www.excentia.es/legal.html>* - *Privacidad
> <http://www.excentia.es/privacy.html>
>
> 2015-02-25 19:09 GMT+01:00 Espen Berglund <***@outlook.com>:
>
>> Given to issue looks like the same thing, I’m going to go for a yes, but
>> I haven’t tested though.
>>
>>
>>
>> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
>> *Sent:* 25. februar 2015 17:16
>>
>> *To:* ***@sonar.codehaus.org
>> *Subject:* Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0
>>
>>
>>
>> I'm glad you solved your issue Cesar.
>>
>>
>>
>> @Espen: Does this fix also solve yours?
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Wed, Feb 25, 2015 at 5:00 PM, César Tomás <***@excentia.es> wrote:
>>
>> Hi Dinesh,
>>
>>
>>
>> Finally I solved the problem passing to sonarTfsAnnotate the absolute
>> path of the file to analyse.
>>
>> I changed the line
>> https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L132
>> to:
>>
>> *cl.addArgument(workingDirectory + "\\" + filename);*
>>
>>
>>
>> Could you consider to launch a new version of the plugin including this
>> modification?
>>
>>
>>
>> On the other hand, now I need to use login and password to access to TFS
>> information because it appears this error related to authorization with TFS:
>>
>>
>>
>> *Excepci¢n no controlada:
>> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException:
>> TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection.
>> ---> System.Net.WebException: Error en el servidor remoto: (401) No
>> autorizado.*
>>
>> * en System.Net.HttpWebRequest.GetResponse()*
>>
>> * en
>> Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest
>> webRequest, WebException& webException)*
>>
>>
>>
>> I've seen that you have an issue to add this feature to the plugin. Is it
>> possible to include this in the new release?
>>
>>
>>
>>
>>
>> Thanks in advance,
>>
>>
>>
>> César.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 2015-02-24 11:11 GMT+01:00 Espen Berglund <***@outlook.com>:
>>
>> I’m running everything on my own machine, e.g. database, sonarqube,
>> sonar-runner etc. I don’t see permissions being an issue as everything
>> should be run as me unless something special is within
>> sonarqube/sonar-runner itself.
>>
>>
>>
>> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
>> *Sent:* 24. februar 2015 10:33
>>
>>
>> *To:* ***@sonar.codehaus.org
>> *Subject:* Re: [sonar-user] 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 Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <
>> ***@sonarsource.com> 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 <***@excentia.es>:
>>
>> 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ésar
>>
>>
>>
>>
>>
>> 2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:
>>
>> Hi guys,
>>
>> Thanks for the investigation. Do you confirm the following:
>>
>> Given a project:
>>
>> <project root>
>>
>> $tf
>>
>> module1
>>
>> module2
>>
>> ...
>>
>> This works:
>>
>> cd <project root>
>> SonarTfsAnnotate module1/someFile.cs
>>
>>
>>
>> This don't work:
>>
>> cd module1
>> SonarTfsAnnotate someFile.cs
>>
>> This works:
>> SonarTfsAnnotate absolute\path\to\soneFile.cs
>>
>> Thanks
>>
>>
>>
>> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>>
>> 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ésar
>>
>>
>>
>> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>>
>> 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:***@outlook.com]
>> *Sent:* 23. februar 2015 15:21
>> *To:* ***@sonar.codehaus.org
>> *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 [mailto:***@sonarsource.com
>> <***@sonarsource.com>]
>> *Sent:* 23. februar 2015 14:50
>> *To:* ***@sonar.codehaus.org
>> *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-7
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
>> ***@outlook.com> 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:***@sonarsource.com]
>> *Sent:* 23. februar 2015 14:19
>> *To:* ***@sonar.codehaus.org
>> *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:
>>
>>
>> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>>
>>
>>
>> You can try to remove the following check, and see if it (and how) the
>> program still fails:
>>
>>
>> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>>
>>
>>
>> Let me know how that goes
>>
>>
>>
>> Kind regards,
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
>> ***@sonarsource.com>:
>>
>> 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 Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>>
>>
>>
>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>
>>
>>
>>
>>
>> I also attach a screenshot of my sonar properties (Jenkins properties)
>> just in case:
>>
>>
>>
>> [image: Imágenes integradas 3]
>>
>>
>>
>> Thanks in advance.
>>
>>
>>
>>
>>
>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>> ***@sonarsource.com>:
>>
>> 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 you
>>
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn
>>
>>
>>
>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> _____________________________________________________
>>
>> *César Tomás Franco*
>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>
>> Área de Innovación, Arquitectura y Calidad de Software
>>
>> t: 96 325 48 08
>>
>>
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>
>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>>
>>
>
>
Dinesh Bolkensteyn
2015-02-27 09:33:14 UTC
Permalink
There is some good news, I've reproduced this on my machine:

ERROR: Caused by: The TFS blame command
[C:\Users\dinesh\Source\Workspaces\tfsannotate\.\.sonar\.sonartmp\SonarTfsAnnota
te1425029377400-0.exe
C:\Users\dinesh\Source\Workspaces\tfsannotate\HelloWorldSingleCheckin.cs]
failed: The given file i
s not in a mapped TFS workspace:
C:\Users\dinesh\Source\Workspaces\tfsannotate\HelloWorldSingleCheckin.cs

And that is, even with the update plugin version passing the absolute file
path.

I should be able to investigate this further now - but it is going to take
some time.

Meanwhile I suggest to uninstall this TFS SCM plugin if it is causing
troubles.

Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Fri, Feb 27, 2015 at 9:58 AM, Dinesh Bolkensteyn <
***@sonarsource.com> wrote:

> Alejandro: Let's not rush too much on this... there are multiple issues to
> be solved, and so far I wasn't even able to reproduce the issue locally.
> Could you perhaps send over the project's layout? (i.e. where is the
> sonar-project.properties, where are each modules, were is the $tf folder,
> etc.)
>
> Espen: I'd rather be sure than speculate, could you please give a try to
> this update plugin which includes Cesar's fix?
>
> https://sonarplugins.ci.cloudbees.com/job/scm-tfs/ws/target/sonar-scm-tfs-plugin-1.1-SNAPSHOT.jar
>
> Thank you
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>
> On Fri, Feb 27, 2015 at 8:38 AM, Alejandro Piera Ferrer <
> ***@excentia.es> wrote:
>
>> Hi Dinesh and Julien,
>>
>> When you think will be a new version of SonarTfsAnnotate and TFS Plugin?
>> We would like test a new version without the problem about paths and using
>> a username and password.
>>
>> Thanks in advance
>>
>> ______________________________________________________
>> *Alejandro Piera Ferrer
>> <http://es.linkedin.com/in/alejandropieraferrer/>*
>> Área de Innovación, Arquitectura y Calidad de Software
>> t: +34 96 325 48 08
>>
>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>> <http://www.linkedin.com/company/excentia>
>> <https://plus.google.com/+ExcentiaEs>
>> <http://www.excentia.es/contacto.html>
>> <http://www.excentia.es/>
>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>> Aviso Legal <http://www.excentia.es/legal.html>* - *Privacidad
>> <http://www.excentia.es/privacy.html>
>>
>> 2015-02-25 19:09 GMT+01:00 Espen Berglund <***@outlook.com>:
>>
>>> Given to issue looks like the same thing, I’m going to go for a yes, but
>>> I haven’t tested though.
>>>
>>>
>>>
>>> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
>>> *Sent:* 25. februar 2015 17:16
>>>
>>> *To:* ***@sonar.codehaus.org
>>> *Subject:* Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin
>>> 1.0
>>>
>>>
>>>
>>> I'm glad you solved your issue Cesar.
>>>
>>>
>>>
>>> @Espen: Does this fix also solve yours?
>>>
>>>
>>> Dinesh Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Wed, Feb 25, 2015 at 5:00 PM, César Tomás <***@excentia.es> wrote:
>>>
>>> Hi Dinesh,
>>>
>>>
>>>
>>> Finally I solved the problem passing to sonarTfsAnnotate the absolute
>>> path of the file to analyse.
>>>
>>> I changed the line
>>> https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L132
>>> to:
>>>
>>> *cl.addArgument(workingDirectory + "\\" + filename);*
>>>
>>>
>>>
>>> Could you consider to launch a new version of the plugin including this
>>> modification?
>>>
>>>
>>>
>>> On the other hand, now I need to use login and password to access to TFS
>>> information because it appears this error related to authorization with TFS:
>>>
>>>
>>>
>>> *Excepci¢n no controlada:
>>> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException:
>>> TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection.
>>> ---> System.Net.WebException: Error en el servidor remoto: (401) No
>>> autorizado.*
>>>
>>> * en System.Net.HttpWebRequest.GetResponse()*
>>>
>>> * en
>>> Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest
>>> webRequest, WebException& webException)*
>>>
>>>
>>>
>>> I've seen that you have an issue to add this feature to the plugin. Is
>>> it possible to include this in the new release?
>>>
>>>
>>>
>>>
>>>
>>> Thanks in advance,
>>>
>>>
>>>
>>> César.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2015-02-24 11:11 GMT+01:00 Espen Berglund <***@outlook.com>:
>>>
>>> I’m running everything on my own machine, e.g. database, sonarqube,
>>> sonar-runner etc. I don’t see permissions being an issue as everything
>>> should be run as me unless something special is within
>>> sonarqube/sonar-runner itself.
>>>
>>>
>>>
>>> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
>>> *Sent:* 24. februar 2015 10:33
>>>
>>>
>>> *To:* ***@sonar.codehaus.org
>>> *Subject:* Re: [sonar-user] 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 Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <
>>> ***@sonarsource.com> 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 <***@excentia.es>:
>>>
>>> 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ésar
>>>
>>>
>>>
>>>
>>>
>>> 2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:
>>>
>>> Hi guys,
>>>
>>> Thanks for the investigation. Do you confirm the following:
>>>
>>> Given a project:
>>>
>>> <project root>
>>>
>>> $tf
>>>
>>> module1
>>>
>>> module2
>>>
>>> ...
>>>
>>> This works:
>>>
>>> cd <project root>
>>> SonarTfsAnnotate module1/someFile.cs
>>>
>>>
>>>
>>> This don't work:
>>>
>>> cd module1
>>> SonarTfsAnnotate someFile.cs
>>>
>>> This works:
>>> SonarTfsAnnotate absolute\path\to\soneFile.cs
>>>
>>> Thanks
>>>
>>>
>>>
>>> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>>>
>>> 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ésar
>>>
>>>
>>>
>>> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>>>
>>> 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:***@outlook.com]
>>> *Sent:* 23. februar 2015 15:21
>>> *To:* ***@sonar.codehaus.org
>>> *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 [mailto:***@sonarsource.com
>>> <***@sonarsource.com>]
>>> *Sent:* 23. februar 2015 14:50
>>> *To:* ***@sonar.codehaus.org
>>> *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-7
>>>
>>>
>>> Dinesh Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
>>> ***@outlook.com> 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:***@sonarsource.com]
>>> *Sent:* 23. februar 2015 14:19
>>> *To:* ***@sonar.codehaus.org
>>> *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:
>>>
>>>
>>> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>>>
>>>
>>>
>>> You can try to remove the following check, and see if it (and how) the
>>> program still fails:
>>>
>>>
>>> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>>>
>>>
>>>
>>> Let me know how that goes
>>>
>>>
>>>
>>> Kind regards,
>>>
>>>
>>> Dinesh Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
>>> ***@sonarsource.com>:
>>>
>>> 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 Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>>>
>>>
>>>
>>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>>
>>>
>>>
>>>
>>>
>>> I also attach a screenshot of my sonar properties (Jenkins properties)
>>> just in case:
>>>
>>>
>>>
>>> [image: Imágenes integradas 3]
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>>
>>>
>>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>>> ***@sonarsource.com>:
>>>
>>> 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 you
>>>
>>>
>>> Dinesh Bolkensteyn
>>> www.SonarSource.com <http://www.sonarsource.com/>
>>> twitter.com/DBolkensteyn
>>>
>>>
>>>
>>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es>
>>> 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*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> _____________________________________________________
>>>
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> _____________________________________________________
>>>
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> _____________________________________________________
>>>
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> _____________________________________________________
>>>
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> _____________________________________________________
>>>
>>> *César Tomás Franco*
>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>
>>> Área de Innovación, Arquitectura y Calidad de Software
>>>
>>> t: 96 325 48 08
>>>
>>>
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>
>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>>
>>>
>>
>>
>
César Tomás
2015-02-27 11:08:14 UTC
Permalink
Ok Dinesh, so we look forward for the new release.

I send you my workspace structure and my sonar properties just in case it
helps you.

*C:\TFS*

*\$tf*

*\.sonar*

*\SomeFolderSouces1*

*\SomeFolderSouces2*

*Project.sln*

*Project.vssscc*




*sonar.projectBaseDir=C:\TFS*
*sonar.scm.user.secured=XXX*
*sonar.sourceEncoding=UTF-8 *
*sonar.language=cs *
*sonar.sources=. *
*sonar.forceAnalysis=true *
*sonar.projectVersion=%BUILD_ID% *
*sonar.scm-stats.enabled=true *
*sonar.projectKey=XXX *
*sonar.verbose=true *
*sonar.scm.provider=tfs *
*sonar.visualstudio.enable=true *
*sonar.projectName=XXX *
*sonar.scm.enabled=true *
*sonar.scm.password.secured=XXX*




Thanks for you feedback.

César.






2015-02-27 10:33 GMT+01:00 Dinesh Bolkensteyn <
***@sonarsource.com>:

> There is some good news, I've reproduced this on my machine:
>
> ERROR: Caused by: The TFS blame command
> [C:\Users\dinesh\Source\Workspaces\tfsannotate\.\.sonar\.sonartmp\SonarTfsAnnota
> te1425029377400-0.exe
> C:\Users\dinesh\Source\Workspaces\tfsannotate\HelloWorldSingleCheckin.cs]
> failed: The given file i
> s not in a mapped TFS workspace:
> C:\Users\dinesh\Source\Workspaces\tfsannotate\HelloWorldSingleCheckin.cs
>
> And that is, even with the update plugin version passing the absolute file
> path.
>
> I should be able to investigate this further now - but it is going to take
> some time.
>
> Meanwhile I suggest to uninstall this TFS SCM plugin if it is causing
> troubles.
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>
> On Fri, Feb 27, 2015 at 9:58 AM, Dinesh Bolkensteyn <
> ***@sonarsource.com> wrote:
>
>> Alejandro: Let's not rush too much on this... there are multiple issues
>> to be solved, and so far I wasn't even able to reproduce the issue locally.
>> Could you perhaps send over the project's layout? (i.e. where is the
>> sonar-project.properties, where are each modules, were is the $tf folder,
>> etc.)
>>
>> Espen: I'd rather be sure than speculate, could you please give a try to
>> this update plugin which includes Cesar's fix?
>>
>> https://sonarplugins.ci.cloudbees.com/job/scm-tfs/ws/target/sonar-scm-tfs-plugin-1.1-SNAPSHOT.jar
>>
>> Thank you
>>
>> Dinesh Bolkensteyn
>> www.SonarSource.com <http://www.sonarsource.com/>
>> twitter.com/DBolkensteyn <http://www.SonarSource.com>
>>
>> On Fri, Feb 27, 2015 at 8:38 AM, Alejandro Piera Ferrer <
>> ***@excentia.es> wrote:
>>
>>> Hi Dinesh and Julien,
>>>
>>> When you think will be a new version of SonarTfsAnnotate and TFS Plugin?
>>> We would like test a new version without the problem about paths and using
>>> a username and password.
>>>
>>> Thanks in advance
>>>
>>> ______________________________________________________
>>> *Alejandro Piera Ferrer
>>> <http://es.linkedin.com/in/alejandropieraferrer/>*
>>> Área de Innovación, Arquitectura y Calidad de Software
>>> t: +34 96 325 48 08
>>>
>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>> <http://www.linkedin.com/company/excentia>
>>> <https://plus.google.com/+ExcentiaEs>
>>> <http://www.excentia.es/contacto.html>
>>> <http://www.excentia.es/>
>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>> Aviso Legal <http://www.excentia.es/legal.html>* - *Privacidad
>>> <http://www.excentia.es/privacy.html>
>>>
>>> 2015-02-25 19:09 GMT+01:00 Espen Berglund <***@outlook.com>:
>>>
>>>> Given to issue looks like the same thing, I’m going to go for a yes,
>>>> but I haven’t tested though.
>>>>
>>>>
>>>>
>>>> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
>>>> *Sent:* 25. februar 2015 17:16
>>>>
>>>> *To:* ***@sonar.codehaus.org
>>>> *Subject:* Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin
>>>> 1.0
>>>>
>>>>
>>>>
>>>> I'm glad you solved your issue Cesar.
>>>>
>>>>
>>>>
>>>> @Espen: Does this fix also solve yours?
>>>>
>>>>
>>>> Dinesh Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Wed, Feb 25, 2015 at 5:00 PM, César Tomás <***@excentia.es>
>>>> wrote:
>>>>
>>>> Hi Dinesh,
>>>>
>>>>
>>>>
>>>> Finally I solved the problem passing to sonarTfsAnnotate the absolute
>>>> path of the file to analyse.
>>>>
>>>> I changed the line
>>>> https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L132
>>>> to:
>>>>
>>>> *cl.addArgument(workingDirectory + "\\" + filename);*
>>>>
>>>>
>>>>
>>>> Could you consider to launch a new version of the plugin including this
>>>> modification?
>>>>
>>>>
>>>>
>>>> On the other hand, now I need to use login and password to access to
>>>> TFS information because it appears this error related to authorization with
>>>> TFS:
>>>>
>>>>
>>>>
>>>> *Excepci¢n no controlada:
>>>> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException:
>>>> TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection.
>>>> ---> System.Net.WebException: Error en el servidor remoto: (401) No
>>>> autorizado.*
>>>>
>>>> * en System.Net.HttpWebRequest.GetResponse()*
>>>>
>>>> * en
>>>> Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest
>>>> webRequest, WebException& webException)*
>>>>
>>>>
>>>>
>>>> I've seen that you have an issue to add this feature to the plugin. Is
>>>> it possible to include this in the new release?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Thanks in advance,
>>>>
>>>>
>>>>
>>>> César.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2015-02-24 11:11 GMT+01:00 Espen Berglund <***@outlook.com>:
>>>>
>>>> I’m running everything on my own machine, e.g. database, sonarqube,
>>>> sonar-runner etc. I don’t see permissions being an issue as everything
>>>> should be run as me unless something special is within
>>>> sonarqube/sonar-runner itself.
>>>>
>>>>
>>>>
>>>> *From:* Dinesh Bolkensteyn [mailto:***@sonarsource.com]
>>>> *Sent:* 24. februar 2015 10:33
>>>>
>>>>
>>>> *To:* ***@sonar.codehaus.org
>>>> *Subject:* Re: [sonar-user] 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 Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <
>>>> ***@sonarsource.com> 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 <***@excentia.es>:
>>>>
>>>> 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ésar
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2015-02-24 9:28 GMT+01:00 Julien HENRY <***@sonarsource.com>:
>>>>
>>>> Hi guys,
>>>>
>>>> Thanks for the investigation. Do you confirm the following:
>>>>
>>>> Given a project:
>>>>
>>>> <project root>
>>>>
>>>> $tf
>>>>
>>>> module1
>>>>
>>>> module2
>>>>
>>>> ...
>>>>
>>>> This works:
>>>>
>>>> cd <project root>
>>>> SonarTfsAnnotate module1/someFile.cs
>>>>
>>>>
>>>>
>>>> This don't work:
>>>>
>>>> cd module1
>>>> SonarTfsAnnotate someFile.cs
>>>>
>>>> This works:
>>>> SonarTfsAnnotate absolute\path\to\soneFile.cs
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> 2015-02-24 8:53 GMT+01:00 César Tomás <***@excentia.es>:
>>>>
>>>> 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ésar
>>>>
>>>>
>>>>
>>>> 2015-02-24 8:42 GMT+01:00 Espen Berglund <***@outlook.com>:
>>>>
>>>> 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:***@outlook.com]
>>>> *Sent:* 23. februar 2015 15:21
>>>> *To:* ***@sonar.codehaus.org
>>>> *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 [mailto:***@sonarsource.com
>>>> <***@sonarsource.com>]
>>>> *Sent:* 23. februar 2015 14:50
>>>> *To:* ***@sonar.codehaus.org
>>>> *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-7
>>>>
>>>>
>>>> Dinesh Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
>>>> ***@outlook.com> 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:***@sonarsource.com]
>>>> *Sent:* 23. februar 2015 14:19
>>>> *To:* ***@sonar.codehaus.org
>>>> *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:
>>>>
>>>>
>>>> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>>>>
>>>>
>>>>
>>>> You can try to remove the following check, and see if it (and how) the
>>>> program still fails:
>>>>
>>>>
>>>> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>>>>
>>>>
>>>>
>>>> Let me know how that goes
>>>>
>>>>
>>>>
>>>> Kind regards,
>>>>
>>>>
>>>> Dinesh Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es>
>>>> 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 <
>>>> ***@sonarsource.com>:
>>>>
>>>> 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 Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es>
>>>> 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.
>>>>
>>>>
>>>>
>>>> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I also attach a screenshot of my sonar properties (Jenkins properties)
>>>> just in case:
>>>>
>>>>
>>>>
>>>> [image: Imágenes integradas 3]
>>>>
>>>>
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
>>>> ***@sonarsource.com>:
>>>>
>>>> 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 you
>>>>
>>>>
>>>> Dinesh Bolkensteyn
>>>> www.SonarSource.com <http://www.sonarsource.com/>
>>>> twitter.com/DBolkensteyn
>>>>
>>>>
>>>>
>>>> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es>
>>>> 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*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> _____________________________________________________
>>>>
>>>> *César Tomás Franco*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> _____________________________________________________
>>>>
>>>> *César Tomás Franco*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> _____________________________________________________
>>>>
>>>> *César Tomás Franco*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> _____________________________________________________
>>>>
>>>> *César Tomás Franco*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> _____________________________________________________
>>>>
>>>> *César Tomás Franco*
>>>> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>>>>
>>>> Área de Innovación, Arquitectura y Calidad de Software
>>>>
>>>> t: 96 325 48 08
>>>>
>>>>
>>>>
>>>> <http://facebook.com/excentia> <http://twitter.com/excentia>
>>>> <http://www.linkedin.com/company/excentia>
>>>> <https://plus.google.com/+ExcentiaEs>
>>>> <http://www.excentia.es/contacto.html>
>>>>
>>>> <http://www.excentia.es/>
>>>> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
>>>> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>>>>
>>>> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
>>>> <http://www.excentia.es/privacy.html>
>>>>
>>>>
>>>>
>>>
>>>
>>
>


--
_____________________________________________________
*César Tomás Franco*
<http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
Área de Innovación, Arquitectura y Calidad de Software
t: 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
<http://www.excentia.es/privacy.html>
Alex
2015-05-20 14:23:32 UTC
Permalink
Hi,

I have the same issue trying to upgrade to sonar 5. Any news about the
solution or workarounds (besides manually patching java files)?

Below is a part of log. Showing that some files completed successfully, but
one causes "The given file has not yet been checked-in" error.

I'd appreciate any help.

16:14:14.924 INFO - 566/610 files analyzed, last one was
C:/e3b267e83bd5daf/BMS2.WebUI/ViewModels/SupplierAdditionalInfoModelBuilder.cs
16:14:24.925 INFO - 576/610 files analyzed, last one was
C:/e3b267e83bd5daf/BMS2.WebUI/ViewModels/SupplierCostStatisticReportFilterModel.cs
16:14:34.925 INFO - 586/610 files analyzed, last one was
C:/e3b267e83bd5daf/BMS2.WebUI/ViewModels/SupplierMatchMatchedSupplierModelBuilder.cs
INFO:
------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO:
------------------------------------------------------------------------
Total time: 13:19.992s
Final Memory: 90M/705M
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
INFO:
------------------------------------------------------------------------
ERROR: Caused by: The TFS blame command
[C:\e3b267e83bd5daf\.\.sonar\.sonartmp\SonarTfsAnnotate1432130734777-0.exe
WindsorInstallers/BMS2.ApplicationLogic/ReportsInstaller.cs] failed: The
given file has not yet been checked-in:
WindsorInstallers/BMS2.ApplicationLogic/ReportsInstaller.cs



--
View this message in context: http://sonarqube.15.x6.nabble.com/Re-sonar-dev-VOTE-Release-TFS-Plugin-1-0-tp5032620p5035562.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Dinesh Bolkensteyn
2015-05-22 11:50:35 UTC
Permalink
Hello Alex,

There is currently an ongoing vote to release a TFS SCM plugin 2.0 which
solves this issue.

Feel free to test it and provide your feedback:

See this thread:
http://sonarqube.15.x6.nabble.com/sonar-dev-VOTE-SonarQube-SCM-TFS-plugin-2-0-td5035092.html

Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

On Wed, May 20, 2015 at 4:23 PM, Alex <***@tomin.kiev.ua> wrote:

> Hi,
>
> I have the same issue trying to upgrade to sonar 5. Any news about the
> solution or workarounds (besides manually patching java files)?
>
> Below is a part of log. Showing that some files completed successfully, but
> one causes "The given file has not yet been checked-in" error.
>
> I'd appreciate any help.
>
> 16:14:14.924 INFO - 566/610 files analyzed, last one was
>
> C:/e3b267e83bd5daf/BMS2.WebUI/ViewModels/SupplierAdditionalInfoModelBuilder.cs
> 16:14:24.925 INFO - 576/610 files analyzed, last one was
>
> C:/e3b267e83bd5daf/BMS2.WebUI/ViewModels/SupplierCostStatisticReportFilterModel.cs
> 16:14:34.925 INFO - 586/610 files analyzed, last one was
>
> C:/e3b267e83bd5daf/BMS2.WebUI/ViewModels/SupplierMatchMatchedSupplierModelBuilder.cs
> INFO:
> ------------------------------------------------------------------------
> INFO: EXECUTION FAILURE
> INFO:
> ------------------------------------------------------------------------
> Total time: 13:19.992s
> Final Memory: 90M/705M
> ERROR: Error during Sonar runner execution
> ERROR: Unable to execute Sonar
> INFO:
> ------------------------------------------------------------------------
> ERROR: Caused by: The TFS blame command
> [C:\e3b267e83bd5daf\.\.sonar\.sonartmp\SonarTfsAnnotate1432130734777-0.exe
> WindsorInstallers/BMS2.ApplicationLogic/ReportsInstaller.cs] failed: The
> given file has not yet been checked-in:
> WindsorInstallers/BMS2.ApplicationLogic/ReportsInstaller.cs
>
>
>
> --
> View this message in context:
> http://sonarqube.15.x6.nabble.com/Re-sonar-dev-VOTE-Release-TFS-Plugin-1-0-tp5032620p5035562.html
> Sent from the SonarQube Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
César Tomás
2015-02-24 07:43:43 UTC
Permalink
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.java

If 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 <***@outlook.com>:

> 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:***@sonarsource.com]
> *Sent:* 23. februar 2015 14:50
>
> *To:* ***@sonar.codehaus.org
> *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-7
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <
> ***@outlook.com> 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:***@sonarsource.com]
> *Sent:* 23. februar 2015 14:19
> *To:* ***@sonar.codehaus.org
> *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:
>
> https://github.com/SonarCommunity/sonar-tfs/tree/master/SonarTfsAnnotate
>
>
>
> You can try to remove the following check, and see if it (and how) the
> program still fails:
>
>
> https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/Program.cs#L44
>
>
>
> Let me know how that goes
>
>
>
> Kind regards,
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <***@excentia.es> 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 <
> ***@sonarsource.com>:
>
> 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 Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <***@excentia.es> 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.
>
>
>
> [image: Imágenes integradas 2][image: Imágenes integradas 1]
>
>
>
>
>
> I also attach a screenshot of my sonar properties (Jenkins properties)
> just in case:
>
>
>
> [image: Imágenes integradas 3]
>
>
>
> Thanks in advance.
>
>
>
>
>
> 2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <
> ***@sonarsource.com>:
>
> 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 you
>
>
> Dinesh Bolkensteyn
> www.SonarSource.com <http://www.sonarsource.com/>
> twitter.com/DBolkensteyn
>
>
>
> On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <***@excentia.es> 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*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>
>
>
> --
>
> _____________________________________________________
>
> *César Tomás Franco*
> <http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
>
> Área de Innovación, Arquitectura y Calidad de Software
>
> t: 96 325 48 08
>
>
>
> <http://facebook.com/excentia> <http://twitter.com/excentia>
> <http://www.linkedin.com/company/excentia>
> <https://plus.google.com/+ExcentiaEs>
> <http://www.excentia.es/contacto.html>
>
> <http://www.excentia.es/>
> <http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
> <http://www.excentia.es/img/certificados/iqnet-certified-full.png>
>
> Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
> <http://www.excentia.es/privacy.html>
>
>
>
>
>



--
_____________________________________________________
*César Tomás Franco*
<http://es.linkedin.com/pub/césar-tomás-franco/58/833/499/>
Área de Innovación, Arquitectura y Calidad de Software
t: 96 325 48 08

<http://facebook.com/excentia> <http://twitter.com/excentia>
<http://www.linkedin.com/company/excentia>
<https://plus.google.com/+ExcentiaEs>
<http://www.excentia.es/contacto.html>
<http://www.excentia.es/>
<http://www.excentia.es/img/certificados/aenor-iso-9000-full.png>
<http://www.excentia.es/img/certificados/iqnet-certified-full.png>
Aviso Legal <http://www.excentia.es/legal.html> - Privacidad
<http://www.excentia.es/privacy.html>
Loading...