[ 
https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16292196#comment-16292196
 ] 

ASF GitHub Bot commented on SUREFIRE-1453:
------------------------------------------

GitHub user eolivelli opened a pull request:

    https://github.com/apache/maven-surefire/pull/172

    [SUREFIRE-1453] Allow to specify non existant classes as groups

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/eolivelli/maven-surefire 
fix/SUREFIRE-1453-non-existant-groups

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven-surefire/pull/172.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #172
    
----
commit baec67bda5eec634682fa4f864d4a79c8fbf311f
Author: Enrico Olivelli <[email protected]>
Date:   2017-12-15T07:53:27Z

    SUREFIRE-1453 Allow to specify non existant classes as groups

----


> Allow to specify non existant classes as "groups"
> -------------------------------------------------
>
>                 Key: SUREFIRE-1453
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1453
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: classloading, Junit 4.x support, Maven Surefire Plugin
>    Affects Versions: 2.19.1
>            Reporter: Enrico Olivelli
>            Assignee: Tibor Digana
>            Priority: Critical
>
> In a reactor project I would like to run only a subset of JUnit (4.12) tests 
> tagged with @Category
> But the class which defines the category is not present in the dependency 
> tree of every module.
> I get this error.
> I would like to simply skip these modules, maybe in conjunction with the 
> failIfNoTest=false option
> {code:java}
> rg.apache.maven.surefire.util.SurefireReflectionException: 
> java.lang.reflect.InvocationTargetException; nested exception is 
> java.lang.reflect.InvocationTargetException: null
> java.lang.reflect.InvocationTargetException
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
>       at 
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
>       at 
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> Caused by: java.lang.RuntimeException: Unable to load category: 
> magnews.testgroups.MinimumAcceptance
>       at 
> org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:134)
>       at 
> org.apache.maven.surefire.common.junit48.FilterFactory.createGroupFilter(FilterFactory.java:92)
>       at 
> org.apache.maven.surefire.junitcore.JUnitCoreProvider.createJUnit48Filter(JUnitCoreProvider.java:183)
>       at 
> org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:115)
>       ... 9 more
> Caused by: java.lang.ClassNotFoundException: 
> magnews.testgroups.MinimumAcceptance
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>       at 
> org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:130)
>       ... 12 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to