mergeServiceFiles declared here, and its implementation is as follows:
public ShadowJar mergeServiceFiles() { try { transform(ServiceFileTransformer.class); } catch (IllegalAccessException e) { } catch (InstantiationException e) { } return this; }
As you can see, it uses the ServiceFileTransfomer which is defined here . From his documents:
Changed from org.apache.maven.plugins.shade.resource.ServiceResourceTransformer.java
A resource converter that adds META-INF / services resource records to a single resource. For example, if there are several META-INF / services / org.apache.maven.project.ProjectBuilder resources distributed across many JAR files, all individual entries will be merged into one META-INF / services / org.apache.maven.project. The .ProjectBuilder resource is packaged in the resulting JAR file created by the shader process.
source share