NetBeans Platform Unit Test Library Dependencies

Posted by Ben Hammond on Stack Overflow See other posts from Stack Overflow or by Ben Hammond
Published on 2010-04-30T08:14:34Z Indexed on 2010/04/30 8:17 UTC
Read the original article Hit count: 219

Filed under:
|
|

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).

© Stack Overflow or respective owner

Related posts about netbeans

Related posts about jmock