<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Maven-devops]]></title><description><![CDATA[Maven-devops]]></description><link>https://maven-devops.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 11 Oct 2026 18:23:41 GMT</lastBuildDate><atom:link href="https://maven-devops.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Maven for devops]]></title><description><![CDATA[Today, I took a deeper dive into Apache Maven, a powerful build automation tool primarily used for Java projects. I practiced building a project with Maven and deployed the final artifact to an EC2 instance for testing. Here’s what I learned and impl...]]></description><link>https://maven-devops.hashnode.dev/maven-for-devops</link><guid isPermaLink="true">https://maven-devops.hashnode.dev/maven-for-devops</guid><category><![CDATA[Devops]]></category><dc:creator><![CDATA[akash rawat]]></dc:creator><pubDate>Sat, 31 May 2025 10:50:22 GMT</pubDate><content:encoded><![CDATA[<p><mark>Today, I took a deeper dive into Apache Maven, a powerful build automation tool primarily used for Java projects. I practiced building a project with Maven and deployed the final artifact to an EC2 instance for testing. Here’s what I learned and implemented</mark></p>
<p><strong><mark>📘 What is Maven?</mark></strong></p>
<p><mark>Apache Maven is a build automation and dependency management tool. It simplifies the build process, especially for Java applications, by:</mark></p>
<ul>
<li><p><mark>Managing project structure and build lifecycle</mark></p>
</li>
<li><p><mark>Automatically handling dependencies (via the pom.xml file)</mark></p>
</li>
<li><p><mark>Generating reproducible builds across different environments</mark></p>
</li>
<li><p><mark>Making collaboration easier with a standardized project layout</mark></p>
</li>
<li><p><mark>my-app/</mark></p>
</li>
<li><p><mark>├── src/ │</mark></p>
</li>
<li><p><mark>└── main/ │</mark></p>
</li>
<li><p><mark>└── java/ │ └── com/example/</mark><a target="_blank" href="http://App.java"><mark>App.java</mark></a> <mark> ├</mark></p>
</li>
<li><p><mark>── target/</mark></p>
</li>
<li><p><mark># Compiled code and final build go here ├── pom.xml # Project Object Model (configuration file)</mark></p>
</li>
</ul>
<p><strong><mark>⚙️ Maven Lifecycle Phases I Used Today:</mark></strong></p>
<p><mark>Maven has a default build lifecycle with phases. Here’s what I used:</mark></p>
<h3 id="heading-cleans-up-the-target-directory-removes-old-builds"><strong>Cleans up the target directory (removes old builds)</strong></h3>
<p>mvn clean</p>
<h3 id="heading-compiles-the-source-code">Compiles the source code</h3>
<p>mvn compile</p>
<h3 id="heading-packages-the-compiled-code-into-a-jar-or-war-file">Packages the compiled code into a .jar or .war file</h3>
<p>mvn package</p>
<h2 id="heading-result-jar-file-located-in-the-target-folder-ready-for-deployment">result JAR file located in the target/ folder — ready for deployment!</h2>
]]></content:encoded></item></channel></rss>