when resources are not in the classpath...

1 view
Skip to first unread message

Robert Dale

unread,
Oct 8, 2008, 8:18:33 AM10/8/08
to q4e-...@googlegroups.com
A long time ago in a build far, far away, resources used to be in the
eclipse classpath. Then it was decided that maven should be
responsible for filtering and such. Now the problem I'm having is
when I want to run a junit test and needs something in from resources,
it can't find it. How can I get this to work? And don't say execute
maven goal test (which does work), I want to use the fancy junit test
runner and also to be able to run a single test, not a class.

Thanks,

--
Robert Dale

chris alme

unread,
Oct 8, 2008, 8:22:50 AM10/8/08
to q4e-...@googlegroups.com
I had the same issue, pulled my hair out for a bit. You need to make sure your resources are in your class path. Then make sure the value for "Excluded" is "none".

For some insane reason it excludes "**" by default.

-Chris

Abel Muiño Vizcaino

unread,
Oct 8, 2008, 1:49:09 PM10/8/08
to q4e-...@googlegroups.com
When I create a new project from scratch (simple java project), it works perfectly. Check the attached project.

resources-in-test-classpath.zip
Reply all
Reply to author
Forward
0 new messages