Solve the problem of Maven cannot access in offline mode

      Recently, when using eclipse for Maven project development, I encountered a problem such as cannot access in offline mode. Because the environment is already built by others, so I can't understand it. I checked a lot of information on the Internet, and the answers given are basically divided into the following categories:

      1. It is caused by the inability to access the Internet.

      2. It is caused by the inability to access the Maven repository, so mirror needs to be set. But the actual repository can be accessed normally.

      3. Reasons related to the plugin.

      4. Other reasons.

      Tried these solutions but none solved my problem. Later, I changed the way of searching and finally found out the problem. The biggest reason for this exception is because Maven is set to "offline mode".

      Below is the screenshot in eclipse:


      Remove this tick, and then execute Update Project, the problem is solved.

Guess you like

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