Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java

Dario Persechino
Dario Persechino
9,733 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