PowerMock tests not working from tycho [message #1754114] |
Tue, 14 February 2017 15:16 |
Erik Vande Velde Messages: 82 Registered: September 2012 |
Member |
|
|
We are currently using a dedicated 3rd party library bundle in our product to make libraries like mockito, guava, etc ... available to other bundles. There we put all libraries in a 'lib' sub-directory, include them in the Bundle-ClassPath of the manifest, and export all their packages from the same manifest. This always worked correctly, but now we are having trouble with powermock. If we include that in the 3rd party bundle, and we don't add junit there, the tests using powermock show an 'initializationError: Type [unknown] not present'. If we add powermock AND junit in the library bundle, we see 'initializationError: PowerMockExampleTest cannot be found by thirdparty.libsbundle_with_junit'.
If we just include the 3rd party libraries in the test bundle itself, in a lib sub-directory, everything works like a charm, but that would mean we have to add these libraries to every bundle that wants to use them.
My questions:
(1) Why would the 3rd party bundle need the test class PowerMockExampleTest , instead of the other way around, and how can we provide it ??
(2) What is the current preferred way to add 3rd party libraries to an e4 project (many people say 'use orbit', but they don't always have the wanted version of a library, if it exists at all).
I've just uploaded a sample project to github if someone would like to reproduce the problems I'm talking about here: see https://github.com/erikatfugro/e4-3rd-party-libs
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02667 seconds