Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven and Environment Variables

 
Drew Formica
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
currently in my maven.xml file i have the following
<property name="myApp.home" value="${env.MYAPP_HOME}" />

lets say that env.MYAPP_HOME = C:\Dir1\Dir2\Dir3

my problem is that the value is used to create values in my project.properties file. Example: my.app.backup = ${myApp.home}/backup

but the env variable value has \s in it - so when my java code reads the value i get C:\Dir1Dir2Dir3/backup

I can't force my users/installation application to specify the path with double \s or /

is there anyway to read in the env variable value and modify it (changing \ to /) ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic