In order to write a valid maven-metadata.xml file the behaviour of org.apache.maven.repository.internal.VersionsMetadata needs to be changed, so that it writes the artifactId element using the correct format $name_$scalaVersion_$sbtVersion.
Unfortunately, the class VersionsMetadata class is final and internal so it's not possible to simply extend its behaviour, so I'm forced to create a whole new implementation and replace all the generators, all the way from Booter.scala. For this reason, the following classes were copied directly from the Maven sources but not modified:
MavenMetadata
VersionsMetadataGenerator
VersionsMetadataGeneratorFactory.java
I decided to simply copy these classes as is, so that if Maven changes them it's easy to compare them and apply patches. I've also considered rewriting them in Scala, but it has the disadvantage of diverging further from Maven and possibly creating new bugs.
Fixes #64
In order to write a valid
maven-metadata.xml
file the behaviour oforg.apache.maven.repository.internal.VersionsMetadata
needs to be changed, so that it writes theartifactId
element using the correct format$name_$scalaVersion_$sbtVersion
.Unfortunately, the class
VersionsMetadata
class is final and internal so it's not possible to simply extend its behaviour, so I'm forced to create a whole new implementation and replace all the generators, all the way fromBooter.scala
. For this reason, the following classes were copied directly from the Maven sources but not modified:MavenMetadata
VersionsMetadataGenerator
VersionsMetadataGeneratorFactory.java
I decided to simply copy these classes as is, so that if Maven changes them it's easy to compare them and apply patches. I've also considered rewriting them in Scala, but it has the disadvantage of diverging further from Maven and possibly creating new bugs.