Summary of maven use problems

Well, after learning maven for nearly a month, I encountered many problems in the process. Next, record the problems that bother you here:

 

1. When running some life cycles, it will prompt failed to execute......

比如我这里在执行mvn site的时候就提示:Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project maven_test_again: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.struts:struts-taglib:jar:1.3.8 from/to central (https://repo.maven.apache.org/maven2): GET request of: org/apache/struts/struts-taglib/1.3.8/struts-taglib-1.3.8.jar from central failed: Connection reset -> [Help 1]。

First of all, I have a headache when I see this exception. Here, the ide tool is directly given by a line of code. I don't know what I'm talking about when I see this.

But there is really no way to do it later, and this problem often arises to be solved. After my testing for a while, I think the part marked in red font above is actually the key to this exception. Open the local warehouse according to the prompt jar package and go to this location to check, and find that there is a *.lastUpdate file in it.

In fact, the solution here is this file, just delete the *.lastUpdate file , and then re-execute the mvn site command just now, it is successful. Then the problem is solved. After many tests, it can be said to be unsatisfactory.

 

 

2. The issue of brower indexer failing to download the index on the nexus private server.

There are many solutions to this problem on the Internet, but I have tried a lot. Some configuration steps are many, but they have no effect. Maybe there is a problem with my configuration.

Here's a solution I've tested to solve this:

Search for a nexus-maven-repository-index.zip on the Internet (note that this is a .zip archive, not a .gz archive. It seems that the .zip archive cannot be found on repo1.maven.org). Download this file, extract the file inside to E:\program_files\maven\nexus\nexus-2.13\sonatype-work\nexus\indexer\central-ctx file, and delete the original content of the file . Of course, before this, the nexus service must be shut down, and then restarted after the above steps are completed. If it goes well, you will be surprised to find that the original empty brower index directory is full of content; if this is still unsuccessful, you can try to update the index on central or public.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326540082&siteId=291194637