I am trying to execute the maven exec command as follows:
mvn exec: java -Dexec.args = "{\" parameters \ ": [{\" name \ ": \" parameter1 \ ", \" value \ ": \" 1 \ "}]}"
A statement is a JSON string that I need to process in my Java program. But when the string is read by the Java class, double quotes are removed and read as: {Parameters: [{name: parameter1, value: 1}]}
I tried different escape sequences like \ and \\, but this does not work. I need to keep double quotes in a string.
Can someone please help me solve this.
maven
user3465324
source share