Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are added archetypes stored in IntelliJ?

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.

like image 455
airgray Avatar asked Dec 05 '10 22:12

airgray


People also ask

Where are Maven archetypes stored?

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.

How do I add an archetype to an existing project in IntelliJ?

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.

How do I change my archetype in IntelliJ?

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.

What is archetype in Maven IntelliJ?

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.


1 Answers

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.

like image 64
Bruno Ranschaert Avatar answered Oct 11 '22 12:10

Bruno Ranschaert