Some of the maven project from the search platform team started failing their post-merge build with:
10:55:49 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single (default) on project experimental-highlighter-elasticsearch-plugin: Failed to create assembly: Error adding file 'org.wikimedia.search.highlighter:experimental-highlighter-core:jar:6.4.2-SNAPSHOT' to archive: /src/experimental-highlighter-core/target/classes isn't a file. -> [Help 1]
This was observed after upgrading to discovery-parent-pom:1.20, but rolling back to 1.18 does not fix the issue, so probably unrelated.
The post merge build runs mvn clean install site site:stage.
The site and default lifecycles are not really meant to be run in the same execution. And running them separately seems to fix the issue, at least locally. So a better expression of that post-merge build should be: mvn clean install && mvn site site:stage.
Not entirely related, but during this investigation, I was wondering if the same version of maven was used on CI and locally. It seems to be the case, but only accidentally. Since all the search platform projects use maven-wrapper, which freezes the Maven version, it would be even better to not rely on the Maven version deployed on CI, but instead to run ./mvnw clean install && ./mvnw site site:stage.