Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Problem loading resources from classpath in tests

tycho surefire uses a classloader which delegates to the test bundle for loading classes and resources, see [1].
We would need a sample project that demonstrates the problem to tell what's going on here.

Regards
Jan

[1] https://github.com/sonatype/sonatype-tycho/blob/tycho-0.13.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java#L117 

-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Aaron Digulla
Sent: Donnerstag, 15. März 2012 12:35
To: Tycho user list
Subject: [tycho-user] Problem loading resources from classpath in tests

Hello,

I have a test case which needs the resource  
"classpath:/com/pany/eclipse/i18n_dsl/tests/Application.i18n"

In the code in  
org.eclipse.xtext.resource.ClassloaderClasspathUriResolver, this is  
truncated to "com/pany/eclipse/i18n_dsl/tests/Application.i18n" and  
then passed off to the OSGi classloader. I verified that  
target/classes/com/pany/eclipse/i18n_dsl/tests/Application.i18n exists.

The tests pass when run from inside Eclipse.

Why can't Tycho Surefire 0.13.0 load the resource?

Regards,

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/                   http://blog.pdark.de/
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top