uokadaの見逃し三振は嫌いです

ここで述べられていることは私の個人的な意見に基づくものであり、私が所属する組織には一切の関係はありません。

メモ書き, Mavenでno dependency information availableエラーが出来た時の対処法

% ./mvnw clean compile package
/path/to/presto-sample-udf
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building presto-sample-udf 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.jetty:jetty-alpn-java-client:jar:9.4.6.v20170531 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.108 s
[INFO] Finished at: 2018-02-11T14:14:08+09:00
[INFO] Final Memory: 15M/50M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project presto-sample-udf: Could not resolve dependencies for project io.github.yuokada:presto-sample-udf:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: com.sun:tools:jar:1.8, org.eclipse.jetty:jetty-alpn-java-client:jar:9.4.6.v20170531: Could not find artifact com.sun:tools:jar:1.8 at specified path /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/../lib/tools.jar -> [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

JDK9でビルドでしていたのが原因でエラーになっていたみたい。 Macだとこんな感じでJDK8を使うように環境変数を設定してやると上手くうごくようになる。

export JAVA_HOME=`/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java_home -v "1.8"`