我嘗試使用SBT包括JEP(https://mvnrepository.com/artifact/jep/jep/2.24)這個階項目的構建:https://github.com/shadaj/scalapySBT沒有找到類管理依賴
所以,而不是通過非託管依賴手動構建JEP,我想將其作爲託管依賴項包含在內。因此,我只是包括:
resolvers += "jep" at "https://mvnrepository.com/artifact/"
libraryDependencies += "jep" % "jep" % "2.24"
在build.sbt
具備.jar是越來越下載幷包含在我.ivy2文件夾,但編譯時
,SBT似乎無法找到它:
> compile
[info] Updating {file:/C:/scalapy_indp/scalapy/}scalapy...
[info] Resolving org.sonatype.oss#oss-parent;9 ...
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.1/scala-library-2.12.1.jar ...
[info] [SUCCESSFUL ] org.scala-lang#scala-library;2.12.1!scala-library.jar (1406ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.12.1/scala-reflect-2.12.1.jar ...
[info] [SUCCESSFUL ] org.scala-lang#scala-reflect;2.12.1!scala-reflect.jar (1156ms)
[info] downloading https://repo1.maven.org/maven2/jep/jep/2.24/jep-2.24.jar ...
[info] [SUCCESSFUL ] jep#jep;2.24!jep.jar (188ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.1/scala-compiler-2.12.1.jar ...
[info] [SUCCESSFUL ] org.scala-lang#scala-compiler;2.12.1!scala-compiler.jar (2469ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.12/1.0.6/scala-xml_2.12-1.0.6.jar ...
[info] [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.12;1.0.6!scala-xml_2.12.jar(bundle) (360ms)
[info] downloading https://repo1.maven.org/maven2/jline/jline/2.14.1/jline-2.14.1.jar ...
[info] [SUCCESSFUL ] jline#jline;2.14.1!jline.jar (250ms)
[info] Done updating.
[info] Compiling 16 Scala sources to C:\scalapy_indp\scalapy\target\scala-2.12\classes...
[info] 'compiler-interface' not yet compiled for Scala 2.12.1. Compiling...
[info] Compilation completed in 15.285 s
[error] C:\scalapy_indp\scalapy\src\gen\scala\me\shadaj\scalapy\py\ObjectTupleReaders.scala:2: not found: object jep
[error] import jep.Jep
[error] ^
錯誤當然會持續到代碼中的每一個Jep外觀。我只是試圖讓這個運行,而不必使用非託管的依賴關係,即使它與平臺無關。手動構建JEP似乎是與平臺相關的關於其正在創建的文件:
如果生成成功,它將創建一個目錄JEP /建造,這將 包含jep.jar和JEP的編譯的C庫,通常根據您的平臺命名爲 jep.so或jep.dll。
看到https://github.com/mrj0/jep/wiki/Getting-Started
哇,你是絕對正確的,我想。我沒有檢查名字。我只是在想,在Maven倉庫中的項目是一箇舊版本,但功能就足夠了。無論如何,非常感謝你的澄清 – TheDude