jenkins-library icon indicating copy to clipboard operation
jenkins-library copied to clipboard

`mavenBuild`: Set `-X` flag when `verbose: true`

Open LukasHeimann opened this issue 2 years ago • 4 comments

Hi everyone,

In my project, I'm using the mavenBuild step. However, recently something went wrong in the pipeline, and maven was giving me an error log. Being maven, it doesn't give the full error logs by default, but offers a -X switch to do so (see also https://books.sonatype.com/mvnref-book/reference/running-sect-options.html#:~:text=6.1.9.%C2%A0Controlling%20Maven%E2%80%99s%20Verbosity).

However, it seems like piper doesn't allow to pass arbitrary flags to maven in mavenBuild. I guess there are valid reasons to do so, but in this case it might be a good idea to tie the verbosity of maven to the existing verbosity setting within piper. If verbose is true, the -X flag should be appended to the maven configuration here: https://github.com/SAP/jenkins-library/blob/master/cmd/mavenBuild.go#L42

Please let me know if there is another way through which I can set the -X flag. Unfortunately, I can't seem to reproduce the particular issue with my maven configuration locally, so I'm hoping for your input here.

Kind regards Lukas

LukasHeimann avatar Oct 02 '23 06:10 LukasHeimann

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Dec 02 '23 00:12 github-actions[bot]

Hi @SAP/jenkins-library-team, can someone have a look at this?

LukasHeimann avatar Dec 06 '23 07:12 LukasHeimann

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Feb 05 '24 00:02 github-actions[bot]

I still think this is relevant

LukasHeimann avatar Feb 05 '24 07:02 LukasHeimann

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Apr 06 '24 00:04 github-actions[bot]

I still think this is relevant

LukasHeimann avatar Apr 08 '24 06:04 LukasHeimann