Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:javac: invalid flag: --release

6,366 views
Skip to first unread message

Marit M

unread,
May 11, 2023, 11:14:14 AM5/11/23
to Jenkins Developers
Hi,

I'm getting the following error in the below pull request:

Can you please advise what do I need to change in the pom.xml to resolve this issue?

Thanks,
Marit.


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project bmc-cfa: Compilation failure

[2023-05-11T08:52:23.075Z] [ERROR] javac: invalid flag: --release

[2023-05-11T08:52:23.075Z] [ERROR] Usage: javac <options> <source files>

[2023-05-11T08:52:23.075Z] [ERROR] use -help for a list of possible options

[2023-05-11T08:52:23.075Z] [ERROR] -> [Help 1]

[2023-05-11T08:52:23.075Z] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project bmc-cfa: Compilation failure

[2023-05-11T08:52:23.075Z] javac: invalid flag: --release

[2023-05-11T08:52:23.075Z] Usage: javac <options> <source files>

[2023-05-11T08:52:23.075Z] use -help for a list of possible options

[2023-05-11T08:52:23.075Z]




Basil Crow

unread,
May 11, 2023, 11:23:31 AM5/11/23
to jenkin...@googlegroups.com

Gavin Mogan

unread,
May 11, 2023, 11:55:11 AM5/11/23
to jenkin...@googlegroups.com

On Thu, May 11, 2023 at 8:23 AM Basil Crow <m...@basilcrow.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAFwNDjpB8Nw-XDUjQ46tgfY%3DGMYabDN4CwtgTUG%3Dt-c%3DqRQsFQ%40mail.gmail.com.

Basil Crow

unread,
May 11, 2023, 12:02:28 PM5/11/23
to jenkin...@googlegroups.com
On Thu, May 11, 2023 at 8:55 AM 'Gavin Mogan' via Jenkins Developers
<jenkin...@googlegroups.com> wrote:
>
> I think the PR in question is doing exactly that https://github.com/jenkinsci/bmc-cfa-plugin/pull/42/files#diff-e6ffa5dc854b843b3ee3c3c28f8eae2f436c2df2b1ca299cca1fa5982e390cf8R4-R5

Those lines were not present in the PR at the time of the original
post. They were just committed, presumably after reading the blog post
I mentioned.

Gavin Mogan

unread,
May 11, 2023, 12:06:12 PM5/11/23
to jenkin...@googlegroups.com
totally fair, i didn't notice the timestamps, sorry for that

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

Marit

unread,
May 11, 2023, 12:21:38 PM5/11/23
to jenkin...@googlegroups.com
Thank you guys, I've adjusted the jenkinsfile as Basil suggested and the error is gone.




 


You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/Zuoudkgb0Q4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DuvbWmepYi4%3DWsADwm8UTvaq_yN2X7a092Cf3k8BiY8iHA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages