【发布时间】:2021-12-22 23:40:39
【问题描述】:
我正在尝试将 MATSim 与 Scala 和 SBT 一起使用。但是,我不能在没有编译错误的情况下添加依赖项。 MATSim 使用 Maven,但我想将它添加到我的 SBT 项目中。这是我的 build.sbt。
name := "matsim-console"
version := "0.1"
scalaVersion := "2.13.7"
lazy val matsimVersion = "13.0"
resolvers += "osgeo" at "https://repo.osgeo.org/repository/release/"
resolvers += "matsim" at "https://repo.matsim.org/repository/matsim"
resolvers += "jogl" at "https://dl.bintray.com/matsim/matsim/"
resolvers += Resolver.url("jogl1", url("https://mvnrepository.com/artifact/"))( Patterns("[organisation]/[module]/[revision]/[artifact].[ext]") )
lazy val proj = (project in file("."))
.settings(
libraryDependencies += "org.jogamp.jogl" % "jogl-all" % "2.4.0-matsim-1",
libraryDependencies += "org.jogamp.gluegen" % "gluegen-rt" % "2.3.2",
libraryDependencies += "org.matsim" % "matsim" % matsimVersion,
libraryDependencies += "org.matsim.contrib" % "vsp" % matsimVersion,
)
1- 为什么我需要将jog-all和gluegen-rt的依赖添加到我的Scala项目中? SBT 不应该导入 MATSim 及其所有依赖项吗?
2- 为什么最后一个依赖项不起作用?我收到此错误:
[error] stack trace is suppressed; run last update for the full output
[error] (update) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-solaris-amd64.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-solaris-amd64.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-android-armv6.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-android-armv6.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-linux-armv6.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-linux-armv6.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-solaris-i586.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-solaris-i586.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-android-armv6.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-android-armv6.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-linux-armv6hf.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-linux-armv6hf.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-linux-armv6.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-linux-armv6.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-linux-armv6hf.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-linux-armv6hf.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-android-aarch64.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-android-aarch64.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-solaris-i586.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-solaris-i586.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-android-aarch64.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/jogl/jogl-all/2.4.0-matsim-1/jogl-all-2.4.0-matsim-1-natives-android-aarch64.jar
[error] https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-solaris-amd64.jar: not found: https://repo.matsim.org/repository/matsim/org/jogamp/gluegen/gluegen-rt/2.4.0-matsim-1/gluegen-rt-2.4.0-matsim-1-natives-solaris-amd64.jar
【问题讨论】: