<plugin>
<!-- this plugin copies all shared resources -->
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<id>attach-shared-resources</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<resourceBundles>
<resourceBundle>${project.groupId}:shared-resources:${project.version}</resourceBundle>
</resourceBundles>
<attached>true</attached>
<attachToMain>true</attachToMain>
<outputDirectory>${project.build.directory}/shared-resources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
If I import a project with this configuration, the connector invokes the plugin as expected and it unpacks the shared resources to target/shared-resources. This all works good. But the resource directory attached by the maven-plugin(in this case target/shared-resources) is not automatically copied to the target/classes directory by the maven-resources-plugin during the process-resources phase(It copies other resources but not the dynamically attached ones). If I do a manual build after importing the project, it processes the generated resources and copies it to target/classes.
I'm struggling to find why this doesn't work the first time(when the project is imported)
This is the link to the build participant -