There are many reasons why you may want to make a pom file available as an artifact. One reason is the aggregate project. An aggregate project must have the
pom packaging type. Another reason could be a pom, which can be imported as a dependency. Whatever the reason, Maven provides support to build a pom project.
<groupId>com.packt.cookbook</groupId> <artifactId>simple-pom-project</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <description>Simple pom project</description>
mvn clean package
Note that only the
clean goal is run.
mvn clean install