Since I cannot override a core component from a POM, I have made a workaround that fixes the behaviour at the maven-archiver level. I am attaching a patch against maven-archiver-2.2.
My patch is generally along the same fundamental approach as Baerrach's, but with the following differences:
- aims to fix the problem with minimal changes, instead of including refactoring mixed with the fix.
- applies the fix to the jar indexing codepath too.
- tries to avoid hardcoding the details of how to construct artifact filenames.
In that last point, it is only partially successful - I could not work out how to get hold of an appropriate ArtifactRepository object within maven-archiver, so I resorted to making the twin assumptions:
1. that the existing filepath would contain the correct path, and only the basename need be fixed up.
2. that a DefaultRepositoryLayout object would give me the correct basename.
In practice this seems to work, even if it is a little ugly.