Thanks Alex. Removing the double-quotes worked. On Sun, Jan 28, 2024 at 4:40 PM Alexander Kriegisch < alexan...@kriegisch.name> wrote:
> It is not a Maven problem, but a shell usage one. > > UNIX-like shells like Git Bash: > export MAVEN_OPTS="-Doption1=value1 -Doption2=value2" > > Windows Cmd.exe: > set MAVEN_OPTS=-Doption1=value1 -Doption2=value2 > > Just do not use the double quotes there. They are used for arguments > which actually contain spaces. > > -- > Alexander Kriegisch > https://scrum-master.de > > > Siddharth Jain schrieb am 29.01.2024 06:37 (GMT +07:00): > > > Hello, > > > > I have: > >>mvn -v > > Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) > > Maven home: C:\Program Files\apache-maven-3.9.6 > > Java version: 21.0.2, vendor: Oracle Corporation, runtime: C:\Program > > Files\jdk-21.0.2 > > Default locale: en_US, platform encoding: UTF-8 > > OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows" > > > > When I try to run a program as follows: > > set MAVEN_OPTS="-Doption1=value1 -Doption2=value2" > > mvn exec:java -Dexec.mainClass=com.example.Foo > > > > Expected: > > > > Two JVM options should be set as follows: > > > > - option1=value1 > > - option2=value2 > > > > > > Observed: > > > > One JVM option is set as follows: > > > > - option1=value1 -Doption2=value2 > > > > does anyone reproduce this? is there any workaround for this? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >