[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325260#comment-16325260 ] Hudson commented on SUREFIRE-1453: -- ABORTED: Integrated in Jenkins build maven-surefire-dev #103 (See [https://builds.apache.org/job/maven-surefire-dev/103/]) [SUREFIRE-1453] Allow to specify non existant classes as groups (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=9826145dfea0e23894e2df48f64dd20a5d465c85]) * (edit) surefire-grouper/src/test/java/org/apache/maven/surefire/group/match/SingleGroupMatcherTest.java * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit48TestCategoriesIT.java * (edit) surefire-grouper/src/main/java/org/apache/maven/surefire/group/match/SingleGroupMatcher.java > 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.7+ (parallel) support, Junit 4.x > support, Maven Failsafe Plugin, Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Enrico Olivelli >Assignee: Tibor Digana >Priority: Critical > Fix For: 2.21.0.Jigsaw > > > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296227#comment-16296227 ] ASF GitHub Bot commented on SUREFIRE-1453: -- Github user eolivelli commented on the issue: https://github.com/apache/maven-surefire/pull/172 You are welcome! > 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.7+ (parallel) support, Junit 4.x > support, Maven Failsafe Plugin, Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Enrico Olivelli >Assignee: Tibor Digana >Priority: Critical > Fix For: 2.21.0.Jigsaw > > > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296228#comment-16296228 ] ASF GitHub Bot commented on SUREFIRE-1453: -- Github user eolivelli closed the pull request at: https://github.com/apache/maven-surefire/pull/172 > 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.7+ (parallel) support, Junit 4.x > support, Maven Failsafe Plugin, Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Enrico Olivelli >Assignee: Tibor Digana >Priority: Critical > Fix For: 2.21.0.Jigsaw > > > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296083#comment-16296083 ] Hudson commented on SUREFIRE-1453: -- SUCCESS: Integrated in Jenkins build maven-surefire #1814 (See [https://builds.apache.org/job/maven-surefire/1814/]) [SUREFIRE-1453] Allow to specify non existant classes as groups (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=9826145dfea0e23894e2df48f64dd20a5d465c85]) * (edit) surefire-grouper/src/main/java/org/apache/maven/surefire/group/match/SingleGroupMatcher.java * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit48TestCategoriesIT.java * (edit) surefire-grouper/src/test/java/org/apache/maven/surefire/group/match/SingleGroupMatcherTest.java > 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.7+ (parallel) support, Junit 4.x > support, Maven Failsafe Plugin, Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Enrico Olivelli >Assignee: Tibor Digana >Priority: Critical > Fix For: 2.21.0.Jigsaw > > > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296054#comment-16296054 ] ASF GitHub Bot commented on SUREFIRE-1453: -- Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/172 @eolivelli Thx for contributing. The PR was pushed to master and now it can be closed. > 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.7+ (parallel) support, Junit 4.x > support, Maven Failsafe Plugin, Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Enrico Olivelli >Assignee: Tibor Digana >Priority: Critical > Fix For: 2.21.0.Jigsaw > > > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294817#comment-16294817 ] ASF GitHub Bot commented on SUREFIRE-1453: -- Github user eolivelli commented on the issue: https://github.com/apache/maven-surefire/pull/172 @Tibor17 I have added some IT. I found a bug in JUnit48TestCategoriesIT, actually testCategoriesABForkAlways did not call ".forkAlways()" I have added an IT test for the case of no class matching the filter. I have enhanced the testCategoriesAC in a way that it tests only using Simple Class Names and not Fully Qualified Class Names. In fact I saw that the original idea in was to let the use pass even suffixes: `if ( name.endsWith( enabled ) )` But actually could not work because the 'pattern' had to be a resolvable class name. I did changed names in parameters in JUnit48TestCategoriesIT to make them more "consistent" > 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 > Fix For: 2.21.0.Jigsaw > > > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16293513#comment-16293513 ] Tibor Digana commented on SUREFIRE-1453: Yes, you should add it. No problem, we can continue next week if you do not have your laptop now. On Fri, Dec 15, 2017 at 9:29 PM, Enrico Olivelli (JIRA)wrote: > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16293187#comment-16293187 ] Enrico Olivelli commented on SUREFIRE-1453: --- Or are you telling that I have to add an it? > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16293184#comment-16293184 ] Enrico Olivelli commented on SUREFIRE-1453: --- Sure tests are all passing, I didnt write, sorry. I have no laptop today, I will amend commit as soon as possible > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16293101#comment-16293101 ] ASF GitHub Bot commented on SUREFIRE-1453: -- Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/172 Try to name the commit with brackets: ` [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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16293100#comment-16293100 ] ASF GitHub Bot commented on SUREFIRE-1453: -- Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/172 @eolivelli Thx for your work. Try to prove it with integration test. We always have to do it if it technically can be tested. > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16292204#comment-16292204 ] Enrico Olivelli commented on SUREFIRE-1453: --- [~tibor17] patch is ready and works very well in my projects > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 OlivelliDate: 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16292165#comment-16292165 ] Enrico Olivelli commented on SUREFIRE-1453: --- I think that additional it tests are not needed. I am running all it tests now and then send the patch. [~tibor17] do you know how to log a warning message in "SingleGroupMatcher" ? There is no ConsoleLogger support > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16292093#comment-16292093 ] Enrico Olivelli commented on SUREFIRE-1453: --- I will try to send my proposal today. I will need help/suggestions about adding it tests for each provider. > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16291743#comment-16291743 ] Tibor Digana commented on SUREFIRE-1453: [~eolivelli] Would you have spare time to fix this issue and included in version {{2.21.0}}? > 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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16290921#comment-16290921 ] Tibor Digana commented on SUREFIRE-1453: [~eolivelli] No objections from my side. You can make some sanity check of every included/excluded group class in Provider's ClassLoader and filter only those which exist. After you have finished the fix, pls run the build {{mvn install -P run-its}}. I think same issue has been discussed in Jira several days or weeks ago. So one is duplicate then. > 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 >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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16290719#comment-16290719 ] Enrico Olivelli commented on SUREFIRE-1453: --- This thread is relevant to this issue: https://stackoverflow.com/questions/41065441/is-there-an-interface-in-a-third-party-library-to-use-for-junit-category > 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 >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)
[jira] [Commented] (SUREFIRE-1453) Allow to specify non existant classes as "groups"
[ https://issues.apache.org/jira/browse/SUREFIRE-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16290716#comment-16290716 ] Enrico Olivelli commented on SUREFIRE-1453: --- [~tibor17] does this sound reasonable to you ? The patch would be simple, in case of ClassNotFoundException we can assume that there is no test which matches the filter. If this approach is good to you I can start working on this, and I would like to try to make it for the next release, it will unlock some project of mine > 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 > > 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)