StormCrawler maven包装错误

时间:2018-03-05 14:13:16

标签: maven web-crawler stormcrawler

我正在尝试设置并运行Storm Crawler并关注http://digitalpebble.blogspot.co.uk/2017/04/crawl-dynamic-content-with-selenium-and.html博文。

StormCrawler的资源和配置集在我的计算机上/ Users / deividas / git / selenium-tutorial

运行命令“mvn clean package”后弹出以下错误:

“无法解决项目com.digitalpebble.crawl的依赖关系:selenium-tutorial:jar:1.0-SNAPSHOT:无法找到工件ring-cors:ring-cors:jar:0.1.5 in central({{3} })“

我该如何解决这个问题?

提前致谢!

1 个答案:

答案 0 :(得分:2)

不确定为什么在您的情况下不会下载此内容。我删除了本地缓存并运行了下面的命令

    mvn clean package | grep cors

    Downloading: https://repo.maven.apache.org/maven2/ring-cors/ring-cors/0.1.5/ring-cors-0.1.5.pom
    Downloading: https://clojars.org/repo/ring-cors/ring-cors/0.1.5/ring-cors-0.1.5.pom
    Downloaded: https://clojars.org/repo/ring-cors/ring-cors/0.1.5/ring-cors-0.1.5.pom (4 KB at 5.0 KB/sec)
    Downloading: https://repo.maven.apache.org/maven2/ring-cors/ring-cors/0.1.5/ring-cors-0.1.5.jar
    Downloading: https://clojars.org/repo/ring-cors/ring-cors/0.1.5/ring-cors-0.1.5.jar
    Downloaded: https://clojars.org/repo/ring-cors/ring-cors/0.1.5/ring-cors-0.1.5.jar (6 KB at 24.4 KB/sec)

如您所见,它从clojars.org下载

此依赖关系继承自storm-core

 mvn dependency:tree | grep -C 20 cors

[INFO] com.digitalpebble.crawl:selenium-tutorial:jar:1.0-SNAPSHOT
[INFO] +- org.apache.storm:storm-core:jar:1.1.0:provided
[INFO] |  +- com.esotericsoftware:kryo:jar:3.0.3:provided
[INFO] |  |  +- com.esotericsoftware:reflectasm:jar:1.10.1:provided
[INFO] |  |  |  \- org.ow2.asm:asm:jar:5.0.3:provided
[INFO] |  |  +- com.esotericsoftware:minlog:jar:1.3.0:provided
[INFO] |  |  \- org.objenesis:objenesis:jar:2.1:provided
[INFO] |  +- org.clojure:clojure:jar:1.7.0:provided
[INFO] |  +- ring-cors:ring-cors:jar:0.1.5:provided

如果查看storm pom,可以看到clojar repo已定义。作为解决方法,您可以将存储库部分复制到项目的pom中。希望jar随后会被下载。

<repositories>
    <repository>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <id>clojars</id>
        <url>https://clojars.org/repo/</url>
    </repository>
</repositories>