zoukankan      html  css  js  c++  java
  • Maven命令行使用:mvn clean compile(编译)

    先把命令行切换到Maven项目的根目录,比如:/d/xxxwork/java/maven-test,然后执行命令:

     mvn clean compile

    执行结果如下:

    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building rtp-front 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rtp-front ---
    [INFO] Deleting D:xxxworkJavamaven-test	arget
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rtp-front ---
    [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rtp-front ---
    [INFO] Changes detected - recompiling the module!
    [WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent!
    [INFO] Compiling 13 source files to D:CtripWorkJavamaven-test	argetclasses
    [WARNING] /D:/xxxwork/Java/maven-test/src/main/java/ReadOnly.java: 某些输入文件使用了未经检查或不安全的操作。
    [WARNING] /D:/xxxwork/Java/maven-test/src/main/java/ReadOnly.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 11.500 s
    [INFO] Finished at: 2016-11-14T15:15:13+08:00
    [INFO] Final Memory: 13M/76M
    [INFO] ------------------------------------------------------------------------

     执行顺序:

    1、使用清理插件:maven-clean-plugin:2.5执行清理删除已有target目录(版本2.5);

    2、使用资源插件:maven-resources-plugin:2.6执行资源文件的复制等(版本2.6);

    3、使用编译插件:maven-compiler-plugin:3.1编译所有源文件生成class文件至targetclasses目录下(版本3.1);

    4、整个编译过程完成。

  • 相关阅读:
    繁体解决方案一,ASP,JSP,PHP,DotNet任何开发通用
    18.观察者模式(Observer Pattern)
    存储过程小技巧(2)从动态查询SQL中返回值给变量
    DotNet学习
    询问:有没有用C#写的C/S模式下的网页编辑工具
    dotNet繁体解决方案
    svn感叹号大全
    svn中出现红色感叹号
    Varnish配置,Error 503解决之道
    varnish清除缓存的方法
  • 原文地址:https://www.cnblogs.com/frankyou/p/6062053.html
Copyright © 2011-2022 走看看