Accepted answer

no it's not possible to set groupid and artifact id using properties file.but for profile setting using pom directly you can use below option.

"profiles can be explicitly specified using the -p cli option.this option takes an argument that is a comma-delimited list of profile-ids to use. when this option is specified, the profile(s) specified in the option argument will be activated in addition to any profiles which are activated by their activation configuration or the section in settings.xml"

profiles can be activated in the maven settings, via the section. this section takes a list of elements, each containing a <profile-id> inside.


in case of using spring boot you can also apply,profile-2

checkout this url for further more


you want to built two or more different jars depending on the active profile set in project.

maven can support this see ,which creates profiles for building and packaging artifacts for different environments.

this feature was meant to support different build environments e.g production,development,testing... but i don't think anyone will be arresting you if you use profiles to modularize your project.

Related Query

More Query from same tag