Closed tcollignon closed 5 years ago
Hmm... likely it is a glitch after the Custom WAR Packager update. I have also seen it few times on my Windows machine while building in WSL
So this is an issue with the cache:
INFO: Checking /home/onenashev/.m2/repository/io/jenkins/configuration-as-code/1.8/configuration-as-code-1.8.hpi
Mar 20, 2019 10:31:13 PM io.jenkins.tools.warpackager.lib.util.MavenHelper artifactExists
INFO: Dependency io.jenkins:configuration-as-code:1.8 was found in the non-HPI cache. Delete /home/onenashev/.m2/cwp_non_hpi_cache/io/jenkins/configuration-as-code/1.8/configuration-as-code-1.8.hpi to attempt another resolution attempt.
Mar 20, 2019 10:31:13 PM io.jenkins.tools.warpackager.lib.config.Config processMavenDep
INFO: Skipping dependency, not an HPI file: io.jenkins:configuration-as-code:1.8
The cache is corrupted though https://repo.jenkins-ci.org/webapp/#/artifacts/browse/tree/General/releases/io/jenkins/configuration-as-code/1.8 looks OK
If I wipe the cache and re-run resolution, I get...
Mar 20, 2019 10:36:13 PM io.jenkins.tools.warpackager.lib.util.MavenHelper artifactExistsInLocalCache
INFO: Checking /home/onenashev/.m2/repository/io/jenkins/configuration-as-code/1.8/configuration-as-code-1.8.hpi
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:get (default-cli) on project standalone-pom: Couldn't download artifact: Failure to find io.jenkins:configuration-as-code:hpi:1.8 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=io.jenkins -DartifactId=configuration-as-code -Dversion=1.8 -Dpackaging=hpi -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=io.jenkins -DartifactId=configuration-as-code -Dversion=1.8 -Dpackaging=hpi -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] io.jenkins:configuration-as-code:hpi:1.8
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] -> [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/MojoExecutionException
AFAICT, the entire cache operation pulls from a wrong repo, looks like a CWP bug. A resolution would be to wipe the entire MAVEN_HOME/cwp_non_hpi_cache repo and to rerun the build locally using a settings.xml with properly defined Maven repositories.
In my case it happens, because the default settings.xml file contains references to repositories without authentication for WSL on Windows
Created #68 for a fix inside this repo, https://issues.jenkins-ci.org/browse/JENKINS-56652 was created for the root cause bug
Hi @oleg-nenashev
Thx for that ! I will try this
Thx you, now it works with Java 8 (and indeed it need change maven settings with https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial) For information : It doesn't work with Java 11
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Jenkinsfile Runner 256.0-1.0-beta-7-544bc7e2959c47649a74b0dad69f12df154aa1b6-SNAPSHOT SUCCESS [ 6.617 s]
[INFO] bootstrap .......................................... FAILURE [ 2.208 s]
[INFO] setup .............................................. SKIPPED
[INFO] payload-dependencies ............................... SKIPPED
[INFO] payload ............................................ SKIPPED
[INFO] jenkinsfile-runner ................................. SKIPPED
[INFO] tests 256.0-1.0-beta-7-544bc7e2959c47649a74b0dad69f12df154aa1b6-SNAPSHOT SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.284 s
[INFO] Finished at: 2019-03-21T11:10:06+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project bootstrap: Compilation failure: Compilation failure:
[ERROR] /Users/tcollignon/eclipse-workspace/ci.jenkins.io-runner/tmp/build/jenkinsfile-runner/bootstrap/src/main/java/io/jenkins/jenkinsfile/runner/bootstrap/Bootstrap.java:[9,24] cannot find symbol
[ERROR] symbol: class PostConstruct
[ERROR] location: package javax.annotation
[ERROR] /Users/tcollignon/eclipse-workspace/ci.jenkins.io-runner/tmp/build/jenkinsfile-runner/bootstrap/src/main/java/io/jenkins/jenkinsfile/runner/bootstrap/Bootstrap.java:[100,6] cannot find symbol
[ERROR] symbol: class PostConstruct
[ERROR] location: class io.jenkins.jenkinsfile.runner.bootstrap.Bootstrap
[ERROR] -> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :bootstrap
Exception in thread "main" java.io.IOException: Command failed with exit code 1: mvn -s /Users/tcollignon/.m2/settings.xml clean install -DskipTests -Dfindbugs.skip=true -Denforcer.skip=true -Djenkins.version=2.164.1
at io.jenkins.tools.warpackager.lib.util.SystemCommandHelper.processFor(SystemCommandHelper.java:39)
at io.jenkins.tools.warpackager.lib.util.MavenHelper.run(MavenHelper.java:66)
at io.jenkins.tools.warpackager.lib.util.MavenHelper.run(MavenHelper.java:46)
at io.jenkins.tools.warpackager.lib.impl.Builder.buildIfNeeded(Builder.java:342)
at io.jenkins.tools.warpackager.lib.impl.Builder.build(Builder.java:193)
at io.jenkins.tools.warpackager.cli.Main.main(Main.java:56)
make: *** [build] Error 1
I doubt it has been ever tested for building with JDK11. This package indeed runs well with JDK11, but we do not build Jenkinsfile Runner with Java 11 so far. There is ongoing effort to support building with Java 11 in the tooling, so it might be handled. Could you please report a ticket in https://issues.jenkins-ci.org/secure/Dashboard.jspa for jenkinsfile-runner
?
CC @varyvol @fcojfernandez
Ok, I create this : https://issues.jenkins-ci.org/browse/JENKINS-56657
Tell me if it miss something in it
Thx for your work
Hi @oleg-nenashev
I want to try this project, because it seem to be very helpful
I follow the guide, and run make clean build but I have a first error
To fix this I have delete _${CWPOPTS} part of the build section in Makefile
So next I have the following error, but this time I can't fix it :
I put the full trace if needed build.txt
Do you know why ?
Thx you