0

Consider a file:

@'${project.build.outputDirectory}

Which is resolved to @'${project.build.outputDirectory}. But when @ is removed all works. Is there a way to escape @ symbol?

P.S. Of cource I can define a new property with @ as value and write: ${myProperty}'${project.build.outputDirectory} but define whole property for one symbol is more workaroung that good solution.

Cherry
  • 31,309
  • 66
  • 224
  • 364
  • you want to prepend the output directory with an at sign and an apostrophe `@'` is that right? – nandsito Apr 11 '17 at 03:13
  • Yes exactly. :) – Cherry Apr 11 '17 at 03:57
  • Simply tried to escape it like this: `\@'${...}`? – khmarbaise Apr 11 '17 at 07:55
  • i actually had no problems. It created a dir `@'` and inside it what would be the absolute path for the build output directory. Could you point where in the POM you are defining this value? – nandsito Apr 11 '17 at 09:20
  • Very strange. I have created new project and everything works. But from more pom but the same plugin configuration property is not replaced. :( – Cherry Apr 13 '17 at 04:44
  • Possible duplicate of [Maven - resource filtering : implications of the @ symbol in resource files](https://stackoverflow.com/questions/4056140/maven-resource-filtering-implications-of-the-symbol-in-resource-files) – Didier L May 29 '17 at 09:09
  • As mentioned in the dupe I referred to above, it appears that upgrading `maven-resources-plugin` to at least version 2.6 fixes the problem. – Didier L May 29 '17 at 09:17

0 Answers0