Andrew Tobilko Andrew Tobilko - 1 year ago 115
Java Question

Why can't I create a Maven project?

mvn -version

mvn -version

mvn archetype:create \
> -DgroupId=com.tobilko \
> -DartifactId=site \
> -DarchetypeArtifactId=maven-archetype-webapp

I'm going to create a project with Maven using a
archetype. Why can't I do it? I've just started learning Maven so the error doesn't tells me anything:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-
plugin:2.3:create (default-cli) on project standalone-pom: Unable to
parse configuration of mojo org.apache.maven.plugins:maven-archetype
plugin:2.3:create for parameter #: Abstract class or interface
'org.apache.maven.artifact.repository.ArtifactRepository' cannot be
instantiated: org.apache.maven.artifact.repository.ArtifactRepository.
<init>() -> [Help 1]

I don't want to have any other archetypes or a default archetype.

Answer Source

Dont use create use generate . Something like this

mvn archetype:generate 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download