NetBeans Platform Unit Test Library Dependencies
- by Ben Hammond
I am working on a Netbeans Platform RCP application.
I use jmock in my unit tests and I have created a Library Wrapper Module to import the necessary libraries.
The Module has an section named 'Libraries' and another section named 'Unit Test Libraries'.
I hoped that I could add the JMock Library Wrapper to the 'Unit Test Libraries', however when I run the unit tests I get the error 'package org.jmock does not exist'.
If I import the JMock Library Wrapper in to the main 'Libraries' element then it works, but this feels wrong.
Maven allows me to specify unit-test only dependencies, and I assumed that NetBeans Platform did the same. Should this be possible? Am I doing something wrong? Should I resign myself to a run-time dependency on the unit-test libraries (ugh).