There are several ways of packaging in maven
This article mainly introduces several ways of packaging in maven, which can be used for reference. I hope you can learn a lot after reading this article. Let's take a look at it.
Three packaging modes of maven
Pom is a maven dependent file
Jar is the package of ordinary java projects.
War is the package of java web projects.
Pom: typed out can be used as a maven dependency for other projects. Add the pom,An of Project B to Project An and you can use the classes in B. Used in parent projects or aggregation projects. Used for version control of jar packages.
Jar package: it is usually necessary to refer to the general class when developing, and pack it into a jar package for easy storage and management. When you use certain features, you need to support these jar packages, and you need to import jar packages.
War package: after making a web website, deploy it to the server in a war package. The aim is to save resources and provide efficiency.
The meaning of < packaging > pom < / packaging > in maven project
Package type of the project: pom, jar, war
Packing defaults to jar type
Pom-> parent types are all pom types
Jar-> internal invocation or used as a service
War-> projects to be deployed
Thank you for reading this article carefully. I hope the article "several packaging ways in maven" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!