Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] from [sonar-user]: DuplicatedSourceException due to test folder added twice

Good morning,

Just switching over to the Tycho list as I'd like to get a statement from you guys concerning this topic.

The main problem seems to be that the Maven test folders are also added (additionally) to the normal source folders.

-
Yves

-------- Original Message --------
Subject: Re: [sonar-user] DuplicatedSourceException due to test folder added twice
Date: Wed, 11 Jan 2012 13:17:21 +0100
From: Yves Langisch <yves@xxxxxxxxxxx>
Reply-To: user@xxxxxxxxxxxxxxxxxx
To: user@xxxxxxxxxxxxxxxxxx

Hmm, not sure but I think we talk at cross purposes ;)

IMHO the build.properties for the PDE build does not distinguish between
sources and tests. There is no such concept there. Where should your
configuration go?

This issue might be more related to the Tycho build maybe. During the
build process they control what is being added as source or test
folders. Not sure.

I know that it's a best practice to separate the tests in their own
bundle but this is currently possible in our project.

-
Yves

On 11.01.2012 12:57, Freddy Mallet wrote:
Hi Yves,

But why are you adding the test directories to the source folders ?

Your configuration should be :

|# path to source directories (required)|
|sources=|src/main/java
|# path to test source directories (optional)|
|tests=|src/test/java

Am I missing something ?
Freddy

-----
twitter.com/FreddyMallet <https://twitter.com/FreddyMallet>
Sonar for Continuous Inspection



On Wed, Jan 11, 2012 at 11:40 AM, Yves Langisch <yves@xxxxxxxxxxx
<mailto:yves@xxxxxxxxxxx>> wrote:

    Hi,

    I have a RCP client which is being built with Tycho. Analyzing this
    project leads to DuplicatedSourceException in one module due to
    folders added twice (once as source directory, once as test directory):

    [INFO] [11:27:15.288] Source directories:
    [INFO] [11:27:15.288]
    D:\workspace\mypropject\__client\mypropject-client\src\__main\java
    [INFO] [11:27:15.288]
    D:\workspace\mypropject\__client\mypropject-client\src\__main\resources
    [INFO] [11:27:15.288]
    D:\workspace\mypropject\__client\mypropject-client\src\__test\java
    [INFO] [11:27:15.288]
    D:\workspace\mypropject\__client\mypropject-client\src\__test\resources
    [INFO] [11:27:15.289] Test directories:
    [INFO] [11:27:15.290]
    D:\workspace\mypropject\__client\mypropject-client\src\__test\java

    IMHO this is caused by the build.properties which looks as follows:

    ...
    source.. = src/main/java/,\
               src/main/resources/,\
               src/test/java/,\
               src/test/resources/
    ...

    In order to be able to have all sources available in this project in
    Eclipse, this is a completely fine build.properties.

    sonar.exclusions can not help in this case.

    Any thoughts?
    Yves



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

    http://xircles.codehaus.org/__manage_email
    <http://xircles.codehaus.org/manage_email>





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

   http://xircles.codehaus.org/manage_email




Back to the top