Recently, when I was working on someone else’s project and wanted to upgrade some JARS, the maven structure kept popping up with multiple versions. The abnormal demo is as follows:

Problem of repetition

I upgraded the hutool version to 5.4.2, but the submodule was still 5.4.1. Then I looked at the project JAR package and found that there were multiple versions of the JAR.

As you can see, multiple versions of jars appear, and it looks like Maven didn’t update my version information in real time.

The solution

  • The solution is as simple as clicking the Toggle Offline Mode button below the Maven toolbar to update the JAR information in real time
  • Enable offline mode to forcibly read the local JAR package library (should trigger to pull configuration information from main module, forced update operation)

You can see that the version information has been updated, and then turn off the offline mode