Quantcast

Excluding directories from Sonar Analysis doesn't seem to work

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Excluding directories from Sonar Analysis doesn't seem to work

Daniel Warzecha
Hello,

I'm using a Jenkins/Sonar combo. We have a multi-module project being
analyzed by Sonar.

The problem: some source folders of some modules are either generated
or external sources that we do not want to be analyzed.

At the moment, I've set Sonar Site->Project->Configuration->Exclusions
to exclude the sources.
As an example, I want to exclude all java files in the path containing
a gensrc folder.
My exclusion filter is
**/gensrc/**/*.java

Is this correct? It doesn't seem to work, as all Findbugs and
Checkstyle warnings are still present in the analysis.

I also generate a JaCoCo report in Jenkins which I then use in Sonar.
I excluded the same paths by using the

<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-version}</version>
<configuration>
        <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
                <excludes>
                        <exclude>**/gensrc/**/*.java</exclude>
                        <exclude>**/extsrc/**/*.java</exclude>
                        <exclude>**/extsource/**/*.java</exclude>
                        <exclude>**/*Test.*</exclude>
                </excludes>
 </configuration>

This also doesn't seem to work.

Any ideas regarding these two problems?

Thanks in advance,
Daniel Warzecha

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Ann Campbell
Is the gensrc directory located next to the src directory? Or within it? I'm wondering if that leading "**/" isn't throwing it off...


On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha <[hidden email]> wrote:
Hello,

I'm using a Jenkins/Sonar combo. We have a multi-module project being
analyzed by Sonar.

The problem: some source folders of some modules are either generated
or external sources that we do not want to be analyzed.

At the moment, I've set Sonar Site->Project->Configuration->Exclusions
to exclude the sources.
As an example, I want to exclude all java files in the path containing
a gensrc folder.
My exclusion filter is
**/gensrc/**/*.java

Is this correct? It doesn't seem to work, as all Findbugs and
Checkstyle warnings are still present in the analysis.

I also generate a JaCoCo report in Jenkins which I then use in Sonar.
I excluded the same paths by using the

<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-version}</version>
<configuration>
       <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
               <excludes>
                       <exclude>**/gensrc/**/*.java</exclude>
                       <exclude>**/extsrc/**/*.java</exclude>
                       <exclude>**/extsource/**/*.java</exclude>
                       <exclude>**/*Test.*</exclude>
               </excludes>
 </configuration>

This also doesn't seem to work.

Any ideas regarding these two problems?

Thanks in advance,
Daniel Warzecha

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

   http://xircles.codehaus.org/manage_email





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Daniel Warzecha
Hello,

the source directories are:

MODULE_NAME/src/... and
MODULE_NAME/gensrc/...

Shouldn't ** mean zero or more directories?

Irritated,
Daniel Warzecha

2012/6/27 Ann Campbell <[hidden email]>:

> Is the gensrc directory located next to the src directory? Or within it? I'm
> wondering if that leading "**/" isn't throwing it off...
>
>
> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha <[hidden email]>
> wrote:
>>
>> Hello,
>>
>> I'm using a Jenkins/Sonar combo. We have a multi-module project being
>> analyzed by Sonar.
>>
>> The problem: some source folders of some modules are either generated
>> or external sources that we do not want to be analyzed.
>>
>> At the moment, I've set Sonar Site->Project->Configuration->Exclusions
>> to exclude the sources.
>> As an example, I want to exclude all java files in the path containing
>> a gensrc folder.
>> My exclusion filter is
>> **/gensrc/**/*.java
>>
>> Is this correct? It doesn't seem to work, as all Findbugs and
>> Checkstyle warnings are still present in the analysis.
>>
>> I also generate a JaCoCo report in Jenkins which I then use in Sonar.
>> I excluded the same paths by using the
>>
>> <groupId>org.jacoco</groupId>
>> <artifactId>jacoco-maven-plugin</artifactId>
>> <version>${jacoco-maven-version}</version>
>> <configuration>
>>        <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>>                <excludes>
>>                        <exclude>**/gensrc/**/*.java</exclude>
>>                        <exclude>**/extsrc/**/*.java</exclude>
>>                        <exclude>**/extsource/**/*.java</exclude>
>>                        <exclude>**/*Test.*</exclude>
>>                </excludes>
>>  </configuration>
>>
>> This also doesn't seem to work.
>>
>> Any ideas regarding these two problems?
>>
>> Thanks in advance,
>> Daniel Warzecha
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> G. Ann Campbell
> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> Shaw Industries Inc,
> 201 S. Hamilton St.
> Dalton Ga 30720
>
>
> **********************************************************
> Privileged and/or confidential information may be contained in this message.
> If you are not the addressee indicated in this message (or are not
> responsible for delivery of this message to that person) , you may not copy
> or deliver this message to anyone. In such case, you should destroy this
> message and notify the sender by reply e-mail.
> If you or your employer do not consent to Internet e-mail for messages of
> this kind, please advise the sender.
> Shaw Industries does not provide or endorse any opinions, conclusions or
> other information in this message that do not relate to the official
> business of the company  or its subsidiaries.
> **********************************************************
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Ann Campbell
I'm no Maven maven, it just seem like it might be worth trying.


On Wed, Jun 27, 2012 at 10:39 AM, Daniel Warzecha <[hidden email]> wrote:
Hello,

the source directories are:

MODULE_NAME/src/... and
MODULE_NAME/gensrc/...

Shouldn't ** mean zero or more directories?

Irritated,
Daniel Warzecha

2012/6/27 Ann Campbell <[hidden email]>:
> Is the gensrc directory located next to the src directory? Or within it? I'm
> wondering if that leading "**/" isn't throwing it off...
>
>
> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha <[hidden email]>
> wrote:
>>
>> Hello,
>>
>> I'm using a Jenkins/Sonar combo. We have a multi-module project being
>> analyzed by Sonar.
>>
>> The problem: some source folders of some modules are either generated
>> or external sources that we do not want to be analyzed.
>>
>> At the moment, I've set Sonar Site->Project->Configuration->Exclusions
>> to exclude the sources.
>> As an example, I want to exclude all java files in the path containing
>> a gensrc folder.
>> My exclusion filter is
>> **/gensrc/**/*.java
>>
>> Is this correct? It doesn't seem to work, as all Findbugs and
>> Checkstyle warnings are still present in the analysis.
>>
>> I also generate a JaCoCo report in Jenkins which I then use in Sonar.
>> I excluded the same paths by using the
>>
>> <groupId>org.jacoco</groupId>
>> <artifactId>jacoco-maven-plugin</artifactId>
>> <version>${jacoco-maven-version}</version>
>> <configuration>
>>        <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>>                <excludes>
>>                        <exclude>**/gensrc/**/*.java</exclude>
>>                        <exclude>**/extsrc/**/*.java</exclude>
>>                        <exclude>**/extsource/**/*.java</exclude>
>>                        <exclude>**/*Test.*</exclude>
>>                </excludes>
>>  </configuration>
>>
>> This also doesn't seem to work.
>>
>> Any ideas regarding these two problems?
>>
>> Thanks in advance,
>> Daniel Warzecha
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> G. Ann Campbell
> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> Shaw Industries Inc,
> 201 S. Hamilton St.
> Dalton Ga 30720
>
>
> **********************************************************
> Privileged and/or confidential information may be contained in this message.
> If you are not the addressee indicated in this message (or are not
> responsible for delivery of this message to that person) , you may not copy
> or deliver this message to anyone. In such case, you should destroy this
> message and notify the sender by reply e-mail.
> If you or your employer do not consent to Internet e-mail for messages of
> this kind, please advise the sender.
> Shaw Industries does not provide or endorse any opinions, conclusions or
> other information in this message that do not relate to the official
> business of the company  or its subsidiaries.
> **********************************************************
>

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

   http://xircles.codehaus.org/manage_email





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Evgeny Mandrikov
In reply to this post by Daniel Warzecha
Hi,

I guess that exclusions applied on a relative path from a source directory, i.e. you can exclude packages, but not root source directories...

On Wed, Jun 27, 2012 at 8:39 PM, Daniel Warzecha <[hidden email]> wrote:
Hello,

the source directories are:

MODULE_NAME/src/... and
MODULE_NAME/gensrc/...

Shouldn't ** mean zero or more directories?

Irritated,
Daniel Warzecha

2012/6/27 Ann Campbell <[hidden email]>:
> Is the gensrc directory located next to the src directory? Or within it? I'm
> wondering if that leading "**/" isn't throwing it off...
>
>
> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha <[hidden email]>
> wrote:
>>
>> Hello,
>>
>> I'm using a Jenkins/Sonar combo. We have a multi-module project being
>> analyzed by Sonar.
>>
>> The problem: some source folders of some modules are either generated
>> or external sources that we do not want to be analyzed.
>>
>> At the moment, I've set Sonar Site->Project->Configuration->Exclusions
>> to exclude the sources.
>> As an example, I want to exclude all java files in the path containing
>> a gensrc folder.
>> My exclusion filter is
>> **/gensrc/**/*.java
>>
>> Is this correct? It doesn't seem to work, as all Findbugs and
>> Checkstyle warnings are still present in the analysis.
>>
>> I also generate a JaCoCo report in Jenkins which I then use in Sonar.
>> I excluded the same paths by using the
>>
>> <groupId>org.jacoco</groupId>
>> <artifactId>jacoco-maven-plugin</artifactId>
>> <version>${jacoco-maven-version}</version>
>> <configuration>
>>        <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>>                <excludes>
>>                        <exclude>**/gensrc/**/*.java</exclude>
>>                        <exclude>**/extsrc/**/*.java</exclude>
>>                        <exclude>**/extsource/**/*.java</exclude>
>>                        <exclude>**/*Test.*</exclude>
>>                </excludes>
>>  </configuration>
>>
>> This also doesn't seem to work.
>>
>> Any ideas regarding these two problems?
>>
>> Thanks in advance,
>> Daniel Warzecha
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> G. Ann Campbell
> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> Shaw Industries Inc,
> 201 S. Hamilton St.
> Dalton Ga 30720
>
>
> **********************************************************
> Privileged and/or confidential information may be contained in this message.
> If you are not the addressee indicated in this message (or are not
> responsible for delivery of this message to that person) , you may not copy
> or deliver this message to anyone. In such case, you should destroy this
> message and notify the sender by reply e-mail.
> If you or your employer do not consent to Internet e-mail for messages of
> this kind, please advise the sender.
> Shaw Industries does not provide or endorse any opinions, conclusions or
> other information in this message that do not relate to the official
> business of the company  or its subsidiaries.
> **********************************************************
>

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

   http://xircles.codehaus.org/manage_email





--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Daniel Warzecha
In reply to this post by Daniel Warzecha
Hello again,

I added another pattern, extsource, to the exclusion filters. Without
it, Jenkins/Sonar's output is:

[INFO] [04:21:04.014] Initializer FindbugsMavenInitializer...
[INFO] [04:21:04.014] Initializer FindbugsMavenInitializer done: 0 ms
[INFO] [04:21:04.014] Initializer ProjectFileSystemLogger...
[INFO] [04:21:04.014] Excluded sources: [**/gensrc/**/*.java,
**/extsrc/**/*.java]
[INFO] [04:21:04.014] Source directories:
[INFO] [04:21:04.015]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
[INFO] [04:21:04.015]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
[INFO] [04:21:04.015] Initializer ProjectFileSystemLogger done: 1 ms
[INFO] [04:21:04.015] Initializer MavenInitializer...

With extsource as exclusion filter, the

[INFO] [04:21:04.015]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource

line is removed. So that is that. But the analysis still shows
violations from inside the extsource folder.
Also, the gensrc exclusion doesn't seem to work at all, as another
part of the output shows...

[INFO] [16:00:36.541] Initializer FindbugsMavenInitializer...
[INFO] [16:00:36.541] Initializer FindbugsMavenInitializer done: 0 ms
[INFO] [16:00:36.541] Initializer ProjectFileSystemLogger...
[INFO] [16:00:36.541] Excluded sources: [**/gensrc/**/*.java,
**/extsrc/**/*.java, **/extsource/**/*.java]
[INFO] [16:00:36.542] Source directories:
[INFO] [16:00:36.542]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/gensrc
[INFO] [16:00:36.542]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
[INFO] [16:00:36.542] Initializer ProjectFileSystemLogger done: 1 ms
[INFO] [16:00:36.542] Initializer MavenInitializer...

When I change the exclusions to **/gensrc/** etc., the output doesn't
change (except for the excluded sources line, of course)...

Totally irritated,
Daniel Warzecha

2012/6/27 Daniel Warzecha <[hidden email]>:

> Hello,
>
> the source directories are:
>
> MODULE_NAME/src/... and
> MODULE_NAME/gensrc/...
>
> Shouldn't ** mean zero or more directories?
>
> Irritated,
> Daniel Warzecha
>
> 2012/6/27 Ann Campbell <[hidden email]>:
>> Is the gensrc directory located next to the src directory? Or within it? I'm
>> wondering if that leading "**/" isn't throwing it off...
>>
>>
>> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha <[hidden email]>
>> wrote:
>>>
>>> Hello,
>>>
>>> I'm using a Jenkins/Sonar combo. We have a multi-module project being
>>> analyzed by Sonar.
>>>
>>> The problem: some source folders of some modules are either generated
>>> or external sources that we do not want to be analyzed.
>>>
>>> At the moment, I've set Sonar Site->Project->Configuration->Exclusions
>>> to exclude the sources.
>>> As an example, I want to exclude all java files in the path containing
>>> a gensrc folder.
>>> My exclusion filter is
>>> **/gensrc/**/*.java
>>>
>>> Is this correct? It doesn't seem to work, as all Findbugs and
>>> Checkstyle warnings are still present in the analysis.
>>>
>>> I also generate a JaCoCo report in Jenkins which I then use in Sonar.
>>> I excluded the same paths by using the
>>>
>>> <groupId>org.jacoco</groupId>
>>> <artifactId>jacoco-maven-plugin</artifactId>
>>> <version>${jacoco-maven-version}</version>
>>> <configuration>
>>>        <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>>>                <excludes>
>>>                        <exclude>**/gensrc/**/*.java</exclude>
>>>                        <exclude>**/extsrc/**/*.java</exclude>
>>>                        <exclude>**/extsource/**/*.java</exclude>
>>>                        <exclude>**/*Test.*</exclude>
>>>                </excludes>
>>>  </configuration>
>>>
>>> This also doesn't seem to work.
>>>
>>> Any ideas regarding these two problems?
>>>
>>> Thanks in advance,
>>> Daniel Warzecha
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>>
>>
>> --
>> G. Ann Campbell
>> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
>> Shaw Industries Inc,
>> 201 S. Hamilton St.
>> Dalton Ga 30720
>>
>>
>> **********************************************************
>> Privileged and/or confidential information may be contained in this message.
>> If you are not the addressee indicated in this message (or are not
>> responsible for delivery of this message to that person) , you may not copy
>> or deliver this message to anyone. In such case, you should destroy this
>> message and notify the sender by reply e-mail.
>> If you or your employer do not consent to Internet e-mail for messages of
>> this kind, please advise the sender.
>> Shaw Industries does not provide or endorse any opinions, conclusions or
>> other information in this message that do not relate to the official
>> business of the company  or its subsidiaries.
>> **********************************************************
>>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Freddy Mallet
Hi Daniel, 

What Evgeny said is that the exclusion pattern ONLY works at package level. So as the "gensrc" is a root source directory but is not part of the java packages, this can't work. 

Kind regards,
freddy
-----
Sonar for Continuous Inspection



On Wed, Jun 27, 2012 at 4:55 PM, Daniel Warzecha <[hidden email]> wrote:
Hello again,

I added another pattern, extsource, to the exclusion filters. Without
it, Jenkins/Sonar's output is:

[INFO] [04:21:04.014] Initializer FindbugsMavenInitializer...
[INFO] [04:21:04.014] Initializer FindbugsMavenInitializer done: 0 ms
[INFO] [04:21:04.014] Initializer ProjectFileSystemLogger...
[INFO] [04:21:04.014] Excluded sources: [**/gensrc/**/*.java,
**/extsrc/**/*.java]
[INFO] [04:21:04.014] Source directories:
[INFO] [04:21:04.015]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
[INFO] [04:21:04.015]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
[INFO] [04:21:04.015] Initializer ProjectFileSystemLogger done: 1 ms
[INFO] [04:21:04.015] Initializer MavenInitializer...

With extsource as exclusion filter, the

[INFO] [04:21:04.015]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource

line is removed. So that is that. But the analysis still shows
violations from inside the extsource folder.
Also, the gensrc exclusion doesn't seem to work at all, as another
part of the output shows...

[INFO] [16:00:36.541] Initializer FindbugsMavenInitializer...
[INFO] [16:00:36.541] Initializer FindbugsMavenInitializer done: 0 ms
[INFO] [16:00:36.541] Initializer ProjectFileSystemLogger...
[INFO] [16:00:36.541] Excluded sources: [**/gensrc/**/*.java,
**/extsrc/**/*.java, **/extsource/**/*.java]
[INFO] [16:00:36.542] Source directories:
[INFO] [16:00:36.542]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/gensrc
[INFO] [16:00:36.542]
/var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
[INFO] [16:00:36.542] Initializer ProjectFileSystemLogger done: 1 ms
[INFO] [16:00:36.542] Initializer MavenInitializer...

