When creating a Maven-based project/module in IDEA you can click "Add archetype". Where are these new archetype values stored? I looked in my ~/.m2/repository but I don't think that's it…
Bonus question: what are the best practices around "Add archetype"? Just curious. I'm prone to skipping this in IDEA and just using mvn from the command line.
The metadata about an archetype is stored in the archetype-metadata. xml file located in the directory META-INF/maven of its JAR file, see the reference documentation. The metadata file stores the additional properties, with corresponding default values. It also stores the project's generated files in filesets.
new Project -> Select Maven -> Select the checkbox "create from archetype" Click on Add Archetype button and fill the GroupId, Artifact Id, and version on the "Add Archetype" dialog box.
Create a new project with Maven archetype Launch the New Project wizard. If no project is currently opened in IntelliJ IDEA, click New Project on the welcome screen. Otherwise, select File | New | Project from the main menu. Select Maven Archetype from the options on the left.
To use custom Maven Archetypes, you had to add external Maven Archetypes manually. This plugin for IntelliJ IDEA allows you to define a list of external Maven Archetype Catalog files. Those files are fetched and the containing Maven Archetypes are made available in IntelliJ IDEA when creating new Maven projects.
The information about added archetypes are stored in the file
Linux: ~/.IntelliJIdea10/system/Maven/Indices/UserArchetypes.xml
Mac: ~/Library/Caches/IntelliJIdea12/Maven/Indices/UserArchetypes.xml
You can edit this file directly. You need to restart IntelliJ after editing this file. There is no other way at this point in time to modify this information, see issue http://youtrack.jetbrains.net/issue/IDEA-60985
The archetype plugins will be downloaded to your local repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With