📘 Premium Read: Access my best content on Medium member-only articles — deep dives into Java, Spring Boot, Microservices, backend architecture, interview preparation, career advice, and industry-standard best practices.
✅ Some premium posts are free to read — no account needed. Follow me on Medium to stay updated and support my writing.
🎓 Top 10 Udemy Courses (Huge Discount): Explore My Udemy Courses — Learn through real-time, project-based development.
▶️ Subscribe to My YouTube Channel (172K+ subscribers): Java Guides on YouTube
We can also create a simple maven project using the command line, check out the same at Create a Simple Maven Project using Command-Line.
Video
This tutorial is explained in the below Youtube Video. Subscribe to my youtube channel to learn more about Spring boot at Java Guides - YouTube Channel.Tools and technologies used
- Eclipse Neon
- Maven - 3.5.3
- JDK - 1.8
Step-1
- Open Eclipse
- Click on File -> New -> Maven Project
Step-2
Step-3
Step-5
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.0</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build>
Step-6
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>net.javaguides.maven-demo</groupId> <artifactId>maven-demo-project</artifactId> <version>0.0.1-SNAPSHOT</version> <description>Simple Maven Demo Project</description> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.0</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build> </project>
Let's test our created project by creating a simple JUnit test.
Step-7
package net.javaguides.simpleproject; import org.junit.Assert; import org.junit.Test; public class AppTest { @Test public void test() { Assert.assertEquals("Hello Maven", new String("Hello Maven")); } }
Comments
Post a Comment
Leave Comment