What is "pom" packaging in maven?
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 packaging is simply a specification that states the primary artifact is not a war or jar, but the pom.xml itself.
Often it is used in conjunction with "modules" which are typically contained in sub-directories of the project in question; however, it may also be used in certain scenarios where no primary binary was meant to be built, all the other important artifacts have been declared as secondary artifacts
Think of a "documentation" project, the primary artifact might be a PDF, but it's already built, and the work to declare it as a secondary artifact might be desired over the configuration to tell maven how to build a PDF that doesn't need compiled.