fit-maven-plugin ClassLoader problems, doesn't find resources on the classpath
when using Spring for instance
-------------------------------------------------------------------------------------------------------------
Key: MOJO-1467
URL: http://jira.codehaus.org/browse/MOJO-1467
Project: Mojo
Issue Type: Bug
Environment: fit-maven-plugin-2.0-beta-3
spring 2.0
Reporter: Michel Verbist
Attachments: patch.txt
I have a Fixture that needs to create a Spring ApplicationContext, e.g.
ApplicationContext context = new
ClassPathXmlApplicationContext(configLocations);
Spring internally uses
org.springframework.util.ClassUtils#getDefaultClassLoader() which looks at the
ContextClassLoader of the current thread to know which ClassLoader it should
use.
So, when trying to find resources like the configLocations, or .properties
files, spring fails to find them.
I solved the issue by including in the ClassLoaderFixture, upon setting the
ClassLoader, also the setting of the ContextClassLoader on the current Thread.
I included this patch as an attachment.
Feel free to use it as you wish.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email