Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Dario Persechino
Dario Persechino
9,736 Points

Problem and fix for Failed to execute Maven command line error

When following along with the Intro to Maven I had the following error when trying to run the command:

mvn archetype:generate -B -DgroudId=com.teamtreehouse -DartifactId=file-spy

Error (snippet) Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project standalone-pom: Archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.0 is not configured

I found a StackOverflow solution here: https://stackoverflow.com/questions/9181683/maven-3-failed-to-execute-goal-org-apache-maven-pluginsmaven-archetype-plugin

It suggests the command needs a couple of additional variables mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

So the command for this project that worked (for me) was: mvn archetype:generate -DgroupId=com.treehouse -DartifactId=file-spy -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false