You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jon SlinnHawkins (JIRA)" <ji...@codehaus.org> on 2007/07/05 10:01:13 UTC

[jira] Commented: (SUREFIRE-340) Resource classpaths differ if project has flat structure, causing MappingExceptions and more.

    [ http://jira.codehaus.org/browse/SUREFIRE-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101293 ] 

Jon SlinnHawkins commented on SUREFIRE-340:
-------------------------------------------

I am also seeing this issue manifest itself slightly differently.  

When running surefire tests against code that uses Spring to parse the ApplicationContext.xml, the classloader being used cannot locate the Spring jar (even tho' the code trying to locate a spring class is within the spring jar itself).  Debugging shows that all the jars are infact on the test classpath, but spring must be grabbing a different classloader to create the beans, which cannot see any of the test Artifacts / classpath.

Is there any update on this issue ?


> Resource classpaths differ if project has flat structure, causing MappingExceptions and more.
> ---------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-340
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-340
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>         Environment: Maven 2.0.6,
> IBM 1.4.2 JDK on RHEL 4 on an HP Itanium, and also Apple 1.5.0 on Mac OSX
>            Reporter: Barrett Nuzum
>         Attachments: surefire-bug-testcases.tar.gz
>
>
> We have heavy dependence on Spring and Hibernate.
> We maintain a flat project structure as this is a great deal easier to manage in an IDE.
> We have tests that pass if you build them from a leaf-level application.
> If run from the parent project, as a multimodule build, the tests fail.
> Root
>    \- Parent Build
>    \- Child1 Build
> The exact same project can pass a multimodule build if the project structure is nested.
> Root
>   \- Parent Build
>        \- Child1 Build
> Both scenarios are included in the attached file.
> The child builds correctly under both scenarios if you cd directly to it's directory and run install or test.
> Both builds display an appropriate classpath if run with -X, but the flat structure cannot find the resource.
> I believe this to be an incompatibility with Spring and it's methods for getting a ResourceLoader.
> All permutations and combinations of:
> <useSystemClassLoader>, <childDelegation> and  <forkMode>
> also have no effect.

-- 
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