Manually Building a Java Project
- Lets try to build a Java Project
- To build this project we need
- git
- Java 11
- Maven latest version
-
Manual Steps:
- Ubuntu Virtual Machine in AWS Free tier (t3.micro/t2.micro)
- For instructions on creating ubuntu in aws view classroom recording
- To connect
ssh -i <path to private key> ubuntu@<public ip>
- In the current vm, we have git but we need to install java and maven
- Commands
sudo apt update
sudo apt install openjdk-11-jdk -y
sudo apt install maven -y
java -version
mvn --version - To install java Refer Here
- Commands to get the code and build the package
git clone https://github.com/spring-guides/gs-maven.git
cd gs-maven/initial
mvn package
- Code: Refer Here
- Build step:
mvn package
- artifact:
gs-maven-0.1.0.jar