0% found this document useful (0 votes)
40 views

Maven

The document outlines the steps to create a Maven project manually: 1) Download and extract the Maven zip file and configure environment variables for Maven. 2) Generate a Maven project using the archetype:generate goal and select options. 3) Define package and project information like groupId, artifactId, and version. 4) Build and package the project using Maven goals and import it into Eclipse.

Uploaded by

Murali Tunga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Maven

The document outlines the steps to create a Maven project manually: 1) Download and extract the Maven zip file and configure environment variables for Maven. 2) Generate a Maven project using the archetype:generate goal and select options. 3) Define package and project information like groupId, artifactId, and version. 4) Build and package the project using Maven goals and import it into Eclipse.

Uploaded by

Murali Tunga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

How to create maven project manually:

-------------------------------------

Step 1: Download the maven zip file and extract zip file

Step 2: Set the maven path in environment variables

My computer -> Properties -> Advanced System Setting -> Environment variables ->New

MAVEN_HOME=H:\Desktop\DevOps_JuneBatch\MavenSoftware\apache-maven-3.8.1
or M2_HOME=ROOTPATH
Path=%MAVEN_HOME%\bin or H:\Desktop\DevOps_JuneBatch\MavenSoftware\apache-maven-
3.8.1\bin

Step 3: Check maven installed or not

c:/> mvn

c:/>mvn --version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: H:\Desktop\DevOps_JuneBatch\MavenSoftware\apache-maven-3.8.1\bin\..
Java version: 1.8.0_101, vendor: Oracle Corporation, runtime: C:\Program Files\
Java\jdk1.8.0_101\jre
Default locale: en_IN, platform encoding: Cp1256
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

goto user specified directory:

c:/>mvn archetype:generate

.....................
.....................

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive


contains): 1889: <press enter>
select version : 1.1

1: 1.0-alpha-1
2: 1.0-alpha-2
3: 1.0-alpha-3
4: 1.0-alpha-4
5: 1.0
6: 1.1
7: 1.3
8: 1.4
Choose a number: 8: 6

Step 4: Project package information

Define value for property 'groupId': com.maventest


Define value for property 'artifactId': mavenproject
Define value for property 'version' 1.0-SNAPSHOT: :
Define value for property 'package' com.maventest: :
Confirm properties configuration:
groupId: com.maventest
artifactId: mavenproject
version: 1.0-SNAPSHOT
package: com.maventest
Y: : Y

.........................................................................
.........................................................................

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:11 min
[INFO] Finished at: 2021-03-10T20:27:58+05:30
[INFO] -------------------------------------------------------

step 5: goto your project name directory


cd maventestproject

c:>mvn clean

c:>mvn clean package

step 6: convert our project to eclipse project

H:\Desktop\DevOps24\MavenProject\mavenproject>mvn eclipse:eclipse

------------------------------------------------------------------

How to import maven project into eclipse:

goto File -> Import -> Existing project into workspace-> Select root directory

You might also like