I am trying to activate a profile in my maven pom as follows:-
<profile>
<id>test</id>
</properties>
<activation>
<property>
<name>env.SITE</name>
<value>test</value>
</property>
</activation>
</profile>
Now i am configuring heroku to have the environment variable SITE as follows:-
heroku config:add SITE=test.
I expect the environment variable to trigger the profile when code is pushed. However this is not happening.
You can do this without a custom build pack.
Use this snippet in your pom.xml to display all properties available on Heroku and pick one that is not in your local: http://florianlr.wordpress.com/2012/04/24/16/
I used env.DYNO
<profile>
<id>heroku</id>
<activation>
<property>
<name>env.DYNO</name>
</property>
</activation>
...
</profile>
...
Works like a charm:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With