Packaging method: JAR WAR POM

Introduction of three packaging methods

The essence of packaging is compression, and jar packages and war packages are zip packages, which is what they have in common.
Use the command java -jar xxx.jar to execute.

JAR

Jar is the method commonly used by third-party libraries before Maven came out; it
is available for invocation in the form of a zip package.
Use the command java -jar xxx.jar to execute.

WAR

Commonly used in java web projects;
war package can be used in the form of zip package, can also be used in decompressed form (usually the decompressed war package).
The general web server recognizes and executes it, but it can also be executed with java -jar xxx.war, provided that you have configured the main function entry.

POM

Typed out can be used as a maven dependency of other projects. Used for version control of jar packages.

references

https://www.cnblogs.com/yw-ah/p/9857050.html The difference between jar, war and pom in Maven
https://www.zhihu.com/question/273590151 The difference between jar, pom and war in Maven where is it?
https://www.zhihu.com/search?type=content&q=jar%20war War, the similarities and differences between the two packages of Jar

Guess you like

Origin blog.csdn.net/u013617791/article/details/104792119