什么是"pom"?包装在行家? [英] What is "pom" packaging in maven?

查看:150
本文介绍了什么是"pom"?包装在行家?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为我提供了一个maven项目,以进行编译并将其部署在tomcat服务器上.今天以前我从未使用过Maven,但我已经在Google上进行了很多搜索.看来此项目中的顶级pom.xml文件的打包类型设置为pom.

mvn install之后,我应该怎么做才能部署此应用程序?我原本希望能够在某处或某处找到war文件,但是我想我在错误的位置寻找或缺少一步.

解决方案

pom基本上是子模块的容器,每个子模块由与pom.xml在同一目录中并带有pom包装的子目录表示. >

在某些地方,嵌套在项目结构中,您会发现带有war包装的工件(模块). Maven通常将所有内容构建到每个模块的/target子目录中.因此,在mvn install之后,请查看具有war包装的模块中的target子目录.

当然:

$ find . -iname "*.war"

同样有效;-).

I was given a maven project to compile and get deployed on a tomcat server. I have never used maven before today, but I have been googling quite a bit. It seems like the top level pom.xml files in this project have the packaging type set as pom.

What am I supposed to do after mvn install to get this application deployed? I was expecting to be able to find a war file somewhere or something, but I guess I am looking in the wrong place or missing a step.

解决方案

pom is basically a container of submodules, each submodule is represented by a subdirectory in the same directory as pom.xml with pom packaging.

Somewhere, nested within the project structure you will find artifacts (modules) with war packaging. Maven generally builds everything into /target subdirectories of each module. So after mvn install look into target subdirectory in a module with war packaging.

Of course:

$ find . -iname "*.war"

works equally well ;-).

这篇关于什么是"pom"?包装在行家?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