custom-war-packager
custom-war-packager copied to clipboard
[JENKINS-51070] - Caching: Add a warmup call for dependency:get
dependency:get now always gets invoked in the offline mode. If the artifact is missing in the local repo, caching won't work properly
[INFO] --- custom-war-packager-maven-plugin:0.1-alpha-3:custom-war (default) @ artifact-manager-s3-demo ---
Mar 28, 2018 1:39:04 AM io.jenkins.tools.warpackager.lib.impl.Builder buildIfNeeded
INFO: Will checkout jenkins-war from git: git: https://github.com/jglick/jenkins.git, checkout: 2090468d82e49345519a2457f1d1e7426f01540b
[INFO] Scanning for projects...
[WARNING] The POM for org.apache.maven.plugins:maven-install-plugin:jar:2.4 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-install-plugin:jar:2.4 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-site-plugin:jar:3.3 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-site-plugin:jar:3.3 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-release-plugin:jar:2.3.2 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.147 s
[INFO] Finished at: 2018-03-28T01:39:05Z
[INFO] Final Memory: 7M/106M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 has not been downloaded from it before. -> [Help 1]
https://issues.jenkins-ci.org/browse/JENKINS-51070
Hi @oleg-nenashev I'll pick this one ;-)
::+1:
I tried to run Makefile
of artifact-manager-s3-demo
offline and got another error:
$ make
rm -rf tmp
java \
-jar ../../custom-war-packager-cli/target/custom-war-packager-cli-2.0-alpha-3-SNAPSHOT-jar-with-dependencies.jar \
-configPath packager-config.yml -version 2.121.1-pom-input-SNAPSHOT
Oct 10, 2019 2:34:27 PM io.jenkins.tools.warpackager.lib.util.MavenHelper listDependenciesFromPom
INFO: Listing dependencies from POM file: pom.xml
[INFO] Scanning for projects...
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:3.5 is missing, no dependency information available
[WARNING] Failed to build parent project for io.jenkins.plugins:artifact-manager-s3-bundle:hpi:1.1-SNAPSHOT
[INFO]
[INFO] -----------< io.jenkins.plugins:artifact-manager-s3-bundle >------------
[INFO] Building Artifact Manager on S3 plugin 1.1-SNAPSHOT
[INFO] --------------------------------[ hpi ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.1:list (default-cli) @ artifact-manager-s3-bundle ---
[INFO] Can't extract module name from apache-httpcomponents-client-4-api-4.5.5-3.0.jar: apache.httpcomponents.client.4.api: Invalid module name: '4' is not a Java identifier
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.512 s
[INFO] Finished at: 2019-10-10T14:34:33Z
[INFO] ------------------------------------------------------------------------
Exception in thread "main" java.io.IOException: Invalid update center url : https://updates.jenkins.io/update-center.json
at io.jenkins.tools.warpackager.lib.impl.plugins.UpdateCenterPluginInfoProvider.extractUpdateCenterData(UpdateCenterPluginInfoProvider.java:48)
at io.jenkins.tools.warpackager.lib.impl.plugins.UpdateCenterPluginInfoProvider.init(UpdateCenterPluginInfoProvider.java:31)
at io.jenkins.tools.warpackager.lib.config.Config.overrideByPOM(Config.java:209)
at io.jenkins.tools.warpackager.lib.impl.Builder.build(Builder.java:94)
at io.jenkins.tools.warpackager.cli.Main.main(Main.java:53)
Caused by: java.net.UnknownHostException: updates.jenkins.io
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at java.net.URL.openStream(URL.java:1057)
at io.jenkins.tools.warpackager.lib.impl.plugins.UpdateCenterPluginInfoProvider.extractUpdateCenterData(UpdateCenterPluginInfoProvider.java:46)
... 4 more
make: *** [Makefile:15: tmp/output/target/pom-input-demo-2.121.1-pom-input-SNAPSHOT.war] Error 1```
That error comes from running the CWP in the offline mode.
Anyway, I removed the hacktoberfest
label for now, thanks to @Smasherr for the investigation! Looks like it should not be a problem for the 2.x branch with the default Update Center