Setting up Maven on AWS and Local Machine

Day 9 — #100DaysOfCode  today felt different. This was not just learning Java syntax. This was real world stuff. ☕ I set up Maven on my local machine and on an AWS cloud instance. And honestly, the moment my code ran on a cloud server — it felt like a big step forward. Maven Archetype Generate Command The command in the image is used to generate a new Maven project using the maven-archetype-quickstart template. Here is the exact command: 1 .Install Maven on AWS sudo yum update -y sudo yum install maven -y  mvn --version 2. create maven project mvn archetype:generate -DgroupId=com.edu -DartifactId=edu-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false Explanation of parameters: -DgroupId=com.edu→ The group ID for your project (usually your domain in reverse). -DartifactId=edu-app → The name of your project. -DarchetypeArtifactId=maven-archetype-quickstart → The archetype template to use. -DarchetypeVersion=1.0 → The version of the archetype. -DinteractiveMode=false → Runs the command without prompting for input. 3.Change folder -cd edu-app 4. run project -mvn compile -mvn exec:java -Dexec.mainClass="com.edu.App" Here is what I did today: Maven — I finally understand why every Java project uses it. Before Maven, you had to manually download every library your project needed. Maven does that for you automatically. You just write what you need in one file (pom.xml) and Maven handles the rest. It also compiles your code, runs tests, and packages everything into a JAR file — all with simple commands. AWS — I created an account, launched an EC2 instance (basically a computer in the cloud), connected to it from my terminal, and installed Maven on it. The idea that my code can run on a server somewhere in the world — not just on my laptop — is a completely different feeling. Some commands I used today: mvn --version — check if Maven is installed mvn compile — compile the project mvn package — build a JAR file mvn clean — delete old build files mvn test — run all tests 9 days in. Every day the topics get more real and more exciting. Day 1 ✅ Day 2 ✅ Day 3 ✅ Day 4 ✅ Day 5 ✅ Day 6 ✅ Day 7 ✅ Day 8 ✅ Day 9 ✅ If you work with Maven or AWS and have tips for a beginner — please share! Would love to connect. 🙏 #Java #Maven #AWS #EC2 #CloudComputing #100DaysOfCode #JavaDeveloper #LearningInPublic #BackendDevelopment #DevOps

To view or add a comment, sign in

Explore content categories