When creating a maven project, if you provide the groupID and package name values, maven will consider the package name to host your java class.
eg: -
mvn archetype: generate -DgroupId = gen.src -DartifactId = Iftekhar -DpackageName = com.src.Model -Dversion = 2.0-Snapshot
In the above scenerio, the App.java class will be created inside the com.src.Model package, and the value of groupId will not be considered.
But if you specified only the groupId value and not the package name, as shown below: -
mvn archetype: generate -DgroupId = com.src.Controller -DartifactId = Iftekhar -Dversion = 2.0-Snapshot
The app.java class will be created inside the com.src.Controller package.
thanks if the above answer was helpful.
user3747182
source share