When I change the exclusions to **/gensrc/** etc., the output doesn't
change (except for the excluded sources line, of course)...

Totally irritated,
Daniel Warzecha

2012/6/27 Daniel Warzecha <[hidden email]>:
> Hello,
>
> the source directories are:
>
> MODULE_NAME/src/... and
> MODULE_NAME/gensrc/...
>
> Shouldn't ** mean zero or more directories?
>
> Irritated,
> Daniel Warzecha
>
> 2012/6/27 Ann Campbell <[hidden email]>:
>> Is the gensrc directory located next to the src directory? Or within it? I'm
>> wondering if that leading "**/" isn't throwing it off...
>>
>>
>> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha <[hidden email]>
>> wrote:
>>>
>>> Hello,
>>>
>>> I'm using a Jenkins/Sonar combo. We have a multi-module project being
>>> analyzed by Sonar.
>>>
>>> The problem: some source folders of some modules are either generated
>>> or external sources that we do not want to be analyzed.
>>>
>>> At the moment, I've set Sonar Site->Project->Configuration->Exclusions
>>> to exclude the sources.
>>> As an example, I want to exclude all java files in the path containing
>>> a gensrc folder.
>>> My exclusion filter is
>>> **/gensrc/**/*.java
>>>
>>> Is this correct? It doesn't seem to work, as all Findbugs and
>>> Checkstyle warnings are still present in the analysis.
>>>
>>> I also generate a JaCoCo report in Jenkins which I then use in Sonar.
>>> I excluded the same paths by using the
>>>
>>> <groupId>org.jacoco</groupId>
>>> <artifactId>jacoco-maven-plugin</artifactId>
>>> <version>${jacoco-maven-version}</version>
>>> <configuration>
>>>        <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>>>                <excludes>
>>>                        <exclude>**/gensrc/**/*.java</exclude>
>>>                        <exclude>**/extsrc/**/*.java</exclude>
>>>                        <exclude>**/extsource/**/*.java</exclude>
>>>                        <exclude>**/*Test.*</exclude>
>>>                </excludes>
>>>  </configuration>
>>>
>>> This also doesn't seem to work.
>>>
>>> Any ideas regarding these two problems?
>>>
>>> Thanks in advance,
>>> Daniel Warzecha
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>>
>>
>> --
>> G. Ann Campbell
>> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
>> Shaw Industries Inc,
>> 201 S. Hamilton St.
>> Dalton Ga 30720
>>
>>
>> **********************************************************
>> Privileged and/or confidential information may be contained in this message.
>> If you are not the addressee indicated in this message (or are not
>> responsible for delivery of this message to that person) , you may not copy
>> or deliver this message to anyone. In such case, you should destroy this
>> message and notify the sender by reply e-mail.
>> If you or your employer do not consent to Internet e-mail for messages of
>> this kind, please advise the sender.
>> Shaw Industries does not provide or endorse any opinions, conclusions or
>> other information in this message that do not relate to the official
>> business of the company  or its subsidiaries.
>> **********************************************************
>>

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

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Daniel Warzecha
Hello,

thank you for clarifying this. So... how can I exclude whole root
source directories from analysis?

Thanks in advance,
Daniel Warzecha

2012/6/27 Freddy Mallet <[hidden email]>:

> Hi Daniel,
>
> What Evgeny said is that the exclusion pattern ONLY works at package level.
> So as the "gensrc" is a root source directory but is not part of the java
> packages, this can't work.
>
> Kind regards,
> freddy
> -----
> twitter.com/FreddyMallet
> Sonar for Continuous Inspection
>
>
>
> On Wed, Jun 27, 2012 at 4:55 PM, Daniel Warzecha <[hidden email]>
> wrote:
>>
>> Hello again,
>>
>> I added another pattern, extsource, to the exclusion filters. Without
>> it, Jenkins/Sonar's output is:
>>
>> [INFO] [04:21:04.014] Initializer FindbugsMavenInitializer...
>> [INFO] [04:21:04.014] Initializer FindbugsMavenInitializer done: 0 ms
>> [INFO] [04:21:04.014] Initializer ProjectFileSystemLogger...
>> [INFO] [04:21:04.014] Excluded sources: [**/gensrc/**/*.java,
>> **/extsrc/**/*.java]
>> [INFO] [04:21:04.014] Source directories:
>> [INFO] [04:21:04.015]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
>> [INFO] [04:21:04.015]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
>> [INFO] [04:21:04.015] Initializer ProjectFileSystemLogger done: 1 ms
>> [INFO] [04:21:04.015] Initializer MavenInitializer...
>>
>> With extsource as exclusion filter, the
>>
>> [INFO] [04:21:04.015]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
>>
>> line is removed. So that is that. But the analysis still shows
>> violations from inside the extsource folder.
>> Also, the gensrc exclusion doesn't seem to work at all, as another
>> part of the output shows...
>>
>> [INFO] [16:00:36.541] Initializer FindbugsMavenInitializer...
>> [INFO] [16:00:36.541] Initializer FindbugsMavenInitializer done: 0 ms
>> [INFO] [16:00:36.541] Initializer ProjectFileSystemLogger...
>> [INFO] [16:00:36.541] Excluded sources: [**/gensrc/**/*.java,
>> **/extsrc/**/*.java, **/extsource/**/*.java]
>> [INFO] [16:00:36.542] Source directories:
>> [INFO] [16:00:36.542]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/gensrc
>> [INFO] [16:00:36.542]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
>> [INFO] [16:00:36.542] Initializer ProjectFileSystemLogger done: 1 ms
>> [INFO] [16:00:36.542] Initializer MavenInitializer...
>>
>> When I change the exclusions to **/gensrc/** etc., the output doesn't
>> change (except for the excluded sources line, of course)...
>>
>> Totally irritated,
>> Daniel Warzecha
>>
>> 2012/6/27 Daniel Warzecha <[hidden email]>:
>> > Hello,
>> >
>> > the source directories are:
>> >
>> > MODULE_NAME/src/... and
>> > MODULE_NAME/gensrc/...
>> >
>> > Shouldn't ** mean zero or more directories?
>> >
>> > Irritated,
>> > Daniel Warzecha
>> >
>> > 2012/6/27 Ann Campbell <[hidden email]>:
>> >> Is the gensrc directory located next to the src directory? Or within
>> >> it? I'm
>> >> wondering if that leading "**/" isn't throwing it off...
>> >>
>> >>
>> >> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha
>> >> <[hidden email]>
>> >> wrote:
>> >>>
>> >>> Hello,
>> >>>
>> >>> I'm using a Jenkins/Sonar combo. We have a multi-module project being
>> >>> analyzed by Sonar.
>> >>>
>> >>> The problem: some source folders of some modules are either generated
>> >>> or external sources that we do not want to be analyzed.
>> >>>
>> >>> At the moment, I've set Sonar Site->Project->Configuration->Exclusions
>> >>> to exclude the sources.
>> >>> As an example, I want to exclude all java files in the path containing
>> >>> a gensrc folder.
>> >>> My exclusion filter is
>> >>> **/gensrc/**/*.java
>> >>>
>> >>> Is this correct? It doesn't seem to work, as all Findbugs and
>> >>> Checkstyle warnings are still present in the analysis.
>> >>>
>> >>> I also generate a JaCoCo report in Jenkins which I then use in Sonar.
>> >>> I excluded the same paths by using the
>> >>>
>> >>> <groupId>org.jacoco</groupId>
>> >>> <artifactId>jacoco-maven-plugin</artifactId>
>> >>> <version>${jacoco-maven-version}</version>
>> >>> <configuration>
>> >>>
>> >>>  <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>> >>>                <excludes>
>> >>>                        <exclude>**/gensrc/**/*.java</exclude>
>> >>>                        <exclude>**/extsrc/**/*.java</exclude>
>> >>>                        <exclude>**/extsource/**/*.java</exclude>
>> >>>                        <exclude>**/*Test.*</exclude>
>> >>>                </excludes>
>> >>>  </configuration>
>> >>>
>> >>> This also doesn't seem to work.
>> >>>
>> >>> Any ideas regarding these two problems?
>> >>>
>> >>> Thanks in advance,
>> >>> Daniel Warzecha
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe from this list, please visit:
>> >>>
>> >>>    http://xircles.codehaus.org/manage_email
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> G. Ann Campbell
>> >> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
>> >> Shaw Industries Inc,
>> >> 201 S. Hamilton St.
>> >> Dalton Ga 30720
>> >>
>> >>
>> >> **********************************************************
>> >> Privileged and/or confidential information may be contained in this
>> >> message.
>> >> If you are not the addressee indicated in this message (or are not
>> >> responsible for delivery of this message to that person) , you may not
>> >> copy
>> >> or deliver this message to anyone. In such case, you should destroy
>> >> this
>> >> message and notify the sender by reply e-mail.
>> >> If you or your employer do not consent to Internet e-mail for messages
>> >> of
>> >> this kind, please advise the sender.
>> >> Shaw Industries does not provide or endorse any opinions, conclusions
>> >> or
>> >> other information in this message that do not relate to the official
>> >> business of the company  or its subsidiaries.
>> >> **********************************************************
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Patroklos Papapetrou
Hi Daniel

You can move the whole root to a different module / project... 
Or you can move this "root" to a new package and then exclude it :)


2012/6/28 Daniel Warzecha <[hidden email]>
Hello,

thank you for clarifying this. So... how can I exclude whole root
source directories from analysis?

Thanks in advance,
Daniel Warzecha

2012/6/27 Freddy Mallet <[hidden email]>:
> Hi Daniel,
>
> What Evgeny said is that the exclusion pattern ONLY works at package level.
> So as the "gensrc" is a root source directory but is not part of the java
> packages, this can't work.
>
> Kind regards,
> freddy
> -----
> twitter.com/FreddyMallet
> Sonar for Continuous Inspection
>
>
>
> On Wed, Jun 27, 2012 at 4:55 PM, Daniel Warzecha <[hidden email]>
> wrote:
>>
>> Hello again,
>>
>> I added another pattern, extsource, to the exclusion filters. Without
>> it, Jenkins/Sonar's output is:
>>
>> [INFO] [04:21:04.014] Initializer FindbugsMavenInitializer...
>> [INFO] [04:21:04.014] Initializer FindbugsMavenInitializer done: 0 ms
>> [INFO] [04:21:04.014] Initializer ProjectFileSystemLogger...
>> [INFO] [04:21:04.014] Excluded sources: [**/gensrc/**/*.java,
>> **/extsrc/**/*.java]
>> [INFO] [04:21:04.014] Source directories:
>> [INFO] [04:21:04.015]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
>> [INFO] [04:21:04.015]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
>> [INFO] [04:21:04.015] Initializer ProjectFileSystemLogger done: 1 ms
>> [INFO] [04:21:04.015] Initializer MavenInitializer...
>>
>> With extsource as exclusion filter, the
>>
>> [INFO] [04:21:04.015]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
>>
>> line is removed. So that is that. But the analysis still shows
>> violations from inside the extsource folder.
>> Also, the gensrc exclusion doesn't seem to work at all, as another
>> part of the output shows...
>>
>> [INFO] [16:00:36.541] Initializer FindbugsMavenInitializer...
>> [INFO] [16:00:36.541] Initializer FindbugsMavenInitializer done: 0 ms
>> [INFO] [16:00:36.541] Initializer ProjectFileSystemLogger...
>> [INFO] [16:00:36.541] Excluded sources: [**/gensrc/**/*.java,
>> **/extsrc/**/*.java, **/extsource/**/*.java]
>> [INFO] [16:00:36.542] Source directories:
>> [INFO] [16:00:36.542]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/gensrc
>> [INFO] [16:00:36.542]
>> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
>> [INFO] [16:00:36.542] Initializer ProjectFileSystemLogger done: 1 ms
>> [INFO] [16:00:36.542] Initializer MavenInitializer...
>>
>> When I change the exclusions to **/gensrc/** etc., the output doesn't
>> change (except for the excluded sources line, of course)...
>>
>> Totally irritated,
>> Daniel Warzecha
>>
>> 2012/6/27 Daniel Warzecha <[hidden email]>:
>> > Hello,
>> >
>> > the source directories are:
>> >
>> > MODULE_NAME/src/... and
>> > MODULE_NAME/gensrc/...
>> >
>> > Shouldn't ** mean zero or more directories?
>> >
>> > Irritated,
>> > Daniel Warzecha
>> >
>> > 2012/6/27 Ann Campbell <[hidden email]>:
>> >> Is the gensrc directory located next to the src directory? Or within
>> >> it? I'm
>> >> wondering if that leading "**/" isn't throwing it off...
>> >>
>> >>
>> >> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha
>> >> <[hidden email]>
>> >> wrote:
>> >>>
>> >>> Hello,
>> >>>
>> >>> I'm using a Jenkins/Sonar combo. We have a multi-module project being
>> >>> analyzed by Sonar.
>> >>>
>> >>> The problem: some source folders of some modules are either generated
>> >>> or external sources that we do not want to be analyzed.
>> >>>
>> >>> At the moment, I've set Sonar Site->Project->Configuration->Exclusions
>> >>> to exclude the sources.
>> >>> As an example, I want to exclude all java files in the path containing
>> >>> a gensrc folder.
>> >>> My exclusion filter is
>> >>> **/gensrc/**/*.java
>> >>>
>> >>> Is this correct? It doesn't seem to work, as all Findbugs and
>> >>> Checkstyle warnings are still present in the analysis.
>> >>>
>> >>> I also generate a JaCoCo report in Jenkins which I then use in Sonar.
>> >>> I excluded the same paths by using the
>> >>>
>> >>> <groupId>org.jacoco</groupId>
>> >>> <artifactId>jacoco-maven-plugin</artifactId>
>> >>> <version>${jacoco-maven-version}</version>
>> >>> <configuration>
>> >>>
>> >>>  <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>> >>>                <excludes>
>> >>>                        <exclude>**/gensrc/**/*.java</exclude>
>> >>>                        <exclude>**/extsrc/**/*.java</exclude>
>> >>>                        <exclude>**/extsource/**/*.java</exclude>
>> >>>                        <exclude>**/*Test.*</exclude>
>> >>>                </excludes>
>> >>>  </configuration>
>> >>>
>> >>> This also doesn't seem to work.
>> >>>
>> >>> Any ideas regarding these two problems?
>> >>>
>> >>> Thanks in advance,
>> >>> Daniel Warzecha
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe from this list, please visit:
>> >>>
>> >>>    http://xircles.codehaus.org/manage_email
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> G. Ann Campbell
>> >> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
>> >> Shaw Industries Inc,
>> >> 201 S. Hamilton St.
>> >> Dalton Ga 30720
>> >>
>> >>
>> >> **********************************************************
>> >> Privileged and/or confidential information may be contained in this
>> >> message.
>> >> If you are not the addressee indicated in this message (or are not
>> >> responsible for delivery of this message to that person) , you may not
>> >> copy
>> >> or deliver this message to anyone. In such case, you should destroy
>> >> this
>> >> message and notify the sender by reply e-mail.
>> >> If you or your employer do not consent to Internet e-mail for messages
>> >> of
>> >> this kind, please advise the sender.
>> >> Shaw Industries does not provide or endorse any opinions, conclusions
>> >> or
>> >> other information in this message that do not relate to the official
>> >> business of the company  or its subsidiaries.
>> >> **********************************************************
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>

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

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Daniel Warzecha
Hello,

so it is not possible to just exclude the second source root folder
without changing the structure of my modules/projects?
Then I should make a feature request, it seems...

Kind Regards,
Daniel Warzecha

2012/6/28 Papapetrou P.Patroklos <[hidden email]>:

> Hi Daniel
>
> You can move the whole root to a different module / project...
> Or you can move this "root" to a new package and then exclude it :)
> Regards
> Patroklos
> Master Sonar with Sonar in Action book by Manning Publications
>
>
> 2012/6/28 Daniel Warzecha <[hidden email]>
>>
>> Hello,
>>
>> thank you for clarifying this. So... how can I exclude whole root
>> source directories from analysis?
>>
>> Thanks in advance,
>> Daniel Warzecha
>>
>> 2012/6/27 Freddy Mallet <[hidden email]>:
>> > Hi Daniel,
>> >
>> > What Evgeny said is that the exclusion pattern ONLY works at package
>> > level.
>> > So as the "gensrc" is a root source directory but is not part of the
>> > java
>> > packages, this can't work.
>> >
>> > Kind regards,
>> > freddy
>> > -----
>> > twitter.com/FreddyMallet
>> > Sonar for Continuous Inspection
>> >
>> >
>> >
>> > On Wed, Jun 27, 2012 at 4:55 PM, Daniel Warzecha
>> > <[hidden email]>
>> > wrote:
>> >>
>> >> Hello again,
>> >>
>> >> I added another pattern, extsource, to the exclusion filters. Without
>> >> it, Jenkins/Sonar's output is:
>> >>
>> >> [INFO] [04:21:04.014] Initializer FindbugsMavenInitializer...
>> >> [INFO] [04:21:04.014] Initializer FindbugsMavenInitializer done: 0 ms
>> >> [INFO] [04:21:04.014] Initializer ProjectFileSystemLogger...
>> >> [INFO] [04:21:04.014] Excluded sources: [**/gensrc/**/*.java,
>> >> **/extsrc/**/*.java]
>> >> [INFO] [04:21:04.014] Source directories:
>> >> [INFO] [04:21:04.015]
>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
>> >> [INFO] [04:21:04.015]
>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
>> >> [INFO] [04:21:04.015] Initializer ProjectFileSystemLogger done: 1 ms
>> >> [INFO] [04:21:04.015] Initializer MavenInitializer...
>> >>
>> >> With extsource as exclusion filter, the
>> >>
>> >> [INFO] [04:21:04.015]
>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
>> >>
>> >> line is removed. So that is that. But the analysis still shows
>> >> violations from inside the extsource folder.
>> >> Also, the gensrc exclusion doesn't seem to work at all, as another
>> >> part of the output shows...
>> >>
>> >> [INFO] [16:00:36.541] Initializer FindbugsMavenInitializer...
>> >> [INFO] [16:00:36.541] Initializer FindbugsMavenInitializer done: 0 ms
>> >> [INFO] [16:00:36.541] Initializer ProjectFileSystemLogger...
>> >> [INFO] [16:00:36.541] Excluded sources: [**/gensrc/**/*.java,
>> >> **/extsrc/**/*.java, **/extsource/**/*.java]
>> >> [INFO] [16:00:36.542] Source directories:
>> >> [INFO] [16:00:36.542]
>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/gensrc
>> >> [INFO] [16:00:36.542]
>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
>> >> [INFO] [16:00:36.542] Initializer ProjectFileSystemLogger done: 1 ms
>> >> [INFO] [16:00:36.542] Initializer MavenInitializer...
>> >>
>> >> When I change the exclusions to **/gensrc/** etc., the output doesn't
>> >> change (except for the excluded sources line, of course)...
>> >>
>> >> Totally irritated,
>> >> Daniel Warzecha
>> >>
>> >> 2012/6/27 Daniel Warzecha <[hidden email]>:
>> >> > Hello,
>> >> >
>> >> > the source directories are:
>> >> >
>> >> > MODULE_NAME/src/... and
>> >> > MODULE_NAME/gensrc/...
>> >> >
>> >> > Shouldn't ** mean zero or more directories?
>> >> >
>> >> > Irritated,
>> >> > Daniel Warzecha
>> >> >
>> >> > 2012/6/27 Ann Campbell <[hidden email]>:
>> >> >> Is the gensrc directory located next to the src directory? Or within
>> >> >> it? I'm
>> >> >> wondering if that leading "**/" isn't throwing it off...
>> >> >>
>> >> >>
>> >> >> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha
>> >> >> <[hidden email]>
>> >> >> wrote:
>> >> >>>
>> >> >>> Hello,
>> >> >>>
>> >> >>> I'm using a Jenkins/Sonar combo. We have a multi-module project
>> >> >>> being
>> >> >>> analyzed by Sonar.
>> >> >>>
>> >> >>> The problem: some source folders of some modules are either
>> >> >>> generated
>> >> >>> or external sources that we do not want to be analyzed.
>> >> >>>
>> >> >>> At the moment, I've set Sonar
>> >> >>> Site->Project->Configuration->Exclusions
>> >> >>> to exclude the sources.
>> >> >>> As an example, I want to exclude all java files in the path
>> >> >>> containing
>> >> >>> a gensrc folder.
>> >> >>> My exclusion filter is
>> >> >>> **/gensrc/**/*.java
>> >> >>>
>> >> >>> Is this correct? It doesn't seem to work, as all Findbugs and
>> >> >>> Checkstyle warnings are still present in the analysis.
>> >> >>>
>> >> >>> I also generate a JaCoCo report in Jenkins which I then use in
>> >> >>> Sonar.
>> >> >>> I excluded the same paths by using the
>> >> >>>
>> >> >>> <groupId>org.jacoco</groupId>
>> >> >>> <artifactId>jacoco-maven-plugin</artifactId>
>> >> >>> <version>${jacoco-maven-version}</version>
>> >> >>> <configuration>
>> >> >>>
>> >> >>>  <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>> >> >>>                <excludes>
>> >> >>>                        <exclude>**/gensrc/**/*.java</exclude>
>> >> >>>                        <exclude>**/extsrc/**/*.java</exclude>
>> >> >>>                        <exclude>**/extsource/**/*.java</exclude>
>> >> >>>                        <exclude>**/*Test.*</exclude>
>> >> >>>                </excludes>
>> >> >>>  </configuration>
>> >> >>>
>> >> >>> This also doesn't seem to work.
>> >> >>>
>> >> >>> Any ideas regarding these two problems?
>> >> >>>
>> >> >>> Thanks in advance,
>> >> >>> Daniel Warzecha
>> >> >>>
>> >> >>>
>> >> >>> ---------------------------------------------------------------------
>> >> >>> To unsubscribe from this list, please visit:
>> >> >>>
>> >> >>>    http://xircles.codehaus.org/manage_email
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> G. Ann Campbell
>> >> >> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
>> >> >> Shaw Industries Inc,
>> >> >> 201 S. Hamilton St.
>> >> >> Dalton Ga 30720
>> >> >>
>> >> >>
>> >> >> **********************************************************
>> >> >> Privileged and/or confidential information may be contained in this
>> >> >> message.
>> >> >> If you are not the addressee indicated in this message (or are not
>> >> >> responsible for delivery of this message to that person) , you may
>> >> >> not
>> >> >> copy
>> >> >> or deliver this message to anyone. In such case, you should destroy
>> >> >> this
>> >> >> message and notify the sender by reply e-mail.
>> >> >> If you or your employer do not consent to Internet e-mail for
>> >> >> messages
>> >> >> of
>> >> >> this kind, please advise the sender.
>> >> >> Shaw Industries does not provide or endorse any opinions,
>> >> >> conclusions
>> >> >> or
>> >> >> other information in this message that do not relate to the official
>> >> >> business of the company  or its subsidiaries.
>> >> >> **********************************************************
>> >> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe from this list, please visit:
>> >>
>> >>    http://xircles.codehaus.org/manage_email
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Excluding directories from Sonar Analysis doesn't seem to work

Daniel Warzecha
Hello,

well, I added a vote and a comment to this issue:

http://jira.codehaus.org/browse/SONAR-2760

which seems like it proposes what I would need...

Best regards,
Daniel Warzecha

2012/6/28 Daniel Warzecha <[hidden email]>:

> Hello,
>
> so it is not possible to just exclude the second source root folder
> without changing the structure of my modules/projects?
> Then I should make a feature request, it seems...
>
> Kind Regards,
> Daniel Warzecha
>
> 2012/6/28 Papapetrou P.Patroklos <[hidden email]>:
>> Hi Daniel
>>
>> You can move the whole root to a different module / project...
>> Or you can move this "root" to a new package and then exclude it :)
>> Regards
>> Patroklos
>> Master Sonar with Sonar in Action book by Manning Publications
>>
>>
>> 2012/6/28 Daniel Warzecha <[hidden email]>
>>>
>>> Hello,
>>>
>>> thank you for clarifying this. So... how can I exclude whole root
>>> source directories from analysis?
>>>
>>> Thanks in advance,
>>> Daniel Warzecha
>>>
>>> 2012/6/27 Freddy Mallet <[hidden email]>:
>>> > Hi Daniel,
>>> >
>>> > What Evgeny said is that the exclusion pattern ONLY works at package
>>> > level.
>>> > So as the "gensrc" is a root source directory but is not part of the
>>> > java
>>> > packages, this can't work.
>>> >
>>> > Kind regards,
>>> > freddy
>>> > -----
>>> > twitter.com/FreddyMallet
>>> > Sonar for Continuous Inspection
>>> >
>>> >
>>> >
>>> > On Wed, Jun 27, 2012 at 4:55 PM, Daniel Warzecha
>>> > <[hidden email]>
>>> > wrote:
>>> >>
>>> >> Hello again,
>>> >>
>>> >> I added another pattern, extsource, to the exclusion filters. Without
>>> >> it, Jenkins/Sonar's output is:
>>> >>
>>> >> [INFO] [04:21:04.014] Initializer FindbugsMavenInitializer...
>>> >> [INFO] [04:21:04.014] Initializer FindbugsMavenInitializer done: 0 ms
>>> >> [INFO] [04:21:04.014] Initializer ProjectFileSystemLogger...
>>> >> [INFO] [04:21:04.014] Excluded sources: [**/gensrc/**/*.java,
>>> >> **/extsrc/**/*.java]
>>> >> [INFO] [04:21:04.014] Source directories:
>>> >> [INFO] [04:21:04.015]
>>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
>>> >> [INFO] [04:21:04.015]
>>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
>>> >> [INFO] [04:21:04.015] Initializer ProjectFileSystemLogger done: 1 ms
>>> >> [INFO] [04:21:04.015] Initializer MavenInitializer...
>>> >>
>>> >> With extsource as exclusion filter, the
>>> >>
>>> >> [INFO] [04:21:04.015]
>>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/extsource
>>> >>
>>> >> line is removed. So that is that. But the analysis still shows
>>> >> violations from inside the extsource folder.
>>> >> Also, the gensrc exclusion doesn't seem to work at all, as another
>>> >> part of the output shows...
>>> >>
>>> >> [INFO] [16:00:36.541] Initializer FindbugsMavenInitializer...
>>> >> [INFO] [16:00:36.541] Initializer FindbugsMavenInitializer done: 0 ms
>>> >> [INFO] [16:00:36.541] Initializer ProjectFileSystemLogger...
>>> >> [INFO] [16:00:36.541] Excluded sources: [**/gensrc/**/*.java,
>>> >> **/extsrc/**/*.java, **/extsource/**/*.java]
>>> >> [INFO] [16:00:36.542] Source directories:
>>> >> [INFO] [16:00:36.542]
>>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/gensrc
>>> >> [INFO] [16:00:36.542]
>>> >> /var/lib/jenkins/jobs/SomeJob/workspace/plugins/the.module/src
>>> >> [INFO] [16:00:36.542] Initializer ProjectFileSystemLogger done: 1 ms
>>> >> [INFO] [16:00:36.542] Initializer MavenInitializer...
>>> >>
>>> >> When I change the exclusions to **/gensrc/** etc., the output doesn't
>>> >> change (except for the excluded sources line, of course)...
>>> >>
>>> >> Totally irritated,
>>> >> Daniel Warzecha
>>> >>
>>> >> 2012/6/27 Daniel Warzecha <[hidden email]>:
>>> >> > Hello,
>>> >> >
>>> >> > the source directories are:
>>> >> >
>>> >> > MODULE_NAME/src/... and
>>> >> > MODULE_NAME/gensrc/...
>>> >> >
>>> >> > Shouldn't ** mean zero or more directories?
>>> >> >
>>> >> > Irritated,
>>> >> > Daniel Warzecha
>>> >> >
>>> >> > 2012/6/27 Ann Campbell <[hidden email]>:
>>> >> >> Is the gensrc directory located next to the src directory? Or within
>>> >> >> it? I'm
>>> >> >> wondering if that leading "**/" isn't throwing it off...
>>> >> >>
>>> >> >>
>>> >> >> On Wed, Jun 27, 2012 at 10:27 AM, Daniel Warzecha
>>> >> >> <[hidden email]>
>>> >> >> wrote:
>>> >> >>>
>>> >> >>> Hello,
>>> >> >>>
>>> >> >>> I'm using a Jenkins/Sonar combo. We have a multi-module project
>>> >> >>> being
>>> >> >>> analyzed by Sonar.
>>> >> >>>
>>> >> >>> The problem: some source folders of some modules are either
>>> >> >>> generated
>>> >> >>> or external sources that we do not want to be analyzed.
>>> >> >>>
>>> >> >>> At the moment, I've set Sonar
>>> >> >>> Site->Project->Configuration->Exclusions
>>> >> >>> to exclude the sources.
>>> >> >>> As an example, I want to exclude all java files in the path
>>> >> >>> containing
>>> >> >>> a gensrc folder.
>>> >> >>> My exclusion filter is
>>> >> >>> **/gensrc/**/*.java
>>> >> >>>
>>> >> >>> Is this correct? It doesn't seem to work, as all Findbugs and
>>> >> >>> Checkstyle warnings are still present in the analysis.
>>> >> >>>
>>> >> >>> I also generate a JaCoCo report in Jenkins which I then use in
>>> >> >>> Sonar.
>>> >> >>> I excluded the same paths by using the
>>> >> >>>
>>> >> >>> <groupId>org.jacoco</groupId>
>>> >> >>> <artifactId>jacoco-maven-plugin</artifactId>
>>> >> >>> <version>${jacoco-maven-version}</version>
>>> >> >>> <configuration>
>>> >> >>>
>>> >> >>>  <destFile>${project.basedir}/../../target/jacoco.exec</destFile>
>>> >> >>>                <excludes>
>>> >> >>>                        <exclude>**/gensrc/**/*.java</exclude>
>>> >> >>>                        <exclude>**/extsrc/**/*.java</exclude>
>>> >> >>>                        <exclude>**/extsource/**/*.java</exclude>
>>> >> >>>                        <exclude>**/*Test.*</exclude>
>>> >> >>>                </excludes>
>>> >> >>>  </configuration>
>>> >> >>>
>>> >> >>> This also doesn't seem to work.
>>> >> >>>
>>> >> >>> Any ideas regarding these two problems?
>>> >> >>>
>>> >> >>> Thanks in advance,
>>> >> >>> Daniel Warzecha
>>> >> >>>
>>> >> >>>
>>> >> >>> ---------------------------------------------------------------------
>>> >> >>> To unsubscribe from this list, please visit:
>>> >> >>>
>>> >> >>>    http://xircles.codehaus.org/manage_email
>>> >> >>>
>>> >> >>>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> G. Ann Campbell
>>> >> >> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
>>> >> >> Shaw Industries Inc,
>>> >> >> 201 S. Hamilton St.
>>> >> >> Dalton Ga 30720
>>> >> >>
>>> >> >>
>>> >> >> **********************************************************
>>> >> >> Privileged and/or confidential information may be contained in this
>>> >> >> message.
>>> >> >> If you are not the addressee indicated in this message (or are not
>>> >> >> responsible for delivery of this message to that person) , you may
>>> >> >> not
>>> >> >> copy
>>> >> >> or deliver this message to anyone. In such case, you should destroy
>>> >> >> this
>>> >> >> message and notify the sender by reply e-mail.
>>> >> >> If you or your employer do not consent to Internet e-mail for
>>> >> >> messages
>>> >> >> of
>>> >> >> this kind, please advise the sender.
>>> >> >> Shaw Industries does not provide or endorse any opinions,
>>> >> >> conclusions
>>> >> >> or
>>> >> >> other information in this message that do not relate to the official
>>> >> >> business of the company  or its subsidiaries.
>>> >> >> **********************************************************
>>> >> >>
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe from this list, please visit:
>>> >>
>>> >>    http://xircles.codehaus.org/manage_email
>>> >>
>>> >>
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>

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

    http://xircles.codehaus.org/manage_email


Loading...