为了账号安全,请及时绑定邮箱和手机立即绑定

正在回答

4 回答

apache-maven-3.3.3\conf文件夹下有个setting.xml在里面加入如下代码

<mirror>   
        <id>Central</id>   
        <url>http://repo1.maven.org/maven2</url>   
        <mirrorOf>central</mirrorOf>   
</mirror>
最多关了重新运行搞定
0 回复 有任何疑惑可以回复我~

下面是错误信息,截图上传变模糊了

F:\>cd F:\mavenCode\maven01


F:\mavenCode\maven01>mvn compile;

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building maven-model01 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.124 s

[INFO] Finished at: 2017-10-19T17:35:37+08:00

[INFO] Final Memory: 6M/77M

[INFO] ------------------------------------------------------------------------

[ERROR] Unknown lifecycle phase "compile;". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException


F:\mavenCode\maven01>


1 回复 有任何疑惑可以回复我~

//img2.sycdn.imooc.com/59e8724c0001c59509930519.jpg

这张图清晰点,帮忙看看,谢谢

0 回复 有任何疑惑可以回复我~

那张黑色的图太模糊了,看错误信息,说要你指定一个明确的有效的goal,你是不是打错了compile?

0 回复 有任何疑惑可以回复我~
#1

慕粉1410068849 提问者

我把错误信息复制在下面了,再帮忙看看,谢谢
2017-10-19 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
项目管理利器——maven
  • 参与学习       173090    人
  • 解答问题       742    个

使用maven来构建和管理Java项目,从环境配置,到maven核心知识

进入课程

mvn compile报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信