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 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.
And in Windows (7) you'll find them here: C:\Users\<username>\.IdeaI<versionid>\system\Maven\Indices\UserArchetypes.xml
In Windows 10 (2020):
Looks like newer versions of IntelliJ have switched to AppData folder.
C:\Users\<username>\AppData\Local\JetBrains\IdealC<version>\Maven\Indices
In Windows 10 (Older versions):
C:\Users\<username>\.IntelliJIdea<version>\system\Maven\Indices
intelliJ OSX: (vers. 2020.1)
cd ~/Library/Caches/JetBrains/IntelliJIdea2020.1/Maven/Indices/
精彩评论