You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest 0.5.1 amm, dependency resolution for locally deployed artifacts does not seem to resolve sub-dependcies. Here's a SSCE
## clean up cache and previoulsy deployed versions of our artifact and also the ammonite cache
rm -rf ~/.ivy2/cache/de.mpicbg.scicomp/ ~/.ivy2/local/de.mpicbg.scicomp/ ~/.ammonite/cache
git clone https://github.com/holgerbrandl/scalautils.git
cd scalautils
sbt publishLocal
## start ammonite shell
amm
## load scalautils dependency
load.ivy("de.mpicbg.scicomp" %% "scalautils" % "0.1-SNAPSHOT")
## load a class from a transitive dependency
import better.files.File
And this is a run protocol
Desktop]$ rm -rf ~/.ivy2/cache/de.mpicbg.scicomp/ ~/.ivy2/local/de.mpicbg.scicomp/ ~/.ammonite/cache
[Desktop]$ git clone https://github.com/holgerbrandl/scalautils.git
Cloning into 'scalautils'...
remote: Counting objects: 600, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 600 (delta 6), reused 0 (delta 0), pack-reused 570
Receiving objects: 100% (600/600), 249.86 KiB | 0 bytes/s, done.
Resolving deltas: 100% (240/240), done.
Checking connectivity... done.
[Desktop]$ cd scalautils
[scalautils]$ sbt publishLocal
[info] Loading project definition from /Users/brandl/Desktop/scalautils/project
[info] Updating {file:/Users/brandl/Desktop/scalautils/project/}scalautils-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to scalautils (in build file:/Users/brandl/Desktop/scalautils/)
[info] Updating {file:/Users/brandl/Desktop/scalautils/}scalautils...
[info] Packaging /Users/brandl/Desktop/scalautils/target/scala-2.11/scalautils_2.11-0.1-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Wrote /Users/brandl/Desktop/scalautils/target/scala-2.11/scalautils_2.11-0.1-SNAPSHOT.pom
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] :: delivering :: de.mpicbg.scicomp#scalautils_2.11;0.1-SNAPSHOT :: 0.1-SNAPSHOT :: integration :: Fri Dec 11 11:16:14 CET 2015
[info] delivering ivy file to /Users/brandl/Desktop/scalautils/target/scala-2.11/ivy-0.1-SNAPSHOT.xml
[info] Main Scala API documentation to /Users/brandl/Desktop/scalautils/target/scala-2.11/api...
[info] Compiling 13 Scala sources to /Users/brandl/Desktop/scalautils/target/scala-2.11/classes...
model contains 33 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/brandl/Desktop/scalautils/target/scala-2.11/scalautils_2.11-0.1-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Packaging /Users/brandl/Desktop/scalautils/target/scala-2.11/scalautils_2.11-0.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] published scalautils_2.11 to /Users/brandl/.ivy2/local/de.mpicbg.scicomp/scalautils_2.11/0.1-SNAPSHOT/poms/scalautils_2.11.pom
[info] published scalautils_2.11 to /Users/brandl/.ivy2/local/de.mpicbg.scicomp/scalautils_2.11/0.1-SNAPSHOT/jars/scalautils_2.11.jar
[info] published scalautils_2.11 to /Users/brandl/.ivy2/local/de.mpicbg.scicomp/scalautils_2.11/0.1-SNAPSHOT/srcs/scalautils_2.11-sources.jar
[info] published scalautils_2.11 to /Users/brandl/.ivy2/local/de.mpicbg.scicomp/scalautils_2.11/0.1-SNAPSHOT/docs/scalautils_2.11-javadoc.jar
[info] published ivy to /Users/brandl/.ivy2/local/de.mpicbg.scicomp/scalautils_2.11/0.1-SNAPSHOT/ivys/ivy.xml
[success] Total time: 24 s, completed Dec 11, 2015 11:16:37 AM
[scalautils]$ amm
Loading...
Welcome to the Ammonite Repl 0.5.1
(Scala 2.11.7 Java 1.8.0_65)
@ load.ivy("de.mpicbg.scicomp" %% "scalautils" % "0.1-SNAPSHOT")
:: loading settings :: url = jar:file:/Users/brandl/bin/amm!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: de.mpicbg.scicomp#scalautils_2.11-caller;working
confs: [default]
found de.mpicbg.scicomp#scalautils_2.11;0.1-SNAPSHOT in local
downloading /Users/brandl/.ivy2/local/de.mpicbg.scicomp/scalautils_2.11/0.1-SNAPSHOT/jars/scalautils_2.11.jar ...
[SUCCESSFUL ] de.mpicbg.scicomp#scalautils_2.11;0.1-SNAPSHOT!scalautils_2.11.jar (7ms)
@ import better.files.File
Compilation Failed
Main.scala:33: not found: value better
import better.files.File
^
I've tried 3 machines (macos, ubuntu, centos) and it's always shows the same error pattern.
The text was updated successfully, but these errors were encountered:
holgerbrandl
changed the title
load.ivy fails to resolve pom
load.ivy fails to resolve transitive dependencies for locally published artifacts
Dec 11, 2015
It seems that this is not only an issue with items that were published locally, but occurs with anything that has ever been cached. The following gist has examples with the caches in various states. The only cases that work are the ones in which there is nothing in the ivy cache.
Using the latest 0.5.1 amm, dependency resolution for locally deployed artifacts does not seem to resolve sub-dependcies. Here's a SSCE
And this is a run protocol
I've tried 3 machines (macos, ubuntu, centos) and it's always shows the same error pattern.
The text was updated successfully, but these errors were encountered: