Program-2
Program-2
• Ensure Maven is installed on your machine. You can verify its installation by
running mvn -v in the command line.
• Navigate to Maven and ensure it's configured correctly, pointing to your Maven
installation.
• In Eclipse, go to File > New > Other... and select Maven Project.
• Leave the default workspace location and click Next.
• Choose Create a simple project (skip archetype selection) and click Next.
Adding Dependencies
• Open pom.xml.
• To add a dependency, find the dependency information on Maven Repository
(e.g., https://mvnrepository.com/).
Add the dependency snippet within the <dependencies> tag. For example:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.3.RELEASE</version>
</dependency>
Adding Plugins
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>