If you intend your provider to be part of the official distribution at
some time it makes sense for your provider to have the surefire parent.
Otherwise just remove the reference to the apache parent in your
provider and use any testing tool you like.

If you intent to build in the surefire reactor you need to build the
full surefire at least once before you can build the specific providers.

>From your error message it seems like the shaded Junit3 provider is not
on the classpath on your surefire invocation. This provider is used 
for surefire to test itself and means the test-classes for your 
provider must be junit3 test-cases (but it avoids all sorts of
looking at a mirror through a mirror class loader issues) 

Kristian


fr., 26.08.2011 kl. 14.57 -0500, skrev Pickens, Brian:
> Hi there,
> 
> I am currently attempting to write a custom surefire-provider against your 
> surefire provider api. I downloaded 
> surefire-2.9/surefire-providers/surefire-junit47 from subversion to use as an 
> example. I am trying to figure out how to configure my pom file to run tests 
> against my provider. So I figured a good start would be to try running mvn 
> test against the project. However the build fails due to a missing dependency:
> 
> [INFO] --- maven-surefire-plugin:2.8:test (default-test) @ surefire-junit47 
> ---
> [WARNING] The POM for org.apache.maven.surefire:surefire-shadefire:jar:2.9 is 
> missing, no dependency information available
> 
> Googling around I found this ticket 
> http://jira.codehaus.org/browse/SUREFIRE-731 that suggested building from the 
> root surefire project. So Having switched to the root project I tried running 
> mvn test which fails with the following message, 1.8.1 does the same so I 
> assume I'm missing something:
> 
> 
> [INFO] --- maven-surefire-plugin:2.8:test (default-test) @ surefire-api ---
> [INFO] Surefire report directory: 
> /Users/bpickens/Documents/workspace/surefire-junit47/surefire-api/target/surefire-reports
> [INFO] Using configured provider 
> org.apache.maven.surefire.junit.JUnit3Provider
> [INFO] Using configured provider 
> org.apache.maven.surefire.shadefire.junit.JUnit3Provider
> org.apache.maven.surefire.util.SurefireReflectionException: 
> java.lang.InstantiationException: 
> org.apache.maven.surefire.booter.BaseProviderFactory; nested exception is 
> java.lang.InstantiationException: 
> org.apache.maven.surefire.booter.BaseProviderFactory
> java.lang.InstantiationException: 
> org.apache.maven.surefire.booter.BaseProviderFactory
>     at java.lang.Class.newInstance0(Class.java:340)
>     at java.lang.Class.newInstance(Class.java:308)
>     at 
> org.apache.maven.surefire.util.ReflectionUtils.instantiate(ReflectionUtils.java:110)...
> 
> Anyway what I really want to know is do I actually need to configure the 
> surefire plugin to run testcases for my provider, and if so what would that 
> look like?
> 
> --
> Brian Pickens
> Software Engineer, Business Systems
> Internet Broadcasting
> Headquarters
> 
> P: 651-365-4276
> AIM: [email protected]
> 
> Visit us at: www.ibsys.com <www.ibsys.com>
> 
> If you receive this transmission in error, please notify the sender by reply 
> email and delete the message and any attachment; and be advised that 
> disclosing, copying, distributing or taking any action in reliance upon the 
> content is prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to