06-25-2015 09:35 AM
Hello,
I want to execute tests in a bundle A and those tests need bundle B to be deployed.
Bundle B is provided as a dependency by an in-house Nexus server, and declared as a dependency with the scope "test" in bundle A pom.
Then I want to deploy bundle A using RuntimeFeature:
@RunWith(FeaturesRunner.class)
@Features({ CoreFeature.class, RuntimeFeature.class })
@Deploy({ "org.nuxeo.ecm.automation.core", "org.nuxeo.ecm.core.schema", "com.company.my.types"})
public class MakeLinkBeanTest {
@Inject
CoreSession session;
private DocumentModel doc;
@Test
public void testDoGet() throws Exception {
doc = session.createDocumentModel("/", "test", "Thesis"); // <- defined in bundle B
}
}
But this does not work. What I get is:
[NXRuntimeTestCase] No bundle with symbolic name 'com.company.my.types'; Falling back to deprecated url lookup scheme
[RuntimeFeature] Unable to deploy artifact: com.company.my.types
One solution is to bundle everything together, but this has led me to ask myself: what's wrong with this ?
Thanks
07-09-2015 10:20 AM
If the bundle B (which I suppose is com.company.my.types) is not found, that means that it's not in your classpath.
To put it in the classpath, you should add the maven module containing it to your dependencies in your pom.xml
and run a
mvn eclipse:eclipse
in your module. Then refresh you project in eclipse, check that the bundle is in the "Referenced Libraries", then it should work.
07-09-2015 10:20 AM
If the bundle B (which I suppose is com.company.my.types) is not found, that means that it's not in your classpath.
To put it in the classpath, you should add the maven module containing it to your dependencies in your pom.xml
and run a
mvn eclipse:eclipse
in your module. Then refresh you project in eclipse, check that the bundle is in the "Referenced Libraries", then it should work.
07-10-2015 04:43 AM
That's right, I forgot the mvn eclipse part of the process, thank you !
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.