You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jim Hurne (JIRA)" <ji...@codehaus.org> on 2013/04/15 15:31:52 UTC

[jira] (SUREFIRE-988) ClassNotFoundException when excluding a JUnit category that is defined by a static inner class or a static inner interface

Jim Hurne created SUREFIRE-988:
----------------------------------

             Summary: ClassNotFoundException when excluding a JUnit category that is defined by a static inner class or a static inner interface
                 Key: SUREFIRE-988
                 URL: https://jira.codehaus.org/browse/SUREFIRE-988
             Project: Maven Surefire
          Issue Type: Bug
    Affects Versions: 2.14.1
            Reporter: Jim Hurne
            Priority: Minor


The maven-surefire-plugin will fail with a ClassNotFoundException if you configure the plugin to exclude a JUnit category which is defined as an inner class or interface.

For example, if I define the following "category":

   package org.example
   public class Categories {
      public static interface ExcludeMe {}
   }

And then I configure the Surefire plugin to exclude the inner class category:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.14.1</version>
        <configuration>
          <excludeGroups>org.example.Categories.ExcludeMe</excludeGroups>
        </configuration>
      </plugin>

Then the Surefire plugin will fail with a ClassNotFoundException.   If I move ExcludeMe out of the Categories class, then all is well.
 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira