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.
2. Solution
Enter setting
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.
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.
The result directory of the maven project created after the above modification is displayed.
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.