• Post Reply Bookmark Topic Watch Topic
  • New Topic

Maven and Environment Variables

Drew Formica
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 /) ?
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!