You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marcelo Alcantara <ma...@gmail.com> on 2005/08/20 15:00:41 UTC

Resouces/Classes with the same name between main and test.

Hi,

How do I know between test/main resources, which one gets loaded first?

My practives here show that if I have two spring appContext with the
same name, one in the test and one in the main...the test one have
priority over the main one when we load it by name from the classpath.

Somebody here can answer that for sure??

Thanks in advance.

Marcelo



-- 
Marcelo Alcantara
Senior Developer/Architect
--------------------------------------------------------
maralc@gmail.com
+55 11 81968823

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Resouces/Classes with the same name between main and test.

Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I *believe* that the test classes/resources are ahead of everything else
on the test classpath, which means that they should be picked up first
on a ClassLoader.getResourceAsStream(..) for instance. At least, that
has always been the case for me.

I'd say that if it doesn't behave this way, that should be filed as a bug.

HTH,

john

Marcelo Alcantara wrote:
| Hi,
|
| How do I know between test/main resources, which one gets loaded first?
|
| My practives here show that if I have two spring appContext with the
| same name, one in the test and one in the main...the test one have
| priority over the main one when we load it by name from the classpath.
|
| Somebody here can answer that for sure??
|
| Thanks in advance.
|
| Marcelo
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDCJzuK3h2CZwO/4URArrbAJ4pndb95x1bBucYqb7bp/ZwPhUVOACeKbil
ygRf0irDihWKAmZbuSDiM6E=
=F1Ey
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org