Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

maven approaches

hI,

i was reading about maven as below


Maven Project can be generated in two ways:-

Without argument( inside mvn archetype:generate )
With argument (inside mvn archetype:generate)

I wonder why we need maven. What are the advantages of it. What are above two approaches of creating maven project.


I downloaded maven 3.05 from
http://maven.apache.org/download.cgi

I gave command
mvn -version
it printed maven3.05

I created on folder called TestMaven in C drive.

I went to C:\TestMaven from windows command prompt on my windows 7 laptop.

I gave command ther saying

 mvn archetype:generate

I see .m2 folder created
C:\Users\xyz\.m2
then
I am gettign errors in command prompt as below

I see many
'Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave.....'
also at the end

'No Plugin found for prefix 'archetype'
 mvn archetype:generate

I could not give below as next steps


Archetype
Group Id
Artifact Id

Version  and
package

What for above definitions used?

Please advise on how to set up and run maven projects.


Any links resources ideas highly appreciated. Thanks in advance
Avatar of girionis
girionis
Flag of Greece image

Avatar of gudii9

ASKER

>>>Without argument( inside mvn archetype:generate )
>>With argument (inside mvn archetype:generate)


when i gave command on the command prompt
 (without aruments inside archetype:generate like Archetype (this is project type by default it is no 16  i.e quickstart)
Group Id (package name)

Artifact Id (application name)

Version  and
package
)
i got error message as below.not sure what is the issue

C:\Users\mavenTests>mvn archetype:generate
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 o
r one of its dependencies could not be resolved: Failed to read artifact descrip
tor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
install-plugin/2.3.1/maven-install-plugin-2.3.1.pom


I would like to know what is the difference between above two approaches and which one to use in which practical scenario. please advise
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial