Idea, sbt, unable to reparse warning
Asked Answered
M

2

45

I've pushed my artifact to oss nexus repo, added it as dependency to another project. Idea keeps me warning:

[warn] Unable to reparse com.github.kondaurovdev#jsonapi_2.11;0.1-SNAPSHOT from sonatype-snapshots, using Fri May 13 17:12:52 MSK 2016 [warn] Choosing sonatype-snapshots for com.github.kondaurovdev#jsonapi_2.11;0.1-SNAPSHOT 

Maybe i pushed artifact somehow in a wrong way? But i did it earlier, everything was ok. How to get rid of these warnings? Or just ignore them?

Madore answered 14/5, 2016 at 10:57 Comment(4)
I made a basic 3 line build.sbt that reproduces the problem: resolvers += Resolver.sonatypeRepo("snapshots") libraryDependencies += "org.postgresql" % "postgresql" % "9.4.1209-SNAPSHOT" Then run sbt updateMountebank
I'm having the same issue. This message is displayed and the SNAPSHOT artifact from the remote repo is used, ignoring my locally published one.Voss
FYI- I ran the build.sbt in 1.0.0-M4 with the same effect. I can't tell via github source if the warning is a bug or feature. (Side note: I got further than stackoverflow.com/q/37126026/3320205 with addMavenResolverPlugin, but ran into a "Failed to read artifact descriptor".) Perhaps sbt-dev may need to be pinged?Mountebank
anybody got any news on this? Running into the same problem...Wadley
H
22

I had the same issue.

Did you publish your SNAPSHOT version to your artifactory? If so this might be your problem.

As you know when publishing locally your snapshot version is stored in the .ivy2/local directory. The remote version are stored in the .ivy2/cache directory.

When looking into the .ivy2/cache/{dependency} folder you will see that it has only downloaded the xml and properties file. So just the metadata and no jars. This is the actual reason why it can't be parsed since it's not there.

Since the .ivy2/cache takes precedence over .ivy2/local it won't see your local published version. There are 2 ways to fix this.

  • Update your snapshot version number(recommended)
  • Remove the SNAPSHOT from your artifactory and remove the .ivy2/cache/{dependency} folder on every client that has a local version.

In my opinion the first one is the way to go.

Hinshelwood answered 31/8, 2016 at 9:54 Comment(4)
I even had a second issue which also caused the same error. I had the same library but an older version in the unmanagedBase directory. Deleting this old version from the directory would be the fixHinshelwood
Thank you for the answer, What do you mean update your snapshot version? publishing locally again doesn't solve this..Capsulate
@Capsulate I meant updating the version number. So in effect publishing a new versionHinshelwood
Why one would not be allowed to publish many snapshot with the same version and different timestamp? is it wrong for some reason ?Charlottetown
M
9

I had the same issue, and it goes away after I add the follow in my build.sbt:

updateOptions := updateOptions.value.withLatestSnapshots(false)

You can find more detail from https://github.com/sbt/sbt/issues/2650

Matriarchate answered 21/3, 2017 at 19:0 Comment(2)
Where would this go in the build file? I have been getting an error when I place it in the end of the build fileAton
is this key still available in sbt 0.13.16 ? I cannot find itPhotothermic

© 2022 - 2024 — McMap. All rights reserved.