Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to choose filter number while creating the maven project?

Tags:

spring

maven

I am new to maven and wanted to create a spring project using maven. Below mentioned is the command I am using:

mvn archetype:generate -DgroupId=com.rakesh.core -DartifactId=Spring3Example 
-DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

It is asking for :

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

What it is asking for? I tried all the numbers, I am getting this message:

Your filter doesn't match any archetype (hint: enter to return to initial list)

Please help.

like image 387
Rakesh Ss Avatar asked Jul 20 '13 14:07

Rakesh Ss


People also ask

What is archetype selection in Maven?

In short, Archetype is a Maven project templating toolkit. An archetype is defined as an original pattern or model from which all other things of the same kind are made. The name fits as we are trying to provide a system that provides a consistent means of generating Maven projects.

What is Y in Maven?

After entering these information, Maven will show you all the information you entered and ask you to verify project creation. If you press Y and then enter, voila your project is created with the artifact and settings you chose.

Which Maven command do you use for creating project using archetype plugin?

maven. archetype</groupId> <artifactId>archetype-packaging</artifactId>

What should be the archetype for Maven project in Eclipse?

The Lagom Maven archetype allows you to quickly create a project for development.


1 Answers

I was having the same problem while copy and pasting an example from a tutorial. After fiddling around with it I found out it was a whitespace issue. I pasted the command into a text editor and deleted a few whitespaces:

mvn archetype:generate -DgroupId=com.mkyong.common -DartifactId=RESTfulExample -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

That did the trick for me.

like image 93
Rutger Huijsmans Avatar answered Nov 08 '22 09:11

Rutger Huijsmans