Creating quickstart maven project with different default class name

Following Maven quickstart tutorial on http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html, I've got this project structure: enter image description here

Is it possible to have my default class and test class being named like MyApp.java and MyAppTest.java instead of App.java and AppTest.java without having to manually rename them?

I am hoping for a one-liner command that would create me a project with that kind of structure and that would be slightly different than one they used: mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Upvotes: 1

Views: 524

Answers (1)

Kysil Ivan
Kysil Ivan

Reputation: 1037

No, it is impossible. Archetype is project template packed in .jar file. In your case maven-archetype-quickstart-1.1.jar, can find it here http://mvnrepository.com/artifact/org.apache.maven.archetypes/maven-archetype-quickstart/1.1

If you look into jar, you'll see that project layout is saved in folder maven-archetype-quickstart-1.1.jar/archetype-resources.

You can also create your own archetype : http://maven.apache.org/archetype/maven-archetype-plugin/

Upvotes: 1

Related Questions