heroku / heroku-buildpack-java

Heroku's buildpack for Java applications.
https://devcenter.heroku.com/articles/java-support
MIT License
169 stars 3 forks source link

Build pack unable to read environment variables #23

Closed NandishAndDev closed 11 years ago

NandishAndDev commented 11 years ago

Hi,

I have changed build pack to read settings.xml from another location. The file has reference to environment variables. I used heroku config:add to set username and password of maven repo. However when it starts to run, I see the script compile is not able to read these env variables.

This is how my settings.xml look `

archiva ${env.MI-REPO-USER} #{env.MI-REPO-PASSWORD}

`

My compile script is changed to use this file hosted and print the credentials.

MAVEN_SETTINGS_URL="http://192.81.131.224/settings.xml" echo -n "-----> Installing settings.xml..." echo $MI_REPO_USER echo $MI_REPO_PASSWORD

When I do push on heroku I get empty values for MI_REPO_USER and MI_REPO_PASSWORD

Any help much appreciated

Nandish

ryanbrainard commented 11 years ago

You'll need to enable user-env-compile to have your app's config vars available at buildtime: https://devcenter.heroku.com/articles/labs-user-env-compile

NandishAndDev commented 11 years ago

Can you please let us know what is the road map for the following lab feature. What in case if its removed

ryanbrainard commented 11 years ago

Labs features are experimental and may change or be removed without notice; however, I don't really see this going away unless an alternative solution was put in place and current users were alerted how to upgrade. I would also recommend following the Heroku Changelog to keep up to date on any upcoming changes.