qq_41884972
柠檬水喝咸鱼
采纳率100%
2019-11-20 11:23

maven下载之后,在cmd输入命令,mvn报错

已采纳

maven下载之后,在cmd输入命令,mvn报错。已经配置好本地仓库和镜像。
错误截图

C:\Users\Administrator>mvn
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.056 s
[INFO] Finished at: 2019-11-20T11:13:44+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. 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/NoGoalSpecifiedException

C:\Users\Administrator>mvn -v
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T03:00:29+08:00)
Maven home: D:\soft\maven\apache-maven-3.6.1\bin\..
Java version: 1.8.0_121, vendor: Oracle Corporation, runtime: D:\jdk\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

3条回答

  • sinat_19671783 cap_jack_sp 2年前

    mvn后面跟指令呀,你是要打包,还是要编译,还是要查看maven的版本,或者配置一个默认的指令

    点赞 1 评论 复制链接分享
  • b100522 椎名小由奈 2年前

    pom.xml配置:

    <build>
        <defaultGoal>compile</defaultGoal>
    </build>
    
    点赞 评论 复制链接分享
  • liaoqing1999 liaoqing1999 4月前

    牛逼牛逼

    点赞 评论 复制链接分享