hello-samza演示没有编译

时间:2016-08-11 22:56:23

标签: java macos maven apache-samza

我正在尝试遵循hello-samza基本设置,无法通过“构建Samza作业包”。当我正在运行最新版本时,我尝试按指定运行gradle:

$ ./gradlew publishToMavenLocal

FAILURE: Build failed with an exception.

* What went wrong:
Task 'publishToMavenLocal' not found in root project 'hello-samza'.

* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with                                                                              --info                                                                                           or                                                                                             --debug                                                                                          option to get more log output.

然后我看到引导程序实际运行了,所以我想我可以转到下一步:

$ mvn clean package

在一堆输出后,最终失败了:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.819 s
[INFO] Finished at: 2016-08-11T16:51:20-06:00
[INFO] Final Memory: 11M/151M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hello-samza: Could not resolve dependencies for project org.apache.samza:hello-samza:jar:0.11.0: Failed to collect dependencies at org.apache.samza:samza-api:jar:0.11.0-SNAPSHOT: Failed to read artifact descriptor for org.apache.samza:samza-api:jar:0.11.0-SNAPSHOT: Could not transfer artifact org.apache.samza:samza-api:pom:0.11.0-SNAPSHOT from/to scala-tools.org (https://oss.sonatype.org/content/groups/scala-tools): Access denied to: https://oss.sonatype.org/content/groups/scala-tools/org/apache/samza/samza-api/0.11.0-SNAPSHOT/samza-api-0.11.0-SNAPSHOT.pom , ReasonPhrase:Forbidden. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

然后我用-X开关运行它并看到一堆这些错误:

org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata org.apache.samza:samza-kafka_2.10:0.11.0-SNAPSHOT/maven-metadata.xml from/to scala-tools.org (https://oss.sonatype.org/content/groups/scala-tools): Access denied to: https://oss.sonatype.org/content/groups/scala-tools/org/apache/samza/samza-kafka_2.10/0.11.0-SNAPSHOT/maven-metadata.xml , ReasonPhrase:Forbidden.

我不确定如何从这里开始。我知道我已经设法让以前的版本适合我。它可能与linux(我之前的env)和OS X(我当前的env)之间的区别有关吗?

2 个答案:

答案 0 :(得分:0)

所以,感谢dev@samza.apache.org上一位非常有帮助的用户,他引导我更仔细地观察pom。我意识到分支“最新”指向samza版本0.11,我显然无法访问。

然后我检查了主人的pom,它指向10.1的当前稳定版本。通过回到主分支,我能够编译并继续前进。

答案 1 :(得分:0)

谢谢 - 使用0.10.1也适合我(在Mac 15.6上)。 为了清楚起见,我更改了构建目录(pom.xml)中的.../hello-samza,如下所示:

146c146
<     <samza.version>0.11.0-SNAPSHOT</samza.version>
---
>     <samza.version>0.10.1</samza.version>