You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Torsten Curdt (JIRA)" <ji...@codehaus.org> on 2006/04/30 05:54:19 UTC

[jira] Created: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

cannot run junit testcases from within Eclipse
----------------------------------------------

         Key: MNGECLIPSE-114
         URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
     Project: Maven 2.x Extension for Eclipse
        Type: Bug

 Environment: OSX, Eclipse 3.2RC1
    Reporter: Torsten Curdt
 Assigned to: Eugene Kuleshov 


Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:

java.lang.NoClassDefFoundError: junit/framework/TestListener

The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Commented: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=comments#action_64419 ] 

Eugene Kuleshov commented on MNGECLIPSE-114:
--------------------------------------------

What can I say. You'll have to show me your eclipse projects. Try to zip them up, but make sure they are in the archive (especially .classpath and .project for all projects). I don't need stuff from within .metadata

One more thing. Open up m2 console clear it, run Project / Clean... for your java projects and check that there is no errors.
Open Type dialog (Ctrl-Shift-T) should also show junit classes from jars located in m2 repository. Which means m2 classpath container is working fine.

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Updated: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Torsten Curdt (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=all ]

Torsten Curdt updated MNGECLIPSE-114:
-------------------------------------

    Attachment: run.png

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: eclipse.png, run.png, tests.tgz, workspace.tgz
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Commented: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=comments#action_64414 ] 

Eugene Kuleshov commented on MNGECLIPSE-114:
--------------------------------------------

Ok, great. But how are you running this stuff? 
And just in case, what Eclipse version you are running? And on what JRE?

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: eclipse.png, tests.tgz, workspace.tgz
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Commented: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Torsten Curdt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=comments#action_64417 ] 

Torsten Curdt commented on MNGECLIPSE-114:
------------------------------------------

>From the command line test are running fine for me as well.

Started with a fresh launch config and this is what gets called:

/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java -classpath /Users/tcurdt/dev/jakarta/commons-jci/tests/target/classes:/Users/tcurdt/dev/jakarta/commons-jci/core/target/classes:/Users/tcurdt/.m2/repository/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:/Users/tcurdt/.m2/repository/commons-io/commons-io/1.1/commons-io-1.1.jar:/Users/tcurdt/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:/Users/tcurdt/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:/Applications/eclipse-SDK-3.2RC1/plugins/org.eclipse.jdt.junit_3.2.0.v20060412-1600/junitsupport.jar:/Applications/eclipse-SDK-3.2RC1/plugins/org.eclipse.jdt.junit.runtime_3.2.0.v20060412-1600/junitruntime.jar org.eclipse.jdt.internal.junit.runner.RemoteTestRunner -version 3 -port 59767 -testNameFile /tmp/testNames33471.txt

No junit jar! And other dependencies are missing, too! The test subproject also depends on all the compiler modules and they have dependencies to the compiler implementations. They are not in the path either.

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Closed: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Torsten Curdt (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=all ]
     
Torsten Curdt closed MNGECLIPSE-114:
------------------------------------

     Resolution: Fixed
    Fix Version: 0.0.6

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>      Fix For: 0.0.6
>  Attachments: commons-jci.tgz, eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Updated: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Torsten Curdt (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=all ]

Torsten Curdt updated MNGECLIPSE-114:
-------------------------------------

    Attachment: eclipse.png

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: eclipse.png, tests.tgz, workspace.tgz
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Commented: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=comments#action_64411 ] 

Eugene Kuleshov commented on MNGECLIPSE-114:
--------------------------------------------

Torsten, would you mind to attach your Eclipse project here (or something we can test with) and provide step by step instructions on what exactly you are doing.

PS: btw, what a small world... :-)

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov

>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Updated: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=all ]

Eugene Kuleshov updated MNGECLIPSE-114:
---------------------------------------

    Attachment:     (was: workspace.tgz)

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Updated: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Torsten Curdt (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=all ]

Torsten Curdt updated MNGECLIPSE-114:
-------------------------------------

    Attachment: tests.tgz
                workspace.tgz

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: tests.tgz, workspace.tgz
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Commented: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=comments#action_64416 ] 

Eugene Kuleshov commented on MNGECLIPSE-114:
--------------------------------------------

Apparently your attachment haven't had any code. So, I checked out project from SVN and were able to run some tests. It worked for me as a single project (starting from trunk folter) as well as several projects like in your layout. Though I am running on Windows and I had to turn offline mode off and build this stuff from command line "mvn install" in order to get poms into the local repository.

So, it is either something in your setup or OS X thing. Can you try to delete launch configuration and run that test again using "Run As... / JUnit test" menu , say, on the project node. Then do to the Debug perspective and open properties for java process. It should show you the command line used by junit runner and you should be able to see junit jars up there.

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Updated: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Torsten Curdt (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=all ]

Torsten Curdt updated MNGECLIPSE-114:
-------------------------------------

    Attachment: commons-jci.tgz

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: commons-jci.tgz, eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Updated: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=all ]

Eugene Kuleshov updated MNGECLIPSE-114:
---------------------------------------

    Attachment:     (was: tests.tgz)

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Commented: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=comments#action_64423 ] 

Eugene Kuleshov commented on MNGECLIPSE-114:
--------------------------------------------

I just pushed out 0.0.6 release. Please try with that one. One more thing, run Maven2 / Update sources. It seems your projects have some cross references, so I am not sure if it is anyhow related (also check Problems view to make sure there is no issues related to the build path).

Otherwise please ask in the mail list if somebody with OS X can try to reproduce this issue, becaue I can't reproduce it on Windows and run out of ideas.

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>  Attachments: commons-jci.tgz, eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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


[jira] Commented: (MNGECLIPSE-114) cannot run junit testcases from within Eclipse

Posted by "Torsten Curdt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-114?page=comments#action_64451 ] 

Torsten Curdt commented on MNGECLIPSE-114:
------------------------------------------

The new plugin plus the "update sources" seems to have fixed it.
Thanks heaps, mate!

> cannot run junit testcases from within Eclipse
> ----------------------------------------------
>
>          Key: MNGECLIPSE-114
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-114
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>  Environment: OSX, Eclipse 3.2RC1
>     Reporter: Torsten Curdt
>     Assignee: Eugene Kuleshov
>      Fix For: 0.0.6
>  Attachments: commons-jci.tgz, eclipse.png, run.png
>
>
> Dependencies seem to get ignored when running junit testcases from within Eclipse. I just get an exception:
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> The junit jar is listed through the maven dependencies though. When I add it by hand (add external jar) junit starts up but then I am missing my other dependencies.

-- 
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