Discussion:
<sonar.exclusions> in pom.xml and settings
wp10590362-info
2014-05-23 13:28:05 UTC
Permalink
Hi,

I wondered why my global settings to exclude "**/*jquery*.js" didnt work - until
I found a <sonar.exclusion> properties in the project's pom.xml.
After removing the configuration in the pom.xml the files defined in global
settings were excluded, as expected.

What is the expected behaviour here? Do pom.xml <sonar.exclusions> override the
global settings at all ? Should'nt or could'nt the entries be merged ?

What is "best practice" here to generally exclude some (known) files - but let
the project additionally exclude some project specific files ?

Thanx, Torsten
G. Ann Campbell
2014-05-23 13:35:01 UTC
Permalink
In terms of settings:
* Analysis overrides project (and above)
* project overrides global

So what you got was the expected behavior.
Post by wp10590362-info
Hi,
I wondered why my global settings to exclude "**/*jquery*.js" didnt work
- until I found a <sonar.exclusion> properties in the project's pom.xml.
After removing the configuration in the pom.xml the files defined in
global settings were excluded, as expected.
What is the expected behaviour here? Do pom.xml <sonar.exclusions>
override the global settings at all ? Should'nt or could'nt the entries be
merged ?
What is "best practice" here to generally exclude some (known) files -
but let the project additionally exclude some project specific files ?
Thanx, Torsten
--
G. Ann CAMPBELL | SonarSource
http://sonarsource.com
f***@public.gmane.org
2014-05-26 06:28:27 UTC
Permalink
Hello everyone,

I have a reactor build which I use to aggregate about 60 projects, modeled
as direct submodules of the reactor pom. What I want to achieve is having
each module displayed as project in SonarQube.
Everything is fine when I analyze the modules for themselves one by one,
but when I try to analyze the reactor (so it analyzes all projects)
SonarQube tells me:

The project 'foo:bar' is already defined in SonarQube but not as a module
of project 'foo:reactor'. If you really want to stop directly analysing
project 'foo:bar', please first delete it from SonarQube and then relaunch
the analysis of project 'foo:reactor'.

That's not what I want to do, because I do not want to have 60 build
configurations on my CI-Server for analyzing each project on its own.

Can anyone tell me how to do this?

Regards
Frank
Julien HENRY
2014-05-26 07:51:38 UTC
Permalink
Hi,

This feature was discussed several times in the past but never implemented.
It was always rejected to have it in the core (or in the SQ mojo) but it
was accepted as a potential feature of jenkins SQ plugin. Feel free to vote
for http://jira.codehaus.org/browse/SONARJNKNS-2.

Other option I already successfully implemented few years ago was to use a
custom groovy build step in Jenkins. This script was iterating over each
Maven module to run mvn sonar:sonar.

++

Julien
Post by f***@public.gmane.org
Hello everyone,
I have a reactor build which I use to aggregate about 60 projects, modeled
as direct submodules of the reactor pom. What I want to achieve is having
each module displayed as project in SonarQube.
Everything is fine when I analyze the modules for themselves one by one,
but when I try to analyze the reactor (so it analyzes all projects)
The project 'foo:bar' is already defined in SonarQube but not as a module
of project 'foo:reactor'. If you really want to stop directly analysing
project 'foo:bar', please first delete it from SonarQube and then relaunch
the analysis of project 'foo:reactor'.
That's not what I want to do, because I do not want to have 60 build
configurations on my CI-Server for analyzing each project on its own.
Can anyone tell me how to do this?
Regards
Frank
f***@public.gmane.org
2014-05-26 08:04:59 UTC
Permalink
Hi,

as this is fine for Jenkins, it would be nice in the mojo since not
everyone (us) is using Jenkins.

Frank



Von:
julien.henry-tdHRWj7/***@public.gmane.org
An:
user-***@public.gmane.org
Datum:
26.05.2014 09:53
Betreff:
Re: [sonar-user] How to treat reactor modules as projects



Hi,

This feature was discussed several times in the past but never
implemented. It was always rejected to have it in the core (or in the SQ
mojo) but it was accepted as a potential feature of jenkins SQ plugin.
Feel free to vote for http://jira.codehaus.org/browse/SONARJNKNS-2.

Other option I already successfully implemented few years ago was to use a
custom groovy build step in Jenkins. This script was iterating over each
Maven module to run mvn sonar:sonar.

++

Julien


2014-05-26 8:28 GMT+02:00 <frank.jakop-***@public.gmane.org>:
Hello everyone,

I have a reactor build which I use to aggregate about 60 projects, modeled
as direct submodules of the reactor pom. What I want to achieve is having
each module displayed as project in SonarQube.
Everything is fine when I analyze the modules for themselves one by one,
but when I try to analyze the reactor (so it analyzes all projects)
SonarQube tells me:

The project 'foo:bar' is already defined in SonarQube but not as a module
of project 'foo:reactor'. If you really want to stop directly analysing
project 'foo:bar', please first delete it from SonarQube and then relaunch
the analysis of project 'foo:reactor'.

That's not what I want to do, because I do not want to have 60 build
configurations on my CI-Server for analyzing each project on its own.

Can anyone tell me how to do this?

Regards
Frank

Loading...