close nav

close nav

Thread: How to create maven project

Forum : New To Java   23 Oct, 2021
User Image
Sriman

Contributor

Joined: 15 Jul, 2016

Points: 1820

Threads: 1923

Posts: 293

How to create maven project

| Quote Date : 23 Oct, 2021    Views:1174    

#1 goto your workspace directory
cd d:\work\spring\20211023\core/>
#2 type the below command for creating the maven project
mvn archetype:generate -DgroupId=org -DartifactId=projectName -Dversion=1.0 -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -archetypeVersion=1.4

tags: maven

Comments

User Image
Parinit

Newbie

Joined : 27 Oct, 2021

Points : 100

Threads: 0

Posts: 1

Re: How to create maven project

Reply Date : 23 Nov, 2021

In Step #2 - under last parameter 'D' is missing and has been updated in bellow cmd:
mvn archetype:generate -DgroupId=org -DartifactId=projectName -Dversion=1.0 -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4

User Image
Rajarao

Newbie

Joined : 27 Sep, 2021

Points : 100

Threads: 0

Posts: 1

Re: How to create maven project

Reply Date : 11 Nov, 2021

Please add -D for archetypeVersion=1.4
ex:-DarchetypeVersion=1.4
full ex:
mvn archetype:generate -DgroupId=org -DartifactId=projectName -Dversion=1.0 -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4

"Hi,
Please use -D before archetypeVersion:1.4
eg: -DarchetypeVersion:1.4"

Replied by Raja4455
User Image
Raja4455

Newbie

Joined : 11 Nov, 2020

Points : 100

Threads: 0

Posts: 1

Re: How to create maven project

Reply Date : 23 Oct, 2021

Hi,
Please use -D before archetypeVersion:1.4
eg: -DarchetypeVersion:1.4

F:\Spring\Workspace\Core>mvn archetype:generate -DgroupId=core -DartifactId=strategydp -Dversion=1.0 -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactI
d=maven-archetype-quickstart -archetypeVersion=1.4
Unable to parse command line options: Unrecognized option: -archetypeVersion=1.4
?

Replied by ttsb66
User Image
ttsb66

Newbie

Joined : 27 Sep, 2021

Points : 100

Threads: 0

Posts: 1

Re: How to create maven project

Reply Date : 23 Oct, 2021

F:\Spring\Workspace\Core>mvn archetype:generate -DgroupId=core -DartifactId=strategydp -Dversion=1.0 -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactI
d=maven-archetype-quickstart -archetypeVersion=1.4
Unable to parse command line options: Unrecognized option: -archetypeVersion=1.4
?

Load More

No More Comments