<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Problem resolving dependency for DXP module</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111933154" />
  <subtitle>Problem resolving dependency for DXP module</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111933154</id>
  <updated>2026-04-05T05:53:14Z</updated>
  <dc:date>2026-04-05T05:53:14Z</dc:date>
  <entry>
    <title>RE: Problem resolving dependency for DXP module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111995096" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111995096</id>
    <updated>2019-01-12T17:22:06Z</updated>
    <published>2019-01-12T17:22:06Z</published>
    <summary type="html">&lt;p&gt;Hi Jorge, &lt;/p&gt;
&lt;p&gt;I have been lucky as of late and haven't had to worry much about
  these problems. The few times, recently, where I almost had to worry
  about them (like with the Joda time libraries) I was lucky enough to
  find artifacts that were already converted for me. I looked back
  through my history in my browser though to see if I could dig up what
  I THINK was the link I followed to do this, but again, it has been a
  while so I don't know if this is the right link.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;
  &lt;a href="https://www.ibm.com/support/knowledgecenter/en/SSEQTP_9.0.0/com.ibm.websphere.osgi.doc/ae/ra_convert_jar_to_bundle.html"&gt;https://www.ibm.com/support/knowledgecenter/en/SSEQTP_9.0.0/com.ibm.websphere.osgi.doc/ae/ra_convert_jar_to_bundle.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;or it might have been this one (I believe Adobe EM using the Felix
  container as well)&lt;/p&gt;
&lt;p&gt;
  &lt;a href="https://helpx.adobe.com/ca/experience-manager/kb/ConvertAJarIntoOsgiBundle.html"&gt;https://helpx.adobe.com/ca/experience-manager/kb/ConvertAJarIntoOsgiBundle.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;or possbily this one? but less likely as I use Intellij, not eclipse &lt;/p&gt;
&lt;p&gt;
  &lt;a href="https://stackoverflow.com/questions/9819090/how-to-convert-jar-to-osgi-bundle-using-eclipse-and-bndtools"&gt;https://stackoverflow.com/questions/9819090/how-to-convert-jar-to-osgi-bundle-using-eclipse-and-bndtools&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The gist of it is that you need to provide the manifest file that
  describes the bundle and the most important, especially in your case,
  is to make sure that you define the right imports (based on the bundle
  needs) and the right exports (based on other bundles needs). Make no
  mistake about it, this can be a tedious, time consuming and almost
  painful exercise. With that said, if you are doing it for publicly
  shared jars, others would likely appreciate you sharing them with
  others either via PR, or by submitting them to the maven repo. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;.. if either or those links end up working for yo though, could you
  let me know so that I can mark it as a possible solution in case I run
  into this same issue again in the future? :)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-01-12T17:22:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: Problem resolving dependency for DXP module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111974154" />
    <author>
      <name>Jorge Rivera</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111974154</id>
    <updated>2019-01-09T22:13:23Z</updated>
    <published>2019-01-09T22:13:23Z</published>
    <summary type="html">&lt;p&gt;Hi Andrew&lt;/p&gt;
&lt;p&gt;It something like that, I've been building a Frankenstein here, I
  jave a fully tested java library created for our 6.2 portal, it is not
  a Liferay plugin, such jar file includes all dependencies in the jar,
  exploding the jar file has all the paths for the libraries in the pom file.&lt;/p&gt;
&lt;p&gt;I figured that I could just add the library to a plugin like we did
  before in 6.2, by copying it to the lib folder inside the plugin but
  it turns out that it requires more dependencies that were not needed
  in 6.2. I guess I am wrong on this regard.&lt;/p&gt;
&lt;p&gt;You mention dependency tree resolving, I tried creating a module that
  replaced the library but the outcome is the same, the afu xerces
  dependency is not met by any library I've tried in mvnrepository.&lt;/p&gt;
