> -----Original Message-----
> From: Dan Fabulich [mailto:
dan@...]
> Sent: 15 February 2008 22:52
> To: Maven Users List
> Subject: Re: Surefire 2.4.1 classpath order
>
> Ben Lidgey wrote:
>
> > We are running tests using Surefire 2.4.1 and Maven 2.0.8.
> [...]
>
[snip]
>
> I'm not 100% certain you're using the software you think
> you're using; here's some debugging/analysis tips.
>
Thanks for the tips. I've gone through the steps below.
Doing "mvn help:effective-pom" showed
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<childDelegation>true</childDelegation>
<systemProperties>
<property>
<name>log4j.configuration</name>
<value>log4j.xml</value>
</property>
</systemProperties>
</configuration>
</plugin>
> As a result, for at least one project here at my work, we've seen:
>
> Maven 2.0.7 + Surefire 2.3: test-classes before classes Maven
> 2.0.8 + Surefire 2.3: classes before test-classes Maven 2.0.7
> + Surefire 2.3.1 or higher: classes before test-classes Maven
> 2.0.8 + Surefire 2.3.1 or higher: test-classes before classes
And "mvn --version" shows
$ mvn --version
Maven version: 2.0.8
Java version: 1.5.0_14
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
> Finally, note that your "real" classpath is being output in
> your target/surefire-reports/*.xml files as the
> "surefire.test.classpath"
> property; that may be useful for debugging purposes.
The surefire-reports/*.xm files showed
<property value="
C:\Documents and Settings\benl\.m2\repository\junit\junit\4.2\junit-4.2.jar;
[more jars]
c:\Development\Projects\Inuk\Inuk\ResidentialFramework\BroadbandGateway\target\classes;
c:\Development\Projects\Inuk\Inuk\ResidentialFramework\BroadbandGateway\target\test-classes;" name="surefire.test.class.path"/>
With target/classes before targe/test-classes.
So, to summarise:
Maven 2.0.8, Surefire 2.4.1, target/classes before target/test-classes
This is reinforced as the test is failing because the src/main/resources properties file does not have an entry whereas the src/test/resources properties file does, and the test fails as it cannot find that entry (therefore is looking at the one from src/main/resources).
Ben
This e-mail is confidential and intended solely for the use of the individual(s) to whom it is addressed. Any views or opinions expressed are those of the author. If you are not the intended recipient, please be advised that any use, dissemination, printing or copying of this email is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail:
users-unsubscribe@...
For additional commands, e-mail:
users-help@...