maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barrie Treloar <>
Subject Re: Replacing a bunch of -Dkey=value pairs using external file
Date Wed, 09 Sep 2015 00:53:37 GMT
On 9 September 2015 at 10:08, jieryn <> wrote:

> bash$ cat sys1.env
> -DZZ01=maven
> -DZZ02=rocks
> bash$ mvn $(<sys1.env) help:system | grep ZZ
> ZZ02=rocks
> ZZ01=maven
> -DZZ01=maven -DZZ02=rocks help:system
> MAVEN_CMD_LINE_ARGS= -DZZ01=maven -DZZ02=rocks help:system
Well done.
I was trying to use
env 'rat.skip=true' mvn -pl maven-scm-plugin validate

to do the same, but that was setting environment variables not command line
MAVEN_OPTS also wasn't useful as that was for the java command not for the
mvn command.

I wasn't happy with offering this solution up because it became more
cumbersome to type, but storing these other configs in files and wrapping
them with basic scripts is doable

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message