Step 1: Open Terminal
Step 2: Generate Project
If there is already a folder named MyMavenApp then change the -DrartifactId value to some other name or delete the MyMavenApp folder.
mvn archetype:generate -DgroupId=com.example -DartifactId=MyMavenApp -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Step 3: Navigate to Project Directory
cd MyMavenApp
To visualize the structure of the generated Maven project, you can use the tree command.
If tree is not already installed on your system, run the following command in your terminal:
sudo snap install tree
Then, navigate to your project directory (e.g., cd MyMavenApp) and run:
tree

Key files and directories:
pom.xmlsrc/main/java/com/example/App.javasrc/test/java/com/example/AppTest.javapom.xml)