Posted on 06-02-2017 12:33 AM
Good Morning All
I am wanting to deploy maven to group of machines and set the following
~/.bash_profile
export M2_HOME=/Users/Shared/apache-maven-3.5.0
export PATH=$PATH:$M2_HOME/bin
is this possible to set under the users path I.e /Users/Staff.Name/.bash_profile
I have had a go at copying this file with the maven package and then running an after script to move it to ~/, but I suspect this always runs as root and then moves this to root ~/ not the logged in user ~/
Posted on 06-05-2017 01:06 PM
If the intent is to add this for all users, you could just add it to /etc/bashrc
.
Throw this into your postinstall script:
echo $'export M2_HOME=/Users/Shared/apache-maven-3.5.0
export PATH=$PATH:$M2_HOME/bin' >> /etc/bashrc