&lt;p&gt;How can I convert my library into a OSGI aware library? Is there any
  documentation that guide me in the right direction? I've looked but I
  haven't had any luck finding something that works. I followed &lt;a
    href="https://stackoverflow.com/questions/31191299/google-client-api-in-osgi"&gt;this
    post &lt;/a&gt;in stackoverflow but it did not work, it keeps asking for
  that weird dependency, I used the google api version 1.20, walked my
  way up to the latest that is 1.27, still no luck.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;</summary>
    <dc:creator>Jorge Rivera</dc:creator>
    <dc:date>2019-01-09T22:13:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Problem resolving dependency for DXP module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111971917" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111971917</id>
    <updated>2019-01-09T15:09:13Z</updated>
    <published>2019-01-09T15:09:13Z</published>
    <summary type="html">&lt;p&gt;Hi Jorge,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I love OSGI, except for when it comes to these dependency management
  things -- in those moments, OSGI and I tend to have a rocky
  relationship :).&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Most of the time when I am fighting with these scenarios, it stems
  from a dependency that I have added to my project that ALSO has a
  dependency that I don't have. So while I meet the needs of Gradle to
  let me code and build, the runtime is another story -- which sounds to
  me like what you are stuggling with. Dependency trees can often take
  longer to resolve than the time it takes to build your actual plugin. &lt;/p&gt;
&lt;p&gt;Question, you mentioned in 6.2, in your maven project, that the
  following jars are referenced --&lt;/p&gt;
&lt;pre&gt;
Libraries added to 6.2 jar via pom.xml

com.google.api-client:google-api-client:1.27.0, exclude guava
com.google.guava:guava:20.0
com.google.http-client:google-http-client:1.27.0
com.google.api-client:google-api-client-java6:1.27.0
com.google.http-client:google-http-client-jackson2:1.27.0
com.google.http-client:google-http-client-gson:1.27.0
com.google.oauth-client:google-oauth-client:1.27.0
com.google.oauth-client:google-oauth-client-java6:1.27.0
org.glassfish:avax.jms:3.2-b06
com.google.apis:google-api-services-drive:v3-rev136-1.25.0
com.google.apis:google-api-services-slides:v1-rev294-1.23.0
com.google.errorprone:error_prone_annotations:2.3.2
org.apache.logging.log4j.osgi:log4j-osgi:2.0-rc1&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Are they defined in the pom as provided? Have you tried simply taking
  the jars from that plugin and shoving them into your gradle plugin,
  bundling the jars with your module? Honestly, I wouln't go with that
  as a FINAL solution since you could easily debate whether or not that
  is a proper solution, but you could start there to make sure that you
  have all the libs you needed and then from there convert those libs
  that are not OSGI aware, to OSGI aware so that you could deploy them
  directly to the container without needing to bundle them with your plugin.&lt;/p&gt;
&lt;p&gt;... Or have I totally misunderstood your question/problem? :)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-01-09T15:09:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Problem resolving dependency for DXP module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111963589" />
    <author>
      <name>Jorge Rivera</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111963589</id>
    <updated>2019-01-08T23:10:30Z</updated>
    <published>2019-01-08T23:10:30Z</published>
    <summary type="html">&lt;blockquote&gt;
  &lt;div class="quote-title"&gt;Andrew Jardine:&lt;/div&gt;
  &lt;div class="quote"&gt;
    &lt;div class="quote-content"&gt;
      &lt;p&gt;Hi Jorge,&lt;/p&gt;
      &lt;p&gt; &lt;/p&gt;
      &lt;p&gt;Have you tried anything from, possible, one of the most read
        Liferay blog posts of all time that David wrote?&lt;/p&gt;
      &lt;p&gt; &lt;/p&gt;
      &lt;p&gt;
        &lt;a href="https://community.liferay.com/blogs/-/blogs/osgi-module-dependencies"&gt;https://community.liferay.com/blogs/-/blogs/osgi-module-dependencies&lt;/a&gt;&lt;/p&gt;
      &lt;p&gt; &lt;/p&gt;
      &lt;p&gt;If yes, can you share with us which items you tried?&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;Hello Andrew&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I tried them all, the one that closely worked was option 4 but it
  gave me the same issue. I ended up using compileInclude in the gradle
  file and it was it, I've looked for the afu.com package withing the
  included jars and it is not there, that is why I keep looking for
  some jar file that contains the package the closest I've found is:&lt;/p&gt;
&lt;pre&gt;
compile group: 'xerces', name: 'xercesImpl', version: '2.6.2-jaxb-1.0.6'&lt;/pre&gt;
&lt;p&gt;It contains com.sun.org.apache.xerces.internal.parsers but not the
  one starting with afu that I'm being asked by the dependencies I
  already have.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Hope it makes sense.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;</summary>
    <dc:creator>Jorge Rivera</dc:creator>
    <dc:date>2019-01-08T23:10:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: Problem resolving dependency for DXP module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111946600" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111946600</id>
    <updated>2019-01-07T15:43:13Z</updated>
    <published>2019-01-07T15:43:13Z</published>
    <summary type="html">&lt;p&gt;Hi Jorge,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Have you tried anything from, possible, one of the most read Liferay
  blog posts of all time that David wrote?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;
  &lt;a href="https://community.liferay.com/blogs/-/blogs/osgi-module-dependencies"&gt;https://community.liferay.com/blogs/-/blogs/osgi-module-dependencies&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If yes, can you share with us which items you tried?&lt;/p&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-01-07T15:43:13Z</dc:date>
  </entry>
  <entry>
    <title>Problem resolving dependency for DXP module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111933153" />
    <author>
      <name>Jorge Rivera</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111933153</id>
    <updated>2019-01-05T20:22:20Z</updated>
    <published>2019-01-05T20:22:20Z</published>
    <summary type="html">&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I've been trying to build a google api plugin, it works flawlessly in
  6.2 but when I try to include de same jar file that works in 6.2 as a
  module in DXP the module does not resolve and keeps asking me for more
  dependencies but there's one I can't meet yet, this is the error I get:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;
19:35:55,248 ERROR [Framework Event Dispatcher: Equinox Container: 900c2611-2111-0019-17e8-93f5b53ee20e][com_qad_utils_google:97] FrameworkEvent ERROR 
org.osgi.framework.BundleException: Could not resolve module: com.qad.utils.google [1969]_  Unresolved requirement: Import-Package: afu.com.sun.org.apache.xerces.internal.parsers_ [Sanitized]
    at org.eclipse.osgi.container.Module.start(Module.java:429)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

&lt;/pre&gt;
&lt;p&gt;Where do I get that weird
  package afu.com.sun.org.apache.xerces.internal.parsers, I've
  found com.sun.org.apache.xerces.internal.parsers but the plugin does
  not pick it up that, if I remove the dependency that injects it I see
  a different afu package and
  only org.checkerframework:checker-qual:2.0.0 meets that weird afu
  structure, I'm using the latest versions of the dependencies.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;These are my libraries and dependencies:&lt;/p&gt;

&lt;pre&gt;
Libraries added to 6.2 jar via pom.xml

com.google.api-client:google-api-client:1.27.0, exclude guava
com.google.guava:&lt;span
    style=""&gt;guava:20.0&lt;/span&gt;
com.google.http-client:&lt;span
    style=""&gt;google-http-client:1.27.0&lt;/span&gt;
com.google.api-client:&lt;span
    style=""&gt;google-api-client-java6:1.27.0&lt;/span&gt;
com.google.http-client:&lt;span
    style=""&gt;google-http-client-jackson2:1.27.0&lt;/span&gt;
com.google.http-client:&lt;span
    style=""&gt;google-http-client-gson:1.27.0&lt;/span&gt;
com.google.oauth-client:&lt;span
    style=""&gt;google-oauth-client:1.27.0&lt;/span&gt;
com.google.oauth-client:google-oauth-client-java6&lt;span
    style=""&gt;:1.27.0&lt;/span&gt;
org.glassfish:&lt;span
    style=""&gt;avax.jms:&lt;/span&gt;&lt;span
    style=""&gt;3.2-b06&lt;/span&gt;
com.google.apis:&lt;span
    style=""&gt;google-api-services-drive:&lt;/span&gt;&lt;span
    style=""&gt;v3-rev136-1.25.0&lt;/span&gt;
com.google.apis:&lt;span style=""&gt;google-api-services-slides:v1-rev294-1.23.0&lt;/span&gt;
com.google.errorprone:error_prone_annotations:2.3.2
org.apache.logging.log4j.osgi:log4j-osgi:2.0-rc1&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;
Dependencies:

    compileInclude group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.7.9'
    compileInclude group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.7.9'
    compileInclude group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.7.9'
    compileInclude group: 'org.checkerframework', name: 'checker', version: '2.0.0'
    compileInclude group: 'org.checkerframework', name: 'checker-qual', version: '2.0.0'&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;
This is my bnd file:

Bundle-Name: qad-utils-google
Bundle-SymbolicName: com.qad.utils.google
Bundle-Version: 1.0.0
Export-Package: qad.utils.google
Include-Resource: @SlidesAPI-2.0.jar&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I hope someone can help.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Jorge Rivera</dc:creator>
    <dc:date>2019-01-05T20:22:20Z</dc:date>
  </entry>
</feed>
