You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by "Henning P. Schmiedehausen" <hp...@intermeta.de> on 2002/07/01 17:19:54 UTC

Fulcrum: Fork the Junit tests

Hi,

it took me quite a while to find out why sometimes my JUnit tests fail
with strange loader violation errors.

After reading various articles in the ant and junit mailing lists, this
fixes all my problems forever:

--- jakarta-turbine-fulcrum/project.properties  Fri May 31 20:20:22 2002
+++ ../fulcrum/project.properties       Fri Jun 21 11:54:46 2002
@@ -4,6 +4,10 @@
 maven.delegatorBuildFile = build.xml
 maven.prepareSourceDirectory = target/src
 maven.prepareSourceTarget = om
+#
+# Without this, tests may fail with "loader constraints violated"
+#
+maven.junit.fork = true


Is there any objection to make this the default by putting it into the
fulcrum CVS?

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fulcrum: Fork the Junit tests

Posted by Henning Schmiedehausen <hp...@intermeta.de>.
On Tue, 2002-07-02 at 05:32, Peter Lynch wrote:
> Sorry you had to go through all that. Perhaps it is a sign we have our answers
> in the wrong places.
> 
> http://jakarta.apache.org/turbine/maven/ref/faq.html#unit-test-14

=:-) I did consider this more an ant / junit problem so looking at the
maven docs wasn't really intuitive to me. Would have saved me some time.

I was using google with "ant junit loader constraint violation" and
looking at the answers. Actually I didn't even consider looking at the
Maven / Turbine F.A.Q.'s (I'm still used to the level of documentation
that came with Turbine-2 in the beginning, so it came as a small
surprise to see that Maven has really decent and extensive
documentation. Really really good job, folks!


> Were you using jdk 1.4? Probably, which means as soon as you change forking to
> true in cvs, jdk users < 1.4 could have problems.

No. JDK 1.3.1_02:

% rpm -qa | grep jdk
jdk-1.3.1_02-fcs

Directly from Sun on RedHat Linux 6.2

	Regards
		Henning

 
-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fulcrum: Fork the Junit tests

Posted by Peter Lynch <pe...@mindspring.com>.
Sorry you had to go through all that. Perhaps it is a sign we have our answers
in the wrong places.

http://jakarta.apache.org/turbine/maven/ref/faq.html#unit-test-14

Were you using jdk 1.4? Probably, which means as soon as you change forking to
true in cvs, jdk users < 1.4 could have problems.

-Peter


----- Original Message -----
From: "Henning P. Schmiedehausen" <hp...@intermeta.de>
Newsgroups: hometree.jakarta.turbine.dev
To: <tu...@jakarta.apache.org>
Sent: Monday, July 01, 2002 8:19 AM
Subject: Fulcrum: Fork the Junit tests


> Hi,
>
> it took me quite a while to find out why sometimes my JUnit tests fail
> with strange loader violation errors.
>
> After reading various articles in the ant and junit mailing lists, this
> fixes all my problems forever:
>
> --- jakarta-turbine-fulcrum/project.properties  Fri May 31 20:20:22 2002
> +++ ../fulcrum/project.properties       Fri Jun 21 11:54:46 2002
> @@ -4,6 +4,10 @@
>  maven.delegatorBuildFile = build.xml
>  maven.prepareSourceDirectory = target/src
>  maven.prepareSourceTarget = om
> +#
> +# Without this, tests may fail with "loader constraints violated"
> +#
> +maven.junit.fork = true
>
>
> Is there any objection to make this the default by putting it into the
> fulcrum CVS?
>
> Regards
> Henning
>
> --
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
> INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de
>
> Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
> D-91054 Buckenhof     Fax.: 09131 / 50654-20
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>