Cannot resolve plugin org.apache.maven.plugins:maven-site-plugin:3.3 problems and solutions

1. Problem overview

The screenshot taken when the problem occurred was accidentally deleted, so I will only elaborate on the problem in writing below. When creating a maven project, Cannot resolve plugin org.apache.maven.plugins:maven-site-plugin:3.3 is reported, which is reported in red at the location marked in Figure 1.1.

Figure 1.1

2. Solution

Enter setting

Figure 2.1

Search Maven directly, click Maven to configure Maven-related properties on the right side, and the setting.xml file needs to be opened first to change some properties.

Figure 2.2

If you want to set up a local warehouse, you need to add it to setting.xml and modify it as shown in Figure 2.3. The path in the <localRepository> tag points to the local warehouse you set.

Figure 2.3

The result directory of the maven project created after the above modification is displayed.

Figure 2.4

The maven web project created according to the maven archetype prototype lacks the complete structure of the maven project:

src-main-java/resources

src-test-java/resources

So we need to add the file directory manually, but I won’t go into details here.

Guess you like

Origin blog.csdn.net/qq_44575770/article/details/129558109