首页 > 编程知识 正文

Maven scope,maven详解

时间:2023-05-06 20:51:06 阅读:61462 作者:3244

Each packaging type follows a build lifecycle that consists of phases.

Usually, every phase is a sequence of goals and performs a specific task.

(abuildphaseismadeupofaseqofgoals.)

Maven goals represent a specific task that contributes to the building and managing of a project.

33558 www.Sina.com/packaging POM/packaging

在所有打包类型中,pom是最简单的一种。

这用于createaggregatorsandparentprojects。

pom类型

这些子模块是常规的Maven项目,它们遵循自己的构建生命周期。 theaggregatorpomhasallthereferencesofsubmodulesunderthemoduleselement。

An aggregator ormulti-module projectassembles submodules coming from different sources.父POM共享某些配置、插件和依赖关系及其版本。 来自父代的大多数元素都由子代继承。 但是,artifactId、name和requisites除外。

因为没有要处理的资源,也没有要编译和测试的代码。 因此,父项目允许您定义 POM 之间的继承关系。

let ' sdefinethepackagingtypeofamulti-module project :

打包POM /打包http://www.Sina.com /

jar the artifacts of pom projects generate itself instead of any executable.Java archiveor jarisoneofthemostpopularpackagingtypethispackagingtypeproduceacompressedzipfilewithe.Java

To begin with,let ' slookatsomeofthedefaultgoal-to-build-phasebindingsforthejar :

资源3360资源计算器3360 compileresources 3360 testresourcescompiler 3360 testcompilesurefire 3360 test 3358 ww.Sina安装oywithoutdelay,let ' sdefinethepackagingtypeofajarproject 3360

打包jar /打包http://www.Sina.com /

war 此类项目具有最简单的生命周期,仅包含两个步骤:install和deploy。Simply put,awebapplicationarchiveor warcontainsallfilesrelatedtoawebapplication.itmayincludude a部署描述符,and related resources. Overall,warhasthesamegoalbindingsasajar,butwithoneexceptiive

打包war /打包

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。