I had a similar problem. The following is a detailed error message:
Failed to get value for parameter encoding for plugin execution. Default plugin-resources org.apache.maven.plugins: maven-resources-plugin: 2.6 or one of its dependencies could not be solved: the following artifacts could not be resolved : org.apache.maven : maven-plugin-api: jar: 2.0.6, org.apache.maven: Maven project: jar: 2.0.6, org.apache.maven: Maven profile: jar: 2.0.6, org.apache.maven : Maven-artifact manager: bank: 2.0.6, org.apache.maven: Maven-plugin-registry: jar: 2.0.6, org.apache.maven: Maven-core: bank: 2.0.6, org.apache .maven: Maven-plugin-parameter-Archivist: bank: 2.0.6, org.apache.maven: Maven-storage-metadata: jar: 2.0.6, org.apache.maven: Maven error diagnostics: jar: 2.0.6, org.apache.maven: Maven-plugin descriptor: bank: 2.0.6, classworlds: classworlds: bank: 1,1, org.apache.maven: Maven-artifact: jar: 2.0 .6, org.apache.maven: Maven-configuration: jar: 2.0.6, org.apache.maven: Maven-model: jar: 2.0.6, org.apache.maven: maven-monitor: jar: 2.0.6 : Failure to comply with org.apache.maven: maven-plugin-api: jar: 2.0.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, the permission will not be reloaded until the central interval expires or update is forced. Original error: Failed to transfer artifact org.apache.maven: maven-plugin-api: jar: 2.0.6 from / to central ( https://repo.maven.apache.org/maven2 ): connection timeout
At first glance, it seems that the connection to the central repository failed. But actually it turns out something in my local repository .
Instead of wasting time figuring out what is wrong with my local 10G repository, I use an empty folder as the new local repository.
And the error has disappeared.
This is not a solution. This is just a workaround.
I think maven is not stable enough when the local repository gets big. And the misleading error message spent a lot of time checking the problem with the network or proxy. Hope this can save other souls for a while.
BTW: Apache Maven Cookbook 2015 is a very good Maven starter book.
ADD 1
The answer you choose is essentially similar to mine.
source share