Skip to content

Cannot parse snapshot xml from local ivy while offline #1824

@iceberg901

Description

@iceberg901

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions