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 ;-).

Java相关问答推荐

Java中如何根据Font.canDisplay方法对字符串进行分段

JavaFX如何在MeshView中修复多个立方体?

使用Spring Boot3.2和虚拟线程的并行服务调用

返回响应时,CamelCase命名约定不起作用

Java中不兼容的泛型类型

深度优先搜索实现:算法只向右搜索

try 使用预准备语句占位符获取信息时出现Try-With-Resources错误

从泛型枚举创建EnumMap

在不使用instanceof或强制转换的情况下从父类变量调用子类方法

如何从命令行编译包中的所有类?

如何在右击时 Select 新行?

为什么Instant没有从UTC转换为PostgreSQL的时区?

Java编译器是否进行了持续的折叠优化,以及如何进行判断?

使用Java线程进行并行编程

如何在 Android Studio 中删除 ImageView 和屏幕/父级边缘之间的额外空间?

ArrayAdapter 中何时使用构造函数一和构造函数二?

如何在 Java 函数式代码中使用泛型

如何在 Jenkinsfile 内转义 Maven 中的变量名称

枚举中的泛型用于复杂类型判断

如何在 IntelliJ 中获取 Visual Studio Code 的 Dark Modern Java colored颜色 语法