I am currently updating a maven archetype for our project, and would like to reduce the quantity of information that users will have to give when using this archetype. The groupId will always be the same, for instance.
So, is it possible to define a default value for groupId in a Maven archetype ?
If you are working in a fixed organisation where this value will not change on a per project basis: Use a parent POM. Distribute it through your repository (you use some kind of central repository, even if it is only a network drive, do you?).
Inclusion in project
Parent POM
So no group id in the project POM, the one from the parent POM will be used. Of course you are replacing the group id with the inclusion of the parent POM but that is helpful as you can further customize Maven to your organisation’s specific needs there.
If you use a build and test server you can even set the parent’s
versionto-SNAPSHOTto automatically distribute changes in the parent POM to the project POMs.