question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot parse snapshot xml from local ivy while offline

See original GitHub issue

While working with no internet connection:

  • I publish a snapshot to my local ivy using sbt publish-local
  • I try to build another project that depends on that snapshot

It seems that sbt can find the local copy of the snapshot, but then raises the following error:

Resolving com.iceberg901#metadata-models_2.10;1.0.2-SNAPSHOT ...
[warn] xml parsing: ivy-1.0.2-SNAPSHOT.xml.original:2:205: schema_reference.4: Failed to read schema document 'http://maven.apache.org/xsd/maven-4.0.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>
...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.iceberg901#metadata-models_2.10;1.0.2-SNAPSHOT: java.text.ParseException: [xml parsing: ivy-1.0.2-SNAPSHOT.xml.original:2:205: cvc-elt.1: Cannot find the declaration of element 'project'. in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag project in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag modelVersion in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag groupId in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag artifactId in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag packaging in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag description in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag version in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag name in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag organization in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] , unknown tag name in file:/Users/j.samberg/.ivy2/cache/com.iceberg901/metadata-models_2.10/ivy-1.0.2-SNAPSHOT.xml.original
[warn] ]
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

So clearly http://maven.apache.org/xsd/maven-4.0.0.xsd cannot be reached when I am offline, but I’m guessing it doesn’t change very much so there should be someway to cache it locally. Anyone know where I can do this/which tool is responsible - sbt, ivy, or maven? Or is this a bug in one of the tools?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
evacchicommented, May 12, 2016

the horrific work around:

  rm -r ~/.ivy2/cache/com.iceberg901

(BTW this looks like an ivy issue)

1reaction
veganskcommented, Dec 28, 2017

I ran into this issue in sbt plugin test using scripted when I started to publish the plugin

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does sbt keep downloading my snapshot dependencies?
Every time I build it, it goes off to the remote repository to fetch the dependencies. This is true even if I set...
Read more >
Documentation (2.0.0) | Apache Ivy™
FIX: IO problem while parsing ivy file (Resetting to invalid mark) (IVY-975) ... directory on your local filesystem (and make sure you name...
Read more >
Learning the Basics - Gradle User Manual
Since Gradle 5.3, when parsing a metadata file, be it Ivy or Maven, Gradle will look for a marker indicating that a matching...
Read more >
4 Configuration 2.3.2 - GitHub Pages
The second file, Config.groovy , is for settings that are used when your ... If you can't use Ivy then just put the...
Read more >
The Gradle build system- Tutorial - Vogella.com
It supports Maven and Ivy repositories for retrieving these dependencies. Gradle supports multi-project and multi-artifact builds.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found