You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matt Benson <gu...@gmail.com> on 2010/09/11 20:30:21 UTC
Surefire + JUnit 4.7+
Hello,
I am working on a multi-module project that uses JUnit 3 tests. I updated the parent POM to v2.6 of the surefire plugin and JUnit 4.8.1 and three classes fitting the pattern Test* that are not JUnit tests were picked up and now report errors initializing tests. Googling brought me to http://jira.codehaus.org/browse/SUREFIRE-482 in which Kristian states that adding parallel configuration information to the surefire plugin's declaration should force the junit47 provider and this will not happen. My parent pom now contains the plugin configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<parallel>classes</parallel>
</configuration>
</plugin>
For good measure, I also updated the surefire-report plugin to v2.6. The module pom with the failures contains not one occurrence of the string 'sure', so *I* feel quite sure the parent plugin configuration is not being overridden. Unfortunately, with a 'clean install' from my parent directory I still get the same failures in the child module. I am perfectly fine with using the parallel configuration option to force the use of the junit47 provider; less so with annotating any class named Test* with @Ignore (though this does solve the problem). I do note that the changelog for JUnit 4.8.2 says:
TestSuite(MyTestCase.class) should dynamically detect if MyTestCase is a TestCase
From this it strikes me that it would be nice to upgrade to junit 4.8.2, but I'd like to stick to artifacts in the central repo. I guess this means my questions are:
1. Do the experts agree that 4.8.2 is likely to (or has already been confirmed to) solve my problem?
2. Does anyone have any clue why JUnit 4.8.2 has never made it into the central repo? The easy answer is that they never put in an upload request; however, I don't see any JUnit upload requests since the one for 4.7 and that one apparently didn't even come from a JUnit developer. What gives?
Thanks,
Matt
Re: Surefire + JUnit 4.7+
Posted by Wayne Fay <wa...@gmail.com>.
> That's all well and good, and I take your point. But I'm still quite curious to
> know what mechanism has allowed the other artifacts into the central repo
> if the junit team themselves haven't been pushing for it.
http://maven.apache.org/guides/mini/guide-central-repository-upload.html
Also see
http://jira.codehaus.org/browse/MAVENUPLOAD-1651
http://jira.codehaus.org/browse/MAVENUPLOAD-1450
and more that you can find yourself...
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Surefire + JUnit 4.7+
Posted by Matt Benson <gu...@gmail.com>.
On Sep 11, 2010, at 3:18 PM, Wayne Fay wrote:
>> From this it strikes me that it would be nice to upgrade to junit 4.8.2, but
>> I'd like to stick to artifacts in the central repo. I guess this means my
>> questions are:
>
> Neither question is particularly relevant to Maven -- I assume the
> JUnit folks can/should be able to answer them both. But if they don't
> use or care about Maven, then they won't include "deploy artifacts to
> Central" as part of their "push a new release" process, right?
That's all well and good, and I take your point. But I'm still quite curious to know what mechanism has allowed the other artifacts into the central repo if the junit team themselves haven't been pushing for it.
-Matt
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Surefire + JUnit 4.7+
Posted by Wayne Fay <wa...@gmail.com>.
> From this it strikes me that it would be nice to upgrade to junit 4.8.2, but
> I'd like to stick to artifacts in the central repo. I guess this means my
> questions are:
Neither question is particularly relevant to Maven -- I assume the
JUnit folks can/should be able to answer them both. But if they don't
use or care about Maven, then they won't include "deploy artifacts to
Central" as part of their "push a new release" process, right?
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org