You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrea Aime <aa...@libero.it> on 2003/05/01 23:45:56 UTC
Junit, Maven and getResource
One common JUnit pattern when dealing with test files is to
load them from the classpath using the Class.getResource() pattern
(as adviced in may JUnit tutorials and articles, so that the code does
not rely on hard coded paths)
Now, in geotools we have the following project structure:
/module/test/unit/org/geotools/...
/module/test/unit/testData
and in the main project file you can find:
<unitTestSourceDirectory>tests/unit</unitTestSourceDirectory>
now, test run, but trying to load test file form the testData directory
with getResource or getResourceAsStream feails.
Why?
Thanks in advance
Andrea Aime
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org