This Test Framework jar that Jeff is speaking of should use the <type>test-jar</type> in your pom packaging.
If you search the website and User list archive, you will find some more details, examples, documentation, etc for test-jar's. Wayne On 5/1/06, Jeff Jensen <[EMAIL PROTECTED]> wrote:
Quoting Aaron Freeman <[EMAIL PROTECTED]>: > One of our projects uses some mock objects for running some JUnit > tests. These objects were put in the appropriate packages under the > src/test folder in one of the sub-modules. Now we want to use these > mock objects in the JUnit tests of one of the other sub-modules. > However, when Maven tries to compile the test classes in the second > sub-module it says it can't find the mock objects. I assume this is > because you can't reference classes in the src/test section of another > project. Is this true? Correct. Artifacts don't contain test classes and resources. > Is there any way to change this? Or should we > pull all the mock objects into a separate sub-module and have both the > other modules reference them there? That is the recommended approach - create a "Test Framework" project and put the common test classes in the src/main area, not the src/test (if your dir structure matches the Maven defaults). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
