Thank you all for looking into this. For users facing the same issue, Han's
suggestion worked like a charm without additional plugins. The solution was
to move the execution of resource-plugin after compilation or during
preparing the package.

<plugin>

<artifactId>maven-resources-plugin</artifactId>

<groupId>org.apache.maven.plugins</groupId>

<version>3.3.1</version>

<executions>

<execution>

<id>default-resources</id>

<phase>process-classes</phase>

</execution>

</executions>

</plugin>





On Wed, Nov 5, 2025 at 5:15 AM Hans Aikema <[email protected]>
wrote:

>
>
> > On 5 Nov 2025, at 11:02, Hans Aikema <[email protected]>
> wrote:
> >
> > Or alternatively modify the sequence and move the execution of the
> resources-plugin in the prepare-package phase so that the META-INF/services
> is only copied AFTER you’ve compiled your plugin class
> >
>
> Should’ve said been "move into process-classes phase", but I accidentally
> modified only the xml snippet after looking into the earliest possible spot
> to put the execution that would be after the compile phase
>
> See also
> https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference
> for the full details of the lifecycle sequence (and the default lifecycle
> bindings of plugins)

Reply via email to