I have a PC that installed with gaming app like Steam
or GOG
but in Windows config there is no proxy and no firewall other than default ones from the OS. I have NordVPN
but currently disconnected. However after installed maven 3.8.2, all mvn
goal failed that can’t access maven central
PS C:DevCodeintellijmy-test> mvn archetype:generate -DgroupId="com.my.app" -DartifactId="mydemo" -DarchetypeArtifactId="maven-archetype-quickstart" -DinteractiveMode="false"
threw following error
[WARNING] org.apache.maven.plugins/maven-metadata.xml failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml [WARNING] org.codehaus.mojo/maven-metadata.xml failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.404 s [INFO] Finished at: 2021-09-24T17:29:01-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:Usersme.m2repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
Anyone has experience to troubleshooting such issue? There is no addtional configuration from settings.xml
, everything is original from maven zip file directory downloaded from maven site
PS: it is the same behavior with command line or Intellij or Eclipse. It’s not an issue with IDE but rather something in the environment/OS blocking maven, just hopefully can have some way to debug the issue
Advertisement
Answer
Turned out the cause of this issue is I am running OpenJDK8
in local environment where the certificate Maven is expired, upgraded to latest OpenJDK
resolved the issue. @ProgrammersBlock’s advice of using -X definitely is also very helpful to identify the problem