I am looking at few maven tutorial videos and then I ran into this command after installing maven:
mvn archetype:create -DgroupId=com.di.maven -DartifactId=hello-world
The build fails and throws the following 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 -> [Help 1]
What is the reason and how can I fix it? I am running as an user in Ubuntu.
For example, to compile your project maven uses maven-compiler-plugin , to run tests - maven-surefire-plugin and so on. Dependency in terms of maven is a packaged piece of classes that your project depends on. It can be jar, war etc.
groupId This element indicates the unique identifier of the organization or group that created the project. The groupId is one of the key identifiers of a project and is typically based on the fully qualified domain name of your organization. For example org. apache. maven.
change create
to generate
mvn archetype:generate -DgroupId=com.di.maven -DartifactId=hello-world -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
mvn archetype:create
is deprecated in Maven 3.0.5 and beyond, as mentioned in the documentation
Use mvn archetype:generate
instead:
mvn archetype:generate -DarchetypeArtifactId=maven-archetype-archetype
This is an interactive command and will ask for values like groupId
, artifactId
, version
, etc. You can also specify these values in the command and choose the non-interactive mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With