Skip to content

Commit

Permalink
Updated prepare_dev_env.sh script (#1972)
Browse files Browse the repository at this point in the history
  • Loading branch information
aimethed authored May 14, 2024
1 parent 43ffdfa commit 7f3bbe6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tools/prepare_dev_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ while true; do
done

set -e
sudo wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz -O /tmp/apache-maven-3.5.4-bin.tar.gz
sudo tar xf /tmp/apache-maven-3.5.4-bin.tar.gz -C /opt
echo "export M2_HOME=/opt/apache-maven-3.5.4" >> ~/.profile
sudo wget https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -O /tmp/apache-maven-3.9.6-bin.tar.gz
sudo tar xf /tmp/apache-maven-3.9.6-bin.tar.gz -C /opt
echo "export M2_HOME=/opt/apache-maven-3.9.6" >> ~/.profile
echo "export PATH=\${M2_HOME}/bin:\${PATH}" >> ~/.profile
echo "export M2_HOME=/opt/apache-maven-3.5.4" >> ~/.bash_profile
echo "export M2_HOME=/opt/apache-maven-3.9.6" >> ~/.bash_profile
echo "export PATH=\${M2_HOME}/bin:\${PATH}" >> ~/.bash_profile

sudo yum -y install java-11-openjdk-devel
# If using amazon linux and the above doesn't work, you can try this line instead
# If using amazon linux 2 and the above doesn't work, you can try this line instead
# sudo amazon-linux-extras install -y java-openjdk11
# For amazon linux 2023, use the following line instead
# sudo dnf install java-11-amazon-corretto

echo "Set the default to the Java 11 installation"
sudo update-alternatives --config java
Expand All @@ -70,4 +72,4 @@ sam --version

echo ""
echo ""
echo "To ensure your terminal can see the new tools we installed run \"source ~/.profile\" or open a fresh terminal."
echo "To ensure your terminal can see the new tools we installed run \"source ~/.profile\" or open a fresh terminal."

0 comments on commit 7f3bbe6

Please sign in to comment.