Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline step fails on Maven error #213

Open
ktatro-rh opened this issue Apr 21, 2023 · 5 comments
Open

Pipeline step fails on Maven error #213

ktatro-rh opened this issue Apr 21, 2023 · 5 comments

Comments

@ktatro-rh
Copy link

On the pipeline build step, everyone in our workshop experienced the following error during the workshop:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project nationalparks: Fatal error compiling: invalid target release: 11 -> [Help 1]

@open-sudo
Copy link

The PVC doesn't bind. It stays indefinitely in PENDING state.

@ktatro-rh
Copy link
Author

ktatro-rh commented Apr 21, 2023

I did some looking at some other user namespaces, it looks like the PVC was correctly bound in the namespaces, but the pipeline still failed. Here is the full output from the build-and-test log:

[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to /workspace/source/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.205 s
[INFO] Finished at: 2023-04-20T20:30:15Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project nationalparks: Fatal error compiling: invalid target release: 11 -> [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

@naveenkendyala
Copy link

+1 to this error (the pvc is binding). Do we have any work arounds for this?

@naveenkendyala
Copy link

Solution : Looks like the issue is with the maven image in the pipeline build-and-test step. The image is defaulting to "gcr.io/cloud-builders/mvn" which will pull the latest and may not have the java 11.

Changing the image tag to a previous one (the one below worked) solved the problem:
gcr.io/cloud-builders/mvn@sha256:8e7d8d214e2c007f8b4737beb393c941bb9a11600eeedfc0c2bcec3dc8d11e06

@naveenkendyala
Copy link

naveenkendyala commented May 4, 2023

Update : The fix seems to have been applied. The workshop uses Maven 3.9.1 that was released a few days ago. I did another run and the step is successful. This can be closed !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants