While working on a CRD using kubernetes-client/java, I noticed that the model generation fails. As per the instructions in kubernetes-client/java, there is a container within a container. The outer container invokes java-crd-cmd.sh and this container is run with host networking enabled. The inner container runs the openapi-generator/client-generator.sh script. This inner container seems to invoke maven commands that tries to download the maven plugin and fails. On debugging, the inner container doesn't seem to have network access. Error detail:
--- Generating client ...
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< io.kubernetes:client-java >----------------------
[INFO] Building client-java 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.615 s
[INFO] Finished at: 2021-02-24T08:57:04Z
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Temporary failure in name resolution: Unknown host repo.maven.apache.org: Temporary failure in name resolution -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
While working on a CRD using kubernetes-client/java, I noticed that the model generation fails. As per the instructions in kubernetes-client/java, there is a container within a container. The outer container invokes java-crd-cmd.sh and this container is run with host networking enabled. The inner container runs the openapi-generator/client-generator.sh script. This inner container seems to invoke maven commands that tries to download the maven plugin and fails. On debugging, the inner container doesn't seem to have network access. Error detail:
--- Generating client ... [INFO] Scanning for projects... [INFO] [INFO] ---------------------< io.kubernetes:client-java >---------------------- [INFO] Building client-java 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 20.615 s [INFO] Finished at: 2021-02-24T08:57:04Z [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Temporary failure in name resolution: Unknown host repo.maven.apache.org: Temporary failure in name resolution -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException