mikera
mikera

Reputation: 106391

Factoring out common elements of Maven pom.xml

I have a number of Maven pom.xml files in various projects that contain a lot of similar configuration (license declarations, plugins, defintion of resource folders etc.)

What is the best approach to factor out these common elements into a parent pom and have them available for re-use?

I'm particularly interested in:

Upvotes: 2

Views: 414

Answers (1)

messivanio
messivanio

Reputation: 2311

For enterprise projects, you can use Maven to deploy your parent pom on a artifact repository like Sonatype Nexus. But this can be cumbersome for just personal projects.

Everything that needs to be shared must be in parent pom.

Upvotes: 1

Related Questions