[ http://jira.codehaus.org/browse/MSUREFIRE-23?page=comments#action_57276 ] 

Gunnar Hillert commented on MSUREFIRE-23:
-----------------------------------------

Hi Jesse,

I applied the patches without major issues (although I got some really strange 
error messages first...after cleaning my local repository everything worked 
just fine...)

Anyway, I just ran a simple test and ran into a dependency issue.  After some 
digging through the issue, it seems that the testng-jdk15-4.4.7.jar is not 
complete. The older version 4.4.5 you provided had some dependencies to qdox 
and bsh that were provided within the testng jar. 4.4.7 does not contain those 
dependencies anymore.

Thus when I run my test with your 4.4.7 jar I get the following error:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

===============================================
Suite for TestNG Suite
Total tests run: 0, Failures: 0, Skips: 0
===============================================

java.lang.NoClassDefFoundError: 
com/thoughtworks/qdox/model/AbstractInheritableJavaEntity
        at 
org.testng.internal.annotations.AnnotationConfiguration.<init>(AnnotationConfiguration.java:15)
        at 
org.testng.internal.annotations.AnnotationConfiguration.<clinit>(AnnotationConfiguration.java:18)
        at org.testng.SuiteRunner.getAnnotationFinder(SuiteRunner.java:314)
        at 
org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:345)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:177)
        at org.testng.SuiteRunner.run(SuiteRunner.java:144)
        at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:576)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:539)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:236)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:128)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:345)
        at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:258)
        at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:477)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:432)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530)

        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecut
or.java:472)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleEx
ecutor.java:303)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.ja
va:270)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
RUN ABORTED
java.lang.NoClassDefFoundError
org.apache.maven.surefire.Runner
An exception or error caused a run to abort.
com/thoughtworks/qdox/model/AbstractInheritableJavaEntity

I had to add the following dependencies manually to my pom:

    <dependency>
      <groupId>qdox</groupId>
      <artifactId>qdox</artifactId>
      <version>1.5</version>
      <scope>compile</scope>
    </dependency>

     <dependency>
      <groupId>bsh</groupId>
      <artifactId>bsh</artifactId>
      <version>2.0b1</version>
      <scope>compile</scope>
    </dependency>

Afterwards everything worked fine. Thus, either testng needs to define those 
additional dependencies in its pom or they should be included into the testng 
jar file.

Hopefully, I will find some more time tomorrow to dig further into using TestNG 
with M2 - depending on how things go I can put my findings into a document, 
which might serve as a documentation skeleton :-)


> Support TestNG
> --------------
>
>          Key: MSUREFIRE-23
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-23
>      Project: Maven 2.x Surefire Plugin
>         Type: New Feature

>     Reporter: Mike Perham
>  Attachments: maven-patches.tgz, maven-surefire-plugin-patch.txt, 
> maven-surefire-report-maven-plugin-patch.txt, surefire-patch.txt, 
> surefire-patch.txt, surefire-patch.txt, surefire-patch.txt, 
> surefire-report-maven-plugin-patch.txt, testng-4.4.5-jdk14.jar, 
> testng-4.4.5-jdk15.jar
>
>
> Add support for running unit tests with TestNG.
> http://www.testng.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to