Maven – Can I reference profile id in profile definition?

With maven 2.2.1 and later, I was able to get the ID of the first active profile using:

${project.activeProfiles[0].id}

Of course this fails if there is not a least one active profile.

Using the

${project.profiles[0].id}

as suggested by Pascal did not work for me.

Hint: While investigating this, I really started to love mvn help:evaluate.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)