Search code examples
mavendeploymentsbtsonatype

Sonatype buildNumber and timestamp out of sync


I have a really weird problem with my snapshot deployment: https://gist.github.com/fommil/5042065

<groupId>com.github.fommil</groupId>
<artifactId>emokit</artifactId>
<version>1.0-SNAPSHOT</version>
<versioning>
    <snapshot>
        <timestamp>20130226.204310</timestamp>
        <buildNumber>13</buildNumber>
    </snapshot>
    <lastUpdated>20130226204310</lastUpdated>
    <snapshotVersions>
        <snapshotVersion>
            <extension>jar</extension>
            <value>1.0-20130226.204248-12</value>
            <updated>20130226204310</updated>
        </snapshotVersion>
    ...

Basically, the buildNumber and timestamp do not agree with the names of the snapshotVersions, which confuses SBT and IntelliJ to the point where I can't depend on these snapshots.

I have tried deleting and redeploying all the snapshots, but it hasn't fixed it.

I'd like somebody to help me fix this so that the fields all agree and I can use SBT as my build tool in upstream applications. I filed an issue on SBT but it has received no attention (this is arguably an SBT bug in not dealing with this): https://github.com/sbt/sbt/issues/679

The project itself is hosted at https://github.com/fommil/emokit-java and the uploaded file (which will change) is sourced at https://oss.sonatype.org/content/repositories/snapshots/com/github/fommil/emokit/1.0-SNAPSHOT/maven-metadata.xml

Sometimes it fixes itself - I expect there was some sonatype cronjob that tidied this all up.

(NOTE: I voted to close because I thought it seemed to fix itself, but then the problem arose again.)


Solution

  • Have you declared the maven-deploy-plugin specifically in your pom? Double check the version and of that plugin.