You mean JUnit 4? Annotations are brand new with JUnit 4, and if it is not
yet supported, neither will be annotations.

Eric

On 6/15/06, gilles_gty <[EMAIL PROTECTED]> wrote:


Hi there.

I am rather new with Maven 2. No Ant neither Maven 1 background.

Did any one got this annotation stuff to work ? Using Maven 2 + Java 1.5 +
Junit 1.4.
I fixed my PATH, the JAVA_HOME, also the source + target parameters. I
think
the test gets compiled with Junit 1.4 but get ran with prior version.

I observe even though I specify in my pom.xml a Junit version of 1.4, that
Maven downloads both 1.4 _and_  3.8.1 junit artifact versions. I can not
pin
point where this version or dependency or ? is defined.

Things are going rather fine : compiling, running tests ( from maven 2
cook
book examples ). Only glitch is :  annotation seams to be ignored. I built
an "expected exception" example, I am getting the excption right, but it
makes my test a failure instead of a success.

==
   @org.junit.Test(expected=NullPointerException.class)
   public void test_nullpointerexception() {
       App foo = null;
       foo.getValeur();
   }
==

I understand the Surefire JIRA issue is this one :
http://jira.codehaus.org/browse/MSUREFIRE-84
leading me to believe Junit 1.4 is not yet fully usable within Surefire ?
Any one concuring ?

Thanks for time and consideration.

Gilles
Wayne Fay wrote:
>
> Brett can probably comment more on this, as I believe he has been
> working on this (Surefire) a bit lately, but I believe the comment
> "test plugin doesn't use 4.0 (yet)" is probably along the right lines.
>
> There's probably a Maven JIRA you could find and watch so you'd know
> when JUnit 4.0 is fully integrated and functional.
>
> Wayne
>
>
> On 3/20/06, Thorsten Heit <[EMAIL PROTECTED]> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi,
>>
>> > Hello Subhash,
>> > Thanks a lot it works. You have probably more experience than me with
>> > JUnit 4 and maven. I would ask you another question. I have written
my
>> > test class as described in the cookbook (for 4.0) by Kent Beck, Erich
>> > Gamma on the JUnit web site but I have still to prefix all my testing
>> > method by the "test" keyword. Its like if the annotations were
ignored.
>> > An idea?
>>
>> Perhaps the test plugin doesn't use or know the existence of JUnit 4.0
>> and still uses 3.8.x? Just an idea, haven't testet it...
>>
>>
>> Thorsten
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.2.2 (MingW32)
>>
>> iD8DBQFEHoc8QvObkgCcDe0RAjX7AKDrghITbKicv74t9DMgrpH0Cp/+zACeKuID
>> FiT2nc06AtOiF3bjdmLO+pY=
>> =dgTh
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Maven-2-and-java-1.5-Annotations-t1307356.html#a4880333
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to