atom feed7 messages in org.codehaus.sonar.userRe: [sonar-user] org.sonar.squid.api....
FromSent OnAttachments
Michael KimberFeb 6, 2012 6:04 am 
Fabrice BellingardFeb 8, 2012 12:01 am 
Olivier GaudinFeb 8, 2012 12:38 am 
Michael KimberFeb 8, 2012 12:57 am 
Michael KimberFeb 8, 2012 1:01 am.xml
Evgeny MandrikovFeb 8, 2012 1:13 am 
Michael KimberFeb 8, 2012 1:58 am 
Subject:Re: [sonar-user] org.sonar.squid.api.AnalysisException: The source directory does not correspond to the package declaration - With Maven
From:Evgeny Mandrikov (mand@gmail.com)
Date:Feb 8, 2012 1:13:53 am
List:org.codehaus.sonar.user

Hi,

In you pom.xml :

<build> <sourceDirectory>.</sourceDirectory>

Whereas file
"/localhome/kana/p4/head/services/dashboard/DashboardServiceUtility/src/main/java/com/kana/sem/services/dashboard/DimensionFlush.java" has package declaration "com.kana.sem.services.dashboard" and so source root directory should be "/localhome/kana/p4/head/services/dashboard/DashboardServiceUtility/src/main/java" which means that "sourceDirectory" in pom.xml should be declared as "src/main/java".

Hope it's clear.

On Wed, Feb 8, 2012 at 13:01, Michael Kimber <kimb@gmail.com> wrote:

Its built using maven. The pom.xml is attached.

Thanks

On 8 February 2012 08:39, Olivier Gaudin <gau@gmail.com> wrote:

Hi Michael,

Is this project build with Maven or did you create pom.xml just for Sonar analysis ? WOuld you be able to send the full pom ?

Thanks

On Wed, Feb 8, 2012 at 9:02 AM, Fabrice Bellingard < fabr@sonarsource.com> wrote:

Hi Michael,

Well, on my side, I do not see what can happen :-(

Best regards,

On Mon, Feb 6, 2012 at 15:04, Michael Kimber <kimb@gmail.com>wrote:

Similar to one of the other posts on this mailing list a number of of my projects (5) are a failing with errors like:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project DashboardServiceUtility: Can not execute Sonar: Got an exception - org.sonar.squid.api.AnalysisException: The source directory does not correspond to the package declaration com.kana.sem.services.dashboard, file : /localhome/kana/p4/head/services/dashboard/DashboardServiceUtility/src/main/java/com/kana/sem/services/dashboard/DimensionFlush.java, line : 0 -> [Help 1]

I'm sure I'm just missing something but to me the package declaration does match:

package com.kana.sem.services.dashboard

The Maven coordinates for this project are:

<groupId>com.kana.sem.services.dashboard</groupId> <artifactId>DashboardServiceUtility</artifactId> <version>${sem.version}</version> <name>DashboardServiceUtility</name>

Any help showing me what I'm missing here would be gratefully appreciated.

Thanks