atom feed11 messages in org.codehaus.sonar.userRe: [sonar-user] SCM activity for TFS
FromSent OnAttachments
Figler, JoshJul 8, 2011 10:36 am 
Evgeny MandrikovJul 10, 2011 5:07 am 
Figler, JoshJul 11, 2011 5:31 am 
Evgeny MandrikovJul 11, 2011 7:51 am 
Figler, JoshJul 11, 2011 8:07 am 
Evgeny MandrikovJul 25, 2011 2:01 pm 
Figler, JoshJul 26, 2011 5:09 am 
Figler, JoshJul 26, 2011 5:26 am 
Figler, JoshAug 24, 2011 9:50 am 
Evgeny MandrikovAug 25, 2011 2:10 am 
Figler, JoshAug 25, 2011 3:56 am 
Subject:Re: [sonar-user] SCM activity for TFS
From:Evgeny Mandrikov (mand@gmail.com)
Date:Jul 11, 2011 7:51:29 am
List:org.codehaus.sonar.user

Could you please confirm that command "tf history" with absolute path to directory will provide history for specified directory ? I.E. "tf history N:\Hudson\workspace\HRO_CustomTools_BuildPackager_Sonar" will provide changelog for project, which was checkouted to "N:\Hudson\workspace\HRO_CustomTools_BuildPackager_Sonar". If so, then issue comes from Maven SCM library and I'm going to create ticket in Jira for this.

On Mon, Jul 11, 2011 at 16:32, Figler, Josh <jfig@paychex.com> wrote:

** No, I don't use Maven to build my project, but I do use it as the runner for Sonar analysis.

------------------------------ *From:* Evgeny Mandrikov [mailto:mand@gmail.com] *Sent:* Sunday, July 10, 2011 8:08 AM *To:* us@sonar.codehaus.org *Subject:* Re: [sonar-user] SCM activity for TFS

Hi Josh,

As stated on page http://docs.codehaus.org/display/SONAR/SCM+Activity+Plugin support for Team Foundation Server was implemented, but never really tested in real environment as we don't have an TFS experts, thus we don't guarantee that it works.

I believe that command "tf history" with absolute path to directory will provide history for specified directory, so in fact underlying question - why command contains just a directory name, but not a full path. Unfortunately I can't do tests on my side, but most probably problem comes from library Maven SCM <http://maven.apache.org/scm/>, which is used by Sonar SCM Activity Plugin. So also question - do you use Maven to build your project ?

On Fri, Jul 8, 2011 at 21:37, Figler, Josh <jfig@paychex.com> wrote:

** I'm trying to use the SCM activity plug-in (version 1.3 with Sonar 2.7) for TFS, and am having no luck.

My scm url is this -- *scm:tfs:http://MyRepository:8080:Hudson- ${JOB_NAME}-${NODE_NAME}:$/MyProjectPath/BuildPackager* Breakdown or url:

- Repository url -- *http://MyRepository:8080* - Workspace -- *Hudson-${JOB_NAME}-${NODE_NAME}* - Project path in TFS -- *$/MyProjectPath/BuildPackager*

The mapped location on the local machine is
*N:\Hudson\workspace\HRO_CustomTools_BuildPackager_Sonar. *The JOB_NAME is *HRO_CustomTools_BuildPackager *and the NODE_NAME is hapnv004.

From within Hudson, this errors out, and I see why but I don't understand why it would behave like this ;)

*13:19:18* [INFO] Sensor ScmActivitySensor...*13:19:18* [INFO] Check for
local modifications...*13:19:18* [INFO] Check for local modifications done: 0
ms*13:19:19* [INFO] scmUrl -
http://MyRepository:8080:Hudson-HRO_CustomTools_BuildPackager_Sonar-hapnv004:$/MyProjectPath/BuildPackager*13:19:19*
[INFO] Scheme - http*13:19:19* [INFO] Retrieve changelog...*13:19:19*
[INFO] It can be long this first time. Next analysis will be faster.*13:19:19*
[INFO] Command line - cmd.exe /X /C "tf history -format:detailed
HRO_CustomTools_BuildPackager_Sonar"*13:19:19* [INFO] err - The item
$/MyProjectPath/BuildPackager/HRO_CustomTools_BuildPackager_Sonar does not exist
at the specified version.*13:19:19* *13:19:19* [INFO] Retrieve changelog
done: 280 ms

** I believe the command should be "tf history -format:detailed $/MyProjectPath/BuildPackager" but instead it is tossing the locally mapped folder on the end of the project path, which obviously doesn't exist because that's simply the mapped folder I've created to insert my checkout out source...

Just as an additional side note, if I make my scm url simply *scm:tfs: http://MyRepository:8080 *I get the same result... It's able to figure out the project path somehow...

Is there a way I can craft my url to fit my scenario? It would seem like there is, but I'm having no luck...

*Josh Figler* Paychex, Inc. Enterprise Build Automation (585)216-2859