[
http://jira.codehaus.org/browse/MFIT-18?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte moved MOJO-1467 to MFIT-18:
------------------------------------------
Complexity: (was: Intermediate)
Key: MFIT-18 (was: MOJO-1467)
Project: Maven 2.x FIT Plugin (was: Mojo)
> fit-maven-plugin ClassLoader problems, doesn't find resources on the
> classpath when using Spring for instance
> -------------------------------------------------------------------------------------------------------------
>
> Key: MFIT-18
> URL: http://jira.codehaus.org/browse/MFIT-18
> Project: Maven 2.x FIT Plugin
> 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