A sample Java Maven application demonstrating Continuous Integration (CI) using AWS CodeBuild. This project uses a buildspec.yml file to automate the build process.
- Java Maven project
- AWS CodeBuild integration
- Automated build using
buildspec.yml - GitHub source repository
- Beginner-friendly project
- Java
- Maven
- AWS CodeBuild
- AWS EC2
- Git
- GitHub
java-demo-codebuild-project/
├── buildspec.yml
├── pom.xml
├── index.html
└── README.md
mvn clean install- Launch an Ubuntu EC2 instance.
- Install Apache Web Server:
sudo apt update
sudo apt install apache2 -y```3. Copy the `index.html` file to the Apache web directory:```bash
sudo cp index.html /var/www/html/index.html- Start and enable Apache:
sudo systemctl enable apache2
sudo systemctl start apache2Open port 80 (HTTP) in the EC2 Security Group.
Open your browser and visit:
http://<EC2-PUBLIC-IP>
If the setup is successful, the index.html page will be displayed in your browser.
The buildspec.yml file defines the build phases for AWS CodeBuild, including:
- Install dependencies
- Build the project
- Generate build artifacts
This project demonstrates how to integrate a Java Maven application with AWS CodeBuild and deploy a simple web page on an AWS EC2 instance.
Shuchi Dwivedi