-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Steps
- Publish an
SNAPSHOTartifact to a Maven repository (withpublishMavenStyleset totrue, obviously) - Try to fetch this artifact as a dependency from Maven 3
- Notice the trouble you're into when trying to fetch the latest
SNAPSHOT...
Problems
Maven's support for "unique versions" was deprecated in Maven 2, which reached EOL in February 2014, and definitely disabled in Maven 3.
However, SBT publishes SNAPSHOT artifacts as "unique versions", which causes all kinds of trouble when trying to fetch dependencies from Maven.
Of course, I know SBT isn't Maven and does not try to be Maven, which is great, I love SBT for that, among other things.
However, I think that SBT can't ignore Maven either, as it does already with the possibility to publish POMs, to publish to Maven repos, etc...
Allowing to publish "non-unique versions" is just another step ;)
I know that the sbt-unique-version plugin allows to do that, but I honestly think this should be standard behaviour when publishing SNAPSHOT dependencies to a remote Maven repository (as long as it doesn't cause problems somewhere else, of course).
The sbt-aether-deploy plugin fixes that issue too, but pulling Maven in SBT to publish artifacts is a tiny bit overkill...
Plus, there is a version conflict on httpclient (both used by SBT and the plugin, pulled by the dependency on Aether) with SBT 0.13, causing the plugin to fail to publish artifacts (SBT isn't to blame for that, of course).
As the problem only arises when trying to fetch a dependency from a remote Maven repository (not a local repo), I suggest that :
- Publishing to a remote repository (eg. using the
publishtask) - With
publishMavenStyletotrue
could trigger the change in the artifact name to include the timestamp.
Should you agree with this, I could provide a PR if you like.