[ 
https://jira.codehaus.org/browse/SUREFIRE-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=340567#comment-340567
 ] 

Andreas Höhmann commented on SUREFIRE-463:
------------------------------------------

I'm using 2.16. and this bug is back :-)

mvn help:effective-pom ...

   <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.16</version>
        <executions>
          <execution>
            <id>default-test</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <forkCount>2.5C</forkCount>
              <reuseForks>true</reuseForks>
              <parallel>none</parallel>
              <testFailureIgnore>false</testFailureIgnore>
              <redirectTestOutputToFile>true</redirectTestOutputToFile>
              <excludes>
                <exclude>**/Abstract*Test.java</exclude>
                <exclude>**/Abstract*TestCase.java</exclude>
              </excludes>
              <suiteXmlFiles>
                
<suiteXmlFile>D:\DEV\ws_hscm\hscm-vaadin-webapp/src/test/resources/Testsuite.xml</suiteXmlFile>
              </suiteXmlFiles>
              <excludedGroups combine.self="override" />
              <printSummary>true</printSummary>
            </configuration>
          </execution>
        </executions>
 ...

> ClassCastException when using testng suiteXmlFile and forkMode=always
> ---------------------------------------------------------------------
>
>                 Key: SUREFIRE-463
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-463
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>         Environment: linux 2.6.22-1-mepis-smp
>            Reporter: Andreas Andreou
>             Fix For: 2.4.3
>
>         Attachments: SUREFIRE-463__handle_TestNG_xmlTestSuites.patch, 
> surefire-bug.zip
>
>
> The related pom part is:
>         <profile>
>             <id>browser</id>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-surefire-plugin</artifactId>
>                         <configuration>
>                             <suiteXmlFiles>
>                                 
> <suiteXmlFile>src/test/resources/testng-browser.xml</suiteXmlFile>
>                             </suiteXmlFiles>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
> Issuing mvn -Pbrowser test results in the exception:
> java.lang.ClassCastException: java.io.File cannot be cast to java.lang.String
>         at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesForkPerTestSet(SurefireBooter.java:403)
>         at 
> org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java:249)
>         at 
> org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:492)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>         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:597)
>         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)
> Any workarounds for this?



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to