<?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>Reusing third party library from LR core in my module</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=112975450" />
  <subtitle>Reusing third party library from LR core in my module</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=112975450</id>
  <updated>2026-04-04T03:56:18Z</updated>
  <dc:date>2026-04-04T03:56:18Z</dc:date>
  <entry>
    <title>RE: Reusing third party library from LR core in my module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112979149" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112979149</id>
    <updated>2019-04-03T14:50:20Z</updated>
    <published>2019-04-03T14:50:20Z</published>
    <summary type="html">In addition, PDFBox is actually a module too, per &lt;a href="https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox/2.0.14"&gt;https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox/2.0.14&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;This means that you can drop PDFBox in the Liferay deploy folder and it will be available as a regular OSGi service.&lt;br /&gt;&lt;br /&gt;You can then just @Reference their published components or create classes from their exported packages, easy peasy.&lt;br /&gt;&lt;br /&gt;Use &amp;#34;compile&amp;#34;, not &amp;#34;compileInclude&amp;#34; or &amp;#34;compileOnly&amp;#34; in your build.gradle file and you should be golden.&lt;br /&gt;​​​​​​​</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-04-03T14:50:20Z</dc:date>
  </entry>
  <entry>
    <title>RE: Reusing third party library from LR core in my module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112976468" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112976468</id>
    <updated>2019-04-03T13:14:12Z</updated>
    <published>2019-04-03T13:14:12Z</published>
    <summary type="html">Best solution: Just include it in your module.&lt;br /&gt;If you really, really want to use the global version, I think you can add it to the list in the portal-ext property &amp;#34;module.framework.system.packages.extra&amp;#34; to make pdfbox available globally. But it isn&amp;#39;t advisable to do so.&lt;br /&gt;&lt;br /&gt;https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/resolving-classnotfoundexception-and-noclassdeffounderror-in-osgi-bundles</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2019-04-03T13:14:12Z</dc:date>
  </entry>
  <entry>
    <title>Reusing third party library from LR core in my module</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112975449" />
    <author>
      <name>Jan Tošovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112975449</id>
    <updated>2019-04-03T13:00:44Z</updated>
    <published>2019-04-03T13:00:44Z</published>
    <summary type="html">Dear All,&lt;br /&gt;&lt;br /&gt;I need PdfBox library to process PDF files in my module. It is already the integral part of the LR portal in \tomcat-9.0.10\webapps\ROOT\WEB-INF\lib\pdfbox.jar&lt;br /&gt;&lt;br /&gt;Can I somehow reuse it in my OSGi module?&lt;br /&gt;&lt;br /&gt;Currently I embed it using this method &lt;a href="https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/adding-third-party-libraries-to-a-module"&gt;https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/adding-third-party-libraries-to-a-module&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But in this case that jar file is twice in the portal.&lt;br /&gt;&lt;br /&gt;Jan</summary>
    <dc:creator>Jan Tošovský</dc:creator>
    <dc:date>2019-04-03T13:00:44Z</dc:date>
  </entry>
</feed>
