I am looking for a way to create metaprofiles that simply activate subprofiles in Maven. Let's take a very concrete example. I have the following profiles:
- "JBoss server"
- server cat
- "HSQL databases"
- "Oracle database"
To create a project, you need to select one profile for the server and one for the database. I want to create two "meta profiles":
- "dev" => "server-tomcat", "database-hsql"
- "prod" => "server-jboss", "database-oracle"
The first idea is to activate subprofiles by property:
<profile> <id>database-oracle</id> <activation> <property> <name>prod</name> </property> </activation> </profile>
But in this way I cannot share subprofiles between metaprofiles. For example, I want my database-oracle profile to be activated by both the pre-prod and prod meta profiles.
Note: my subprofiles just contain properties. They are used to filter resources and for priests. That is why I think there might be a solution for this particular situation.
The ideal situation for me would be that they are externalized in external property files, but for one problem at a time;)
source share