我正在运行Spark Notebook并且正在努力应对依赖性。服务器在Amazon VPC中运行,因此无法直接访问Internet。
为了加载依赖项,在S3存储桶中创建了一个repo,这很好用,得到所有POM和JAR,直到它到达
Installing the s3:// URLStreamHandler via
java.net.URL.setURLStreamHandlerFactory
Creating a new Ivy URLHandlerDispatcher to handle s3:// URLs
[info] :: resolving dependencies :: org.scala-lang#scala;2.10.4
[info] confs: [compile, test, runtime]
[info] Resolving default#ffx-analytics_2.10;1.1 ...
[info] found default#ffx-analytics_2.10;1.1 in s3-repo
[info] Resolving org.scala-lang#scala-library;2.10.4 ...
[info] found org.scala-lang#scala-library;2.10.4 in s3-repo
[info] [2.10.4] org.scala-lang#scala-library;2.10.4
[info] Resolving com.github.nscala-time#nscala-time_2.10;1.4.0 ...
[info] found com.github.nscala-time#nscala-time_2.10;1.4.0 in s3-repo
[info] Resolving joda-time#joda-time;2.4 ...
[info] found joda-time#joda-time;2.4 in s3-repo
[info] Resolving org.joda#joda-convert;1.2 ...
[info] found org.joda#joda-convert;1.2 in s3-repo
[info] Resolving ua_parser#ua-parser;1.3.1-SNAPSHOT ...
[info] found ua_parser#ua-parser;1.3.1-SNAPSHOT in s3-repo
[info] Resolving org.yaml#snakeyaml;1.10 ...
[info] found org.yaml#snakeyaml;1.10 in s3-repo
[info] Resolving commons-collections#commons-collections;3.2.1 ...
[info] Resolving org.apache.commons#commons-parent;9 ...
[info] Resolving org.apache#apache;4 ...
[error] Server access Error: Connection timed out url=https://repo1.maven.org/maven2/org/apache/apache/4/apache-4.jar
所以我尝试从另一台服务器(具有互联网访问权限)下载JAR,如下所示:
ubuntu@ip-10-126-49-161:~$ wget https://repo1.maven.org/maven2/org/apache/apache/4/apache-4.jar
--2015-09-07 00:37:42-- https://repo1.maven.org/maven2/org/apache/apache/4/apache-4.jar
Connecting to 172.16.100.11:8080... connected.
Proxy request sent, awaiting response... 404 Not Found
2015-09-07 00:37:45 ERROR 404: Not Found.
我无法在任何地方找到apache-4.jar。看看POM,它没有JAR。
任何提示都将不胜感激。
更新#1:
我尝试导入另一个导致类似路径的JAR:
[info] Resolving net.sf.opencsv#opencsv;2.0 ...
[info] found net.sf.opencsv#opencsv;2.0 in s3-repo
[info] Resolving commons-codec#commons-codec;1.10 ...
[info] Resolving org.apache.commons#commons-parent;35 ...
[info] Resolving org.apache#apache;15 ...
当我查看Apache 35的POM时,它将Apache 15列为父级。
这些父母似乎是一场真正的噩梦。希望这只是一些简单的事情,我需要打开才能使这一切工作。
答案 0 :(得分:1)
我在这里找到答案: https://theholyjava.wordpress.com/2011/01/26/using-ivy-with-pom-xml/
" Ivy忽略了父模块上的packaging = pom,并总是试图为它找到一个.jar,从而浪费宝贵的时间。解决方法是创建一个虚假的空.jar,例如通过echo“”> emptyJarToSatisfyIvy.jar&#34。