We are using and the jar build with dependencies will have META-INF/services/org.glassfish.jersey.internal.spi.AutoDiscoverable with value "a.b.client.sdk.common.client.AutoConfigService"
Basically it should also have the value of "org.glassfish.jersey.jackson.internal.JacksonAutoDiscoverable"
Looks like there is no appending or merging of values happening for the key of org.glassfish.jersey.internal.spi.AutoDiscoverable.
How we can achieve so that it should have both values one after another?
Below is how the plugin we are using.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</execution>
<execution>
<id>assemble-dist-zip</id>
<phase>verify</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/app-zip-assemble.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
How to achieve with maven plugin, so my expectation is, META-INF/services/org.glassfish.jersey.internal.spi.AutoDiscoverable to retain the values coming from different artifacts like below.
a.b.client.sdk.common.client.AutoConfigService org.glassfish.jersey.jackson.internal.JacksonAutoDiscoverable
You could use a workaround like this:
Create a file named ${PROJECT_DIR}/AutoDiscoverable.txt with the content you wish like:
Then run mvn package using the following section instead of the assembly-plugin in pom.xml:
This will exclude the original org.glassfish.jersey.internal.spi.AutoDiscoverable file from the package and replace it with your manually created one.