<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Providing external bundle as a Maven dependency  when unit testing in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/providing-external-bundle-as-a-maven-dependency-when-unit/m-p/317256#M4257</link>
    <description>&lt;P&gt;That's right, I forgot the mvn eclipse part of the process, thank you !&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jul 2015 08:43:55 GMT</pubDate>
    <dc:creator>Antoine_Cordier</dc:creator>
    <dc:date>2015-07-10T08:43:55Z</dc:date>
    <item>
      <title>Providing external bundle as a Maven dependency  when unit testing</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/providing-external-bundle-as-a-maven-dependency-when-unit/m-p/317254#M4255</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I want to execute tests in a bundle A and those tests need bundle B to be deployed.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;Then I want to deploy bundle A using RuntimeFeature:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@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"); // &amp;lt;- defined in bundle B
	}
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But this does not work. What I get is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-shell"&gt;[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
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;One solution is to bundle everything together, but this has led me to ask myself: what's wrong with this ?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2015 13:35:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/providing-external-bundle-as-a-maven-dependency-when-unit/m-p/317254#M4255</guid>
      <dc:creator>Antoine_Cordier</dc:creator>
      <dc:date>2015-06-25T13:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Providing external bundle as a Maven dependency  when unit testing</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/providing-external-bundle-as-a-maven-dependency-when-unit/m-p/317255#M4256</link>
      <description>&lt;P&gt;If the bundle B (which I suppose is com.company.my.types) is not found, that means that it's not in your classpath.&lt;/P&gt;
&lt;P&gt;To put it in the classpath, you should add the maven module containing it to your dependencies in your &lt;CODE&gt;pom.xml&lt;/CODE&gt; and run a&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;mvn eclipse:eclipse
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in your module. Then refresh you project in eclipse, check that the bundle is in the "Referenced Libraries", then it should work.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 14:20:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/providing-external-bundle-as-a-maven-dependency-when-unit/m-p/317255#M4256</guid>
      <dc:creator>Damien_Metzler</dc:creator>
      <dc:date>2015-07-09T14:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Providing external bundle as a Maven dependency  when unit testing</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/providing-external-bundle-as-a-maven-dependency-when-unit/m-p/317256#M4257</link>
      <description>&lt;P&gt;That's right, I forgot the mvn eclipse part of the process, thank you !&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2015 08:43:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/providing-external-bundle-as-a-maven-dependency-when-unit/m-p/317256#M4257</guid>
      <dc:creator>Antoine_Cordier</dc:creator>
      <dc:date>2015-07-10T08:43:55Z</dc:date>
    </item>
  </channel>
</rss>

