문제

After updating the maven-bundle-plugin from version 2.3.5 to version 2.4.0 running mvn clean install outputs some warning messages, which I don't fully understand. E.g.

Export ch.entwine.weblounge.contentrepository.impl.index, has 1, private references [org.elasticsearch.action.bulk]

I guess this has something to do with an embedded lib (elasticsearch). Here are parts of the POM:

<dependencies>
  ...
  <dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>0.19.9</version>
  </dependency>
  ...
</dependencies
...
<Export-Package>
  ...
  ch.entwine.weblounge.contentrepository.impl.index
  ...
</Export-Package>
<Embed-Dependency>
  ....
  elasticsearch;inline=true
  ...
</Embed-Dependency>

What does the error message exactly mean? What is the recommended way to solve such problems?

도움이 되었습니까?

해결책

That message means that inside one of your public packages (that you are exporting) there is a class that is accessing a class that is in a private package (a package that is not being exported).

When embedding jars you must not use Export-Package to declare packages from the embedded jars. it is for you declare the packages from the own bundle. You must use <_exportcontents> to export org.elasticsearch.action.bulk.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top