我正在嘗試關注hello-samza的基本設置,無法通過「構建Samza Job Package」。由於按規定我正在自己的最新我嘗試運行gradle這個的:hello-samza demo not compiling
$ ./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(我以前的環境)和OS X(我當前的環境)之間的區別?
考慮添加標籤爲您的操作系統,因爲它是在非Windows: 要清楚,我在build目錄(
.../hello-samza
)如下改變pom.xml
。 – sixtytrees完成。謝謝@sixtytrees – RockyMountainHigh