问题描述
我得到了一个 maven 项目来编译并部署在 tomcat 服务器上.我在今天之前从未使用过 maven,但我一直在谷歌上搜索很多.看起来这个项目中的顶级 pom.xml
文件的打包类型设置为 pom
.
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
.
在 mvn install
之后我应该做什么来部署这个应用程序?我希望能够在某处或某处找到 war
文件,但我想我找错了地方或遗漏了一步.
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
基本上是一个子模块的容器,每个子模块由一个与 pom.xml 同目录的子目录表示
与 pom
包装.
pom
is basically a container of submodules, each submodule is represented by a subdirectory in the same directory as pom.xml
with pom
packaging.
在项目结构中嵌套的某处,您会发现带有 war
包装的工件(模块).Maven 通常将所有内容构建到每个模块的 /target
子目录中.因此,在 mvn install
之后,查看带有 war
包装的模块中的 target
子目录.
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.
当然:
$ find . -iname "*.war"
同样有效;-)
这篇关于什么是“pom"?用maven打包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!