-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudshell.sh
More file actions
35 lines (25 loc) · 929 Bytes
/
cloudshell.sh
File metadata and controls
35 lines (25 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This file should be sourced before running install on AWS Cloud Shell
# source cloudshell.sh
set -e
echo "Installing Java 21 (Amazon Corretto)..."
sudo yum install -y java-21-amazon-corretto-devel
echo "Verifying Java Version..."
java -version
echo "Installing latest Maven locally..."
MAVEN_VERSION=3.9.10
# Download and untar in your HOME directory
curl -fsSL https://downloads.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz -o maven.tar.gz
mkdir -p $HOME/maven
tar -xzvf maven.tar.gz -C $HOME/maven --strip-components=1
rm maven.tar.gz
# Set environment variables
export M2_HOME=$HOME/maven
export MAVEN_HOME=$HOME/maven
export PATH=$M2_HOME/bin:$PATH
echo "Verifying Maven Version..."
mvn -version
echo "Installing AWS CDK globally..."
sudo npm install -g aws-cdk
echo "Verifying CDK Version..."
cdk version
echo "✅ Environment ready. You can now run 'mvn install'"