Frequently Asked Questions
- What packaging should I use:
maven-archetypeorjar? What is the difference? -
maven-archetypepackaging is available since 2.0-alpha-1: it should be used instead ofjar, which was used for Old Archetype 1.0.x.Using
maven-archetypepackaging helps identifying archetypes in repositories and adds archetype related bindings to build lifecycle: seemaven-archetypepackaging documentation for more information. - How to generate a project from an archetype in a custom (potentially authenticated) repository?
-
The server/repository id used to download the catalog is
archetype: You have to define corresponding server configuration and repository insettings.xmlwith this id to generate a project based on the catalog In case of mirroring the mirror id of that mirror which matches repository idarchetypeorcentralis used for authentication. For resolving the actual archetype an artificial repository with id<archetype-artifactId>-repois used in case the underlying Archetype Catalog Item contained a repository (leveraging its URL). As fallback all regular remote repositories (as defined in thesettings.xml) are tried. - What is "Old Archetype 1.0.x"?
-
Old Archetype 1.0.x was using a
archetypeXML descriptor defined in/xsd/archetype-1.0.0.xsd: see old descriptor reference.Archetype is now using
archetype-descriptorXML descriptor defined in/xsd/archetype-descriptor-1.1.0.xsd: see Archetype descriptor reference.For compatibility, old archetypes can still be used to generate new projects, but archetypes should be updated to the new descriptor format: in the future, old format will be removed.
- How do I get files like
.gitignoreincluded into my archetype? -
First make sure you set
addDefaultExcludestofalsein themaven-resources-pluginso that the archetype-plugin gets to see these files.Then set
useDefaultExcludestofalsein themaven-archetype-plugin.



