Details
Description
Running Maven with ${project.basedir} in the <evaluateBeanshell><condition> in a pom.xml fails under Windows, while Linux is fine.
Already
<evaluateBeanshell> <condition> print(java.nio.file.Paths.get("${project.basedir}/".replace("\\", "/")); 1==1 </condition> </evaluateBeanshell>
fails with Couldn't evaluate condition... as ${project.basedir} is apparently taken as a Java string directly, w/o escaping the backslashes.
While the message part
<evaluateBeanshell> <condition> 1==0 </condition> <message>condition failed, project.basedir=${project.basedir}</message> </evaluateBeanshell>
logs the Windows path correctly:
[WARNING] Rule 2: org.apache.maven.plugins.enforcer.EvaluateBeanshell failed with message: condition failed, project.basedir=C:\Users\me\git\project\dir_with_pom_file