Trying to build to web target from Windows fail due to file separator being used as invalid Regex.
Current Behavior
java.util.regex.PatternSyntaxException: Unescaped trailing backslash near index 1
\
at java.base/java.util.regex.Pattern.error(Pattern.java:2204)
at java.base/java.util.regex.Pattern.compile(Pattern.java:1951)
at java.base/java.util.regex.Pattern.<init>(Pattern.java:1576)
at java.base/java.util.regex.Pattern.compile(Pattern.java:1101)
at java.base/java.lang.String.replaceAll(String.java:3111)
at com.gluonhq.substrate.target.WebTargetConfiguration$1Work.setArtifact(WebTargetConfiguration.java:239)
Trying to build to web target from Windows fail due to file separator being used as invalid Regex.
Current Behavior
Source
https://github.com/gluonhq/substrate/blob/8cf189f6a1b6f86404fc47d24a4529d76a02fc34/src/main/java/com/gluonhq/substrate/target/WebTargetConfiguration.java#L239
It could include two slashes instead of just one, use a regex like:
"(\\\\|/)"
or change the call fromString::replaceAll
toString::replace
Your Environment
Windows 11 - GluonFX 1.0.22