Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Deploy-a-Java-Application

We will use AWS console for this project

Step 1 - Create our Security group. Make sure to open the open 80

1

Step 2 - Launch our EC2 instance

1

Step 3 - Connect to our EC2 server using mobaxterm

1

Step 4 - Install java and Maven on this server

1

Step 5 - clone the repository where the code is located

1

Step 6 - Run mvn validate

This will validate the pom.xml

1

Step 7 - Run mvn compile

This will validate first the src and next check if there is an error in the syntax of the src

1

After the mvn compile, a new folder target is created.

Step 8 - Run mvn test

1

Step 9 - Run mvn package

1

Our Jar file is created and located in the target folder. This is our application. If executed, the application will begin to run

1

Step 10 - Run mvn install
We noticed a failure because we ran the mvn install inside the target folder which doesn't have the pom.xml. So we need to go to the previous step with cd .. to run this command

1

This command install the jar file in the .m2 directory

Step 11 - Run mvn deploy

**Step 12 - Execute the java project

  • Identify the location of the jar file: inside the target folder;

  • Execute the jar file: java -jar target/spring-boot-web.jar

1

Our application is executed

Step 13 - Access the application

The application is running on Tomcat, port 8080 IP: 8080 to access the application

1

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors