Building a pom project
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.
How to do it...
- Open a simple pom project (
simple-pom-project
). - Observe the
packaging
type:<groupId>com.packt.cookbook</groupId> <artifactId>simple-pom-project</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <description>Simple pom project</description>
- Build the project:
mvn clean package
Note that only the
clean
goal is run. - Run the following command:
mvn clean install
- Observe the output:
How it works...
The following are the default bindings for the pom
packaging type:
package: site:attach-descriptor
: This attaches a descriptor to the site report, if applicable...