Felix maven-bundle-plugin ServiceConfigurationError Completion50PostingsFormat does not exist

Hi,

I am facing the following exception with the following pom.xml, with commented portion in maven-bundle-plugin (with or without lucene dependency)

<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>6.3.0</version>
</dependency>
<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>elasticsearch-rest-high-level-client</artifactId>
    <version>6.3.0</version>
</dependency>
<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>transport</artifactId>
    <version>6.3.0</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>parent-join-client</artifactId>
    <version>6.3.0</version>
</dependency>
<!-- <dependency>
        <groupId>org.apache.lucene</groupId>
        <artifactId>lucene-analyzers-common</artifactId>
        <version>7.3.1</version>
</dependency> -->

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <version>2.5.4</version>
    <extensions>true</extensions>
    <configuration>
        <instructions>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Private-Package>${bundle.namespace}.internal*</Private-Package>
            <Import-Package>!com.flipkart.zjsonpatch.*,*</Import-Package>
            <!-- <Embed-Transitive>true</Embed-Transitive>
            <Embed-Dependency>*;inline=META-INF/services/**</Embed-Dependency> -->
        </instructions>
    </configuration>
</plugin>

java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [IDVersion]

And if I uncomment the portion in maven-bundle-plugin, I am getting the following portion

java.util.ServiceConfigurationError: An SPI class of type org.apache.lucene.codecs.PostingsFormat with classname org.apache.lucene.search.suggest.document.Completion50PostingsFormat does not exist, please fix the file 'META-INF/services/org.apache.lucene.codecs.PostingsFormat' in your classpath.

Please help me in solving this issue. I have looked at other links where people recommended maven-shade-plugin in place of using maven-assembly-plugin but we are using OSGI in our company and would like to know a similar solution for Felix's maven-bundle-plugin

Thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.