Maven編譯elasticsearch-analysis-ik報錯
阿新 • • 發佈:2018-12-11
Linux7.4下使用Maven編譯打包elasticsearch-analysis-ik-1.8.1.zip,執行:mvn package時報錯,借"u012348345"部落格圖一用:
執行
unzip elasticsearch-analysis-ik-1.8.1.zip -d ik
cd ik
mvn package
果斷報錯:
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/elasticsearch/ik). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
報錯原因:
執行mvn package的目錄缺少pom.xml檔案
分析(報錯是必然的):
上圖教程中
unzip elasticsearch-analysis-ik-1.8.1.zip -d ik
執行後目錄如下:
/../ik/elasticsearch-analysis-ik-1.8.1
cd ik
並沒有進入elasticsearch-analysis-ik-1.8.1目錄下
ll
elasticsearch-analysis-ik-1.8.1(僅此資料夾)
需要進入elasticsearch-analysis-ik-1.8.1目錄再mvn package
實操:
unzip elasticsearch-analysis-ik-1.8.1.zip cd elasticsearch-analysis-ik-1.8.1 mvn package