I have a situation where I am using a code generator which reads text
generated from the pom.xml file.
The problem is that the code generator is written in groovy which does not
like '\' in the file path.
The current line of code is...
```maven
def file = new File("${project.basedir}/src/main/javascript/gremlin-
javascript/package.json")

```
which gets converted and processed by the groovy based generator
resulting in...
```text
Script1.groovy: 3: unexpected char: '\' @ line 3, column 24.
def file = new 
File("C:\Users\me\tp-x\gremlin-javascript/src/main/javascript/gremlin-javascript/package.json")
```
This is part of an Apache open source
project.https://github.com/apache/tinkerpop/blob/53503bfa28ba1de061204fb96835dee856576bbf/gremlin-javascript/pom.xml#L126I
want to know how to best manipulate the project.basedir value so as
not to have a path that groovy does not like.

Reply via email to