using multi-line parameter

286 views
Skip to first unread message

idan...@gmail.com

unread,
Jul 29, 2023, 3:15:26 PM7/29/23
to Jenkins Users
Hi,

I have Job In jenkins that run Maven
I add multi-line parameter

The problem is that when entering multiple lines when run the maven command it split the command and the maven command is cut in the middle

If I try for example send :
Line1
Line2

The maven command stop at Line1
and LIne2 appear as different command with different timestamp

How should I send the multi-line

Thanks




Arnaud bourree

unread,
Jul 30, 2023, 4:37:33 AM7/30/23
to jenkins...@googlegroups.com
Hi,

Did you try with backslash?

Line1 \
Line2

Regards

Arnaud 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a34c275b-c39f-46f8-8e09-83fc70f5d3bbn%40googlegroups.com.

idan...@gmail.com

unread,
Aug 4, 2023, 12:44:05 PM8/4/23
to Jenkins Users
Hi,

I try and this is what I got :
19:34:43 [multiline] $ cmd.exe /C "C:\jenkins\tools\hudson.tasks.Maven_MavenInstallation\3.3.9\bin\mvn.cmd -f pom.xml '"-DDescription=Line1 \ 19:34:43 Line2"' ...

So the maven is not running

James Nord

unread,
Aug 11, 2023, 4:45:17 PM8/11/23
to jenkins...@googlegroups.com
Take Jenkins out of the equation for a moment.

How would you run this command from a command line prompt in windows?

There is an answer to that, but then your input is going to have to be munged to match that input which is not so user friendly.

I would guess that whatever maven plugin reads that is not really expecting it to be a multiline string as they are a level of pain to handle in various scripts etc and if it can handle multiple lines (and indeed expects them) then it would be able to take input from a file via a different parameter which you can create from the parameter instead.

/James


Reply all
Reply to author
Forward
0 new messages