Hello. I have a utility project that contains an .xsl file that I would like to reuse in multiple projects. The .xsl file resides in the src/main/resources folder of the utility project.
I am writing a junit test case inside of a different project (there are class dependencies that do not live in the utility project that prevent me from writing the test case there), which uses the utility project as a dependency. Is it possible to gain access to the .xsl file that is inside the utility project from the junit test case so that I can run the .xsl transformation within the test harness? The only way I have been able to do this is to place the .xsl in the src/test/resources folder of the "client (non-utility)" project, but that forces me to duplicate the .xsl, and I want to avoid that. I have tried using MyXsltUtility.getClass().getClassLoader().getResourceAsStream(...) but that looks for the .xsl inside of a *package*. This is the problem. How do I get access to the *resources* folder, as the .xsl file does not live inside of the java class package structure? I would like to run the test case in both standalone mode from eclipse, and within the Maven build. Thank you in advance. -- View this message in context: http://maven.40175.n5.nabble.com/Accessing-an-xsl-in-another-project-from-a-unit-test-case-tp5711637.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
