The solution to the slowness of idea when creating a new maven project
Reason
According to the nature of maven archetype, IDEA actually executes the mvn archetype:generate command, which needs to specify an archetype-catalog.xml file when it is executed.
The parameter to this command is-DarchetypeCatalog. Available values are: remote,internal, local, etc., which is used to specify where to get the archetype-catalog.xml file.
The default is remote, that is, from
Download the archetype-catalog.xml file in the http://repo1.maven.org/maven2/archetype-catalog.xml path.
The http://repo1.maven.org/maven2/archetype-catalog.xml file is about 3-4m, and the download speed is very slow, causing the creation process to get stuck.
Solution method
1. Add a property in the following interface, archetypeCatalog = internal
two。 If you specify-DarchetypeCatalog as internal, you can use maven's default archetype-catalog.xml instead of remote download.
a. Click Configue-> Settings
b. The VM Options configuration is as follows-DarchetypeCatalog=internal:
PS: notice the gray word in the upper right corner: for default project, not for
Current project
3. When the mvn command creates a project
Mvn archetype:generate-DarchetypeCatalog=internal
The above idea new maven project when the slow solution is the editor to share with you all the content, I hope to give you a reference, but also hope you support more.