<?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>Exporting and Importing packages with bnd.bnd</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121653864" />
  <subtitle>Exporting and Importing packages with bnd.bnd</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121653864</id>
  <updated>2026-04-04T17:27:22Z</updated>
  <dc:date>2026-04-04T17:27:22Z</dc:date>
  <entry>
    <title>RE: RE: Exporting and Importing packages with bnd.bnd</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121662704" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121662704</id>
    <updated>2023-03-03T16:22:27Z</updated>
    <published>2023-03-03T14:15:15Z</published>
    <summary type="html">&lt;p&gt;compileOnly only declares the dependency on a package, it will not
  include it nor guarantee it's availability at deployment time.&lt;/p&gt;
&lt;p&gt;
  &lt;a href="https://liferay.dev/blogs/-/blogs/gradle-compile-vs-compileonly-vs-compileinclude"&gt;https://liferay.dev/blogs/-/blogs/gradle-compile-vs-compileonly-vs-compileinclude&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, compileOnly does not include the package in the Import-Package
  directive in METAINF.inf, that's why you are forced to put it into the
  bnd.bnd file.&lt;/p&gt;
&lt;p&gt;I think it is just the case that you're using the wrong directive in
  your build.gradle file.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2023-03-03T14:15:15Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Exporting and Importing packages with bnd.bnd</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121661282" />
    <author>
      <name>Sebastian Wikholm</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121661282</id>
    <updated>2023-03-02T19:27:26Z</updated>
    <published>2023-03-02T06:43:54Z</published>
    <summary type="html">&lt;p&gt;This would of course be fine and dany if it did work. I´ve tried to
  declare a dependency in the build.gradle and a bunch of stuff, as i
  always do before i ask questions here.&lt;/p&gt;
&lt;p&gt;According to the official guides the package should be available to
  declare a dependency like &lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;compileOnly group: &amp;quot;com.liferay&amp;quot;, name: &amp;quot;com.liferay.item.selector.criteria.api&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Allthough i do use export-package: i get&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Could not resolve all files for configuration&lt;/p&gt;&lt;/blockquote&gt;</summary>
    <dc:creator>Sebastian Wikholm</dc:creator>
    <dc:date>2023-03-02T06:43:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: Exporting and Importing packages with bnd.bnd</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121660118" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121660118</id>
    <updated>2023-03-01T19:24:13Z</updated>
    <published>2023-03-01T18:18:53Z</published>
    <summary type="html">&lt;p&gt;The Export-Package you do need to do, but you don't have to worry
  about the Import-Package directive. That will be handled during the
  build simply by declaring the dependency on the other module.&lt;/p&gt;
&lt;p&gt;If &lt;em&gt;all&lt;/em&gt; you are doing is modifying the bnd.bnd's
  Import-Package directive but not using the build.gradle to declare the
  dependency, then you're not understanding how the Import-Package
  directive is being used. It will not affect gradle, it will not
  afffect the build, it will only apply when the OSGi container is
  trying to process your module and will fail with an &lt;em&gt;Unresolved
    Requirement &lt;/em&gt;exception if the module exporting the package is
  not available.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2023-03-01T18:18:53Z</dc:date>
  </entry>
  <entry>
    <title>Exporting and Importing packages with bnd.bnd</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121653863" />
    <author>
      <name>Sebastian Wikholm</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121653863</id>
    <updated>2023-02-21T19:58:16Z</updated>
    <published>2023-02-20T06:05:54Z</published>
    <summary type="html">&lt;p&gt; Im trying to make an utility class with some methods and constants
  for usage in other modules. I use &amp;quot;Export-Package:&amp;quot; in the
  module where i want to export the package, and Import-Package in the
  module where i want to import it. According to the tutorials this
  should work automatically.&lt;/p&gt;
&lt;p&gt;It does not. As there are no more detailed information, I try to
  refresh the gradle project, still the package is not available to use.&lt;/p&gt;
&lt;p&gt;I would appreciate it if anyone could help        &lt;/p&gt;</summary>
    <dc:creator>Sebastian Wikholm</dc:creator>
    <dc:date>2023-02-20T06:05:54Z</dc:date>
  </entry>
</feed>
