标签:为我 sts existing 命令执行 结果 com 配置 test 步骤
一. mvn -v 查看maven的版本信息
二 .与maven构建的项目相关的命令
1. clean (使用最多)
*. 清理(删掉)项目编译文件夹target 的命令
*. 注意: clean命令只是单纯的删除target 文件夹, 并不会把本地仓库中的成果物一并删除
2. compile
*. 用来将maven项目进行编译 比如: .java -- 》 .class
注意:如报错可以将 mvn complie
命令替换为 mvn compiler:compile
命令执行
3. test 命令
*. 对我们的项目进行编译
*. 会执行项目中test目录下以 xxxxTest.java 结尾的所有测试代码
说明: 该命令多用于单元测试
4. package (使用最多)
*用来对我们的项目进行打包, 成果物: jar war / 所在目录: 项目target 文件夹下
5. install
*. 安装的意思
*. 它会将项目编译, 打包后的成果物, 存放到本地仓库中
特别注意: 上述五个命令均与maven项目有关, maven项目根目录下必有pom.xml, 执行命令时必须在pom.xml 所在的文件夹
下执行, 才能正确处理。
其他:
[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:\xxxwork\Java\maven-test\target [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:\CtripWork\Java\maven-test\target\classes [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] --- maven-resources-plugin:2.6:testResources (default-testResources) @ rtp-front --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory D:\xxxwork\Java\maven-test\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ rtp-front --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ rtp-front --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ rtp-front --- [INFO] Building jar: D:\xxxwork\Java\maven-test\target\rtp-front-1.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.284 s [INFO] Finished at: 2016-11-14T15:36:55+08:00 [INFO] Final Memory: 15M/77M [INFO] ------------------------------------------------------------------------
https://www.cnblogs.com/qing-gee/p/11124359.html
标签:为我 sts existing 命令执行 结果 com 配置 test 步骤
原文地址:https://www.cnblogs.com/wxwgk/p/13403126.html