Unable to generate a Java project by using maven command on Windows OS

Solution Verified - Updated -

Issue

The instruction on the official document does not work on my Windows environment.
https://access.redhat.com/documentation/en-us/red_hat_build_of_apache_camel/4.4/html/getting_started_with_red_hat_build_of_apache_camel_for_spring_boot/getting-started-with-camel-spring-boot_csb#generating-a-csb-application-using-maven

mvn archetype:generate \
 -DarchetypeGroupId=org.apache.camel.archetypes \
 -DarchetypeArtifactId=camel-archetype-spring-boot \
 -DarchetypeVersion=4.4.0.redhat-00014 \
 -DgroupId=com.redhat \
 -DartifactId=csb-app \
 -Dversion=1.0-SNAPSHOT \
 -DinteractiveMode=false

By executing the command on the PowerShell, the result end with ERROR.

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\xxx\xxx). Please verify you invoked Maven from the correct directory. -> [Help 1]
org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to execute but there is no POM in this directory (C:\xxx\xxx). Please verify you invoked Maven from the correct directory.

Environment

  • Red Hat Build of Apache Camel
    • 4.x
  • Windows OS
    • PowerShell

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content