Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

IDEA Clone Maven projects from Github to solve the problem of tree directory and Jar package dependency

Shulou Source: shulou.com Published: 2022-06-03 04:00:51 11月15日 Update

A problem that many people will encounter in development, when we use IDEA to check out the Maven project from Github (Java), we find that it can neither run nor compile, and the tree directory on the left is strange. Now let's talk about how to solve this problem.

IDEA works to be done before pull project from github or gitlab (under Windows operating system)

It is suggested that we should use the https method, refreshing and simple, and we still have to do a lot of work in the early stage of using SSH, which is not only troublesome, but also has problems occasionally.

In order to speed up the speed of github, modify the host file under the path C:\ Windows\ System32\ drivers\ etc to significantly accelerate the speed of pull and push. Add two lines at the end:

151.101.185.194 global-ssl.fastly.Net

192.30.253.113 github.com

1. Solve the problem that the tree directory on the left is not displayed.

Successful Clone project, and open the project, found that the left tree directory does not exist (this is an inevitable phenomenon), then do the following

1) close IDEA, delete the .idea in the project directory, and then open the project, as shown in the following figure

At this point, you can see that the tree directory on the left is displayed correctly.

2. Configure Project (if it is not configured, it is not a real Java project)

1) File- "Project S tructure, call up the configuration interface, and delete the module that exists in Modules first (the project checked out by default, the module is incomplete):

2) add the module again, click Add Content Root, and select the project:

Just click OK, and the Java project will be configured correctly at this time.

3. Configure Maven

At this time, there is still a problem with the Jar package dependency of the project. You need to further set Maven, menu View- > Tool Windows- > Maven Projects:

4. Start the project for the first time

At this time, the project is fully ready to start the project, OK!

Note:

If there is a redline solution under the IDEA class name: Filt-- Setting-- Editor-- Color Scheme-- Java, the default is Solarized, and Darcula is selected. It is a style problem.

On the web project development-related knowledge, you can see my video introduction: https://edu.51cto.com/course/21185.html, I hope to help you.

Tags: Project problem catalog configuration tree time module work development project significant successful refreshing operating system following figure upfront home that is suggestion necessity Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Huawei Linux Shulou Information Shulou Technology