I am trying to default some property values in a templated class and it looks like the velocity engine the maven archtype plugin is using is choking on the ':' with errors like:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Encountered ":" at line 18, column 40 of archetype-resources/__modelName__/src/main/java/client/CandyClientConfig.java
[ERROR] Was expecting one of:
[ERROR] "}" ...
[ERROR] <DOT> ...
[ERROR] "(" ...
[ERROR] -> [Help 1]
[ERROR]
I have tried several escape sequences and it complains about them all:
@Value("${candy.http.maxConnections\:100}")
@Value("${candy.http.maxConnections\\:100}")
@Value("${candy.http.maxConnections:100}")
in the top of my archetype pom
#set($colon = ':')
then
@Value("${candy.http.maxConnections$colon100}")
This should be easily to beat. So, what am I missing?