I'm attempting to finish up a patch that'll add a RegexUrlNormalizer class. When it runs it reads a configuration file from the conf/ directory much like the RegexURLFilter class does. I would like to have a specific configuration file that will be read in by the unit test. Where should I put this test configuration file? Should there be an special conf/ directory for all tests that would have higher priority over anything in the usual conf/ directory? If yes, where should this directory be and would it just be a matter of changing the main build.xml?
I'd put it in the same directory as your source test code, e.g., as
src/test/net/nutch/net/url-norm-tests.txt
then, in the "test-core" task of build.xml, define a system property named "test.src.dir":
<sysproperty key="test.src.dir" value="${test.src.dir}"/>and you can access it with something like:
String testSrcDir = System.getProperty("test.src.dir");
String path = testSrcDir + "/net/nutch/net/url-norm-tests.txt";
FileReader reader = new FileReader(path);Does that work for you?
Doug
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Nutch-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nutch-developers
