Created: (MECLIPSE-581) Test source directories appear before Main source directories

View: New views
10 Messages — Rating Filter:   Alert me  

Created: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Test source directories appear before Main source directories
-------------------------------------------------------------

                 Key: MECLIPSE-581
                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Bug
          Components: Core : .project
    Affects Versions: 2.7
         Environment: Maven 2.0.10
            Reporter: Paul Benedict


This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
(1) the sibling projects become a dependent project, not jar dependencies
(2) src/test appears before src/main in the package explorer.

I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Updated: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated MECLIPSE-581:
-----------------------------------

    Affects Version/s:     (was: 2.7)
                       2.6

I had my team verify this issue occurs starting 2.6. Using 2.5.1 works just fine.

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Commented: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182392#action_182392 ]

John Newman commented on MECLIPSE-581:
--------------------------------------

still seeing this in 2.7, main should come before test

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Commented: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182611#action_182611 ]

Andrea Aime commented on MECLIPSE-581:
--------------------------------------

I was cooking up a patch for another issue when I noticed the block of code responsible for this:

{code}
        // NOTE: Since MNG-3118, test classes come before main classes
        boolean testBeforeMain = isMavenVersion( "[2.0.8,)" );

        if ( testBeforeMain )
        {
            directories.addAll( testDirectories );
            directories.removeAll( mainDirectories );
            directories.addAll( mainDirectories );
        }
        else
        {
            directories.addAll( mainDirectories );
            directories.addAll( testDirectories );
        }
{code}

So it would seem it's a maven wide change.  I too find having the test directories first very annoying, it should be possible to have an option to get back the old order. It could simply be <testBeforeMain>false</testBeforeMain> in the eclipse configuration. Not hard to make a patch for this too, provided the plugin developers are interested in merging it. I can cook up a patch if the devs provide directions on how they would like the option to be exposed.

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Commented: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182617#action_182617 ]

Paul Benedict commented on MECLIPSE-581:
----------------------------------------

There is no good reason to put src/test in front of src/main for an IDE setup. It is only applicable for running tests (mvn test) so test classes can replace main classes.

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Commented: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182723#action_182723 ]

Andrea Aime commented on MECLIPSE-581:
--------------------------------------

It actually does, building projects with the eclipse plugin < 2.6 does not create problems.

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Commented: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183179#action_183179 ]

Oleksandr Maksymchuk commented on MECLIPSE-581:
-----------------------------------------------

I use test before main feature in my project to be able to override log4j.xml in development to show all messages or any other configuration which I can do in test classpath. So please maintain both possibilities with option.

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Commented: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183189#action_183189 ]

Arnaud Heritier commented on MECLIPSE-581:
------------------------------------------

Paul aren't you launching your tests in eclipse ? Don't you want to have the same behavior in Eclipse and in Maven ?
I'll perhaps be the evil advocate but I think if there's an issue to open it's not in our plugin which tries to have a coherent behavior between maven and eclipse but in eclipse. You can ask them to be able to manage several classpath or just to be able to have a different order in the UI and in the project's classpath.
WDYT ?

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Commented: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183267#action_183267 ]

Paul Benedict commented on MECLIPSE-581:
----------------------------------------

Arnaud, your point is solid. I concede this is not a bug.... However, this is a PRETTY BIG CHANGE opinion and nowhere does the site documentation call this out.

Perhaps I wouldn't be so alarmed by this new feature if #1 (as stated above) didn't come with it:
(1) the sibling projects become a dependent project, not jar dependencies

Seriously, no one on my team can upgrade to 2.6 because of this. We do not want sibling projects to be dependent projects. Is this another documentation deficit?

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Issue Comment Edited: (MECLIPSE-581) Test source directories appear before Main source directories

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MECLIPSE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183267#action_183267 ]

Paul Benedict edited comment on MECLIPSE-581 at 7/10/09 11:07 PM:
------------------------------------------------------------------

Arnaud, your point is solid. I concede this is not a bug.... However, this is a PRETTY BIG CHANGE and nowhere does the site documentation call this out.

Perhaps I wouldn't be so alarmed by this new feature if #1 (as stated above) didn't come with it:
(1) the sibling projects become a dependent project, not jar dependencies

Seriously, no one on my team can upgrade to 2.6 because of this. We do not want sibling projects to be dependent projects. Is this another documentation deficit?

      was (Author: paul4christ79):
    Arnaud, your point is solid. I concede this is not a bug.... However, this is a PRETTY BIG CHANGE opinion and nowhere does the site documentation call this out.

Perhaps I wouldn't be so alarmed by this new feature if #1 (as stated above) didn't come with it:
(1) the sibling projects become a dependent project, not jar dependencies

Seriously, no one on my team can upgrade to 2.6 because of this. We do not want sibling projects to be dependent projects. Is this another documentation deficit?
 

> Test source directories appear before Main source directories
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-581
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-581
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project
>    Affects Versions: 2.6
>         Environment: Maven 2.0.10
>            Reporter: Paul Benedict
>
> This is either a bug or a questionable feature. When I run eclipse:eclipse on a project that has siblings in its parent POM, two things happen:
> (1) the sibling projects become a dependent project, not jar dependencies
> (2) src/test appears before src/main in the package explorer.
> I can handle #1, but #2 really is a tough adjustment.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira