Meta-profiles in Maven

I'm looking for a way to create meta-profiles that just activate sub-profiles in Maven. Let's take a very concrete example. I have the following profiles:

  • "server-jboss"
  • "server-tomcat"
  • "database-hsql"
  • "database-oracle"

To build the project, you have to choose 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 that comes is to activate the subprofiles by a property:


But this way, I cannot share subprofiles between meta-profiles. For example, I want my profile "database-oracle" to be activated by both "pre-prod" and "prod" meta-profiles.

Note: my sub-profiles just contain properties. They are used for filtering resources and in the child poms. This is why I think there could be a solution for this particular situation.

The ideal situation for me would be to have them externalized in external properties files, but one issue at a time ;)


Activating profiles from another profile is not possible (this has been discussed in this previous question). Your first idea, using identical properties to activate different profiles, is the best thing you can implement but has indeed limitations.

Have you tried a solution using the maven-properties-plugin? Some possibilities are discussed in this question and here.

Need Your Help

Problems subsetting columns based on values from two separate dataframes

r dataframe dplyr mapply

I am using data obtained from a spatially gridded system, for example a city divided up into equally spaced squares (e.g. 250m2 cells). Each cell possesses a unique column and row number with

How can I wire users with their respective folders in ASP.NET?

membership roles

When userA uploads a file, his files will be uploaded to folderA, when userB, to folderB, and so on. Roles/Profiles in ASP.NET. Folders will be pre-existing. Anyone?