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