Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that IDEA creates a Maven project that always appears to be loading

Shulou Source: shulou.com Published: 2022-06-02 06:06:51 09月18日 Update

Editor to share with you how to solve the problem that IDEA created a Maven project that has been shown to be loading. I hope you will get something after reading this article. Let's discuss it together.

IDEA creates a Maven project that always shows a summary of the problem prospects being loaded

Create a project

Idea has been parsing the maven project

For the newly created project, the following diagram has not been parsed successfully.

Strange problems that arise

If you have been waiting for parsing, it is possible to parse successfully, but if you clearly create a subproject under service, you will see in the maven list that the project is the root parent project, and the dependency of the parent project will not be passed, which leads to the need to solve the problem.

However, for the clean operation in your service parent project, the following figure will also clean up the service_oss for this child module accordingly.

Anyway, you'll think maven is weird.

Solution

To see if you have ever restricted the Internet against idea, this is why maven is so strange.

After the network restrictions are lifted, the newly created maven project can be parsed successfully immediately, and there will be no strange events.

Try to refer to the following scheme, which is not the reason for me here, so it leads to the failure of the following scheme

The second solution

The following sometimes occurs when creating a maven project with idea

Cause of occurrence

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, which downloads the archetype-catalog.xml file from 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

First of all, the project needs to be configured-DarchetypeCatalog=internal

When you create a project, add an item to the Properties property panel: archetypeCatalog=internal

After reading this article, I believe you have a certain understanding of "how to solve the problem that IDEA created the Maven project that has been shown to be loading". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!

Tags: Project project solution problem file success reason command solution time article network limitation no prospect parameter done that is attribute Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Redmi Shulou Technology Huawei Shulou Tech Info