Re: Portable Maven launch

2021-01-25 Thread 'Martin Schmude' via Jenkins Users
The if statement is not a pipeline step. It has to be wrapped in a script block: https://www.jenkins.io/doc/book/pipeline/syntax/#script jochen@gmail.com schrieb am Sonntag, 24. Januar 2021 um 21:30:54 UTC+1: > Thanks, > > sounds like what I was looking for. But then: Any ideas, what's wro

Re: Portable Maven launch

2021-01-24 Thread Jochen Wiedmann
Thanks, sounds like what I was looking for. But then: Any ideas, what's wrong in my script? pipeline { agent any tools { maven 'Maven3' jdk 'Java8' } stages { stage ('afw-core') { steps { withMaven( // Ma

Re: Portable Maven launch

2021-01-24 Thread geoffroy...@gmail.com
Hello you probably want to use https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#isunix-checks-if-running-on-a-unix-like-node On Saturday, 23 January 2021 at 21:19:43 UTC+1 jochen@gmail.com wrote: > > Hi, > > I've got a pipeline file, that should be executable on a Windows bui

Portable Maven launch

2021-01-23 Thread Jochen Wiedmann
Hi, I've got a pipeline file, that should be executable on a Windows build server, and on a Linux build server. The pipeline is launching Maven as follows: On Linux: sh "mvn " But on Windows, this appears not to work, so I've got to use: bat "mvn.cmd " Right now, I can use either o