preserve the format of parameters with no value when calling maven-build and maven-chain
-Dfoo and -Dfoo= mean different things to the JVM, so make sure the format of the parameter on the command-line is carried through to the mvn invocation.
This commit is contained in:
parent
cc72bebfae
commit
004a1ba450
3 changed files with 10 additions and 4 deletions
|
|
@ -579,7 +579,7 @@ class BuildRoot(object):
|
|||
cmd.append('-P%s' % ','.join(profiles))
|
||||
if props:
|
||||
for name, value in props.items():
|
||||
if value:
|
||||
if value is not None:
|
||||
cmd.append('-D%s=%s' % (name, value))
|
||||
else:
|
||||
cmd.append('-D%s' % name)
|
||||
|
|
|
|||
4
cli/koji
4
cli/koji
|
|
@ -1114,7 +1114,7 @@ def handle_maven_build(options, session, args):
|
|||
for prop in build_opts.properties:
|
||||
fields = prop.split('=', 1)
|
||||
if len(fields) != 2:
|
||||
fields.append('')
|
||||
fields.append(None)
|
||||
props[fields[0]] = fields[1]
|
||||
if props:
|
||||
opts['properties'] = props
|
||||
|
|
@ -1199,7 +1199,7 @@ def _maven_params(parser, opts, items):
|
|||
for prop in value.splitlines():
|
||||
fields = prop.split('=', 1)
|
||||
if len(fields) != 2:
|
||||
fields.append('')
|
||||
fields.append(None)
|
||||
props[fields[0]] = fields[1]
|
||||
value = props
|
||||
elif name == 'envs':
|
||||
|
|
|
|||
|
|
@ -15,9 +15,15 @@ $value
|
|||
#end if
|
||||
#end def
|
||||
|
||||
#def printProperties($props)
|
||||
#echo ', '.join([$v is not None and '%s=%s' % ($n, $v) or $str($n) for $n, $v in $props.items()])
|
||||
#end def
|
||||
|
||||
#def printMap($vals, $prefix='')
|
||||
#for $key, $value in $vals.items()
|
||||
#if $key != '__starstar'
|
||||
#if $key == 'properties'
|
||||
${prefix}properties = $printProperties($value)
|
||||
#elif $key != '__starstar'
|
||||
$prefix$key = $printValue($key, $value)<br/>
|
||||
#end if
|
||||
#end for
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue