频道栏目
首页 > 资讯 > 其他综合 > 正文

Maven常用指令官方解读

18-07-17        来源:[db:作者]  
收藏   我要投稿

Maven使用时,对部分常用指令的区分不是很清楚,如compileinstall deploy的具体区别,故摘录其官方文档内容,并附注个人理解如下:

Maven Phases

·validate: validate the project is correct and all necessaryinformation is available

·从配置文件、目录结构等方面校验项目必要信息的正确性,不编译

·compile: compile the source code of the project

·编译源码,java--> class

·test: test the compiled source code using a suitableunit testing framework. These tests should not require the code be packaged ordeployed

·针对项目中使用unit test的测试套件执行测试,这里只有不依赖于发布的单元测试被执行

·package: take the compiled code and package it in itsdistributable format, such as a JAR.

·打包,将编译后的代码打包成发布格式,比如Jar,值得注意的是,这里只是将打包文件放到当前项目的target下,其他项目还无法引用

·integration-test: process and deploy the package if necessary intoan environment where integration tests can be run

·大概是打包后的测试,没用过

·verify: run any checks to verify the package is valid andmeets quality criteria

·包验证及质量测试,没用过,也不清楚如何定义验证需求和过程

·install: install the package into the local repository,for use as a dependency in other projects locally

·将打包后的包复制到本地仓库,这样其他项目就能正常引用了

·deploy: done in an integration or release environment,copies the final package to the remote repository for sharing with otherdevelopers and projects.

·与install类似,发布最终版本到远端仓库,顾名思义:发布

·clean: cleans up artifacts created by prior builds

·site: generates site documentation for this project

源文档

总结下来:

·compile是源码到字节码的编译;

·package是打包到项目下;

·install和deploy分别是发布到本地仓库和远端仓库。

相关TAG标签
上一篇:Dijkatra算法解析
下一篇:一键启动Zookeeper教程
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站