I've set profiles in a pom.xml
, like shown as follows:
<profile>
<id><em>profileId1</em></id>
<build>
<filters>
<filter>src/main/filters/<em>profileId1</em>.properties</filter>
</filters>
// rest of the profile
</profile>
<profile>
<id><em>profileId2</em></id>
<build>
<filters>
<filter>src/main/filters/<em>profileId2</em>.properties</filter>
</filters>
// rest of the profile
</profile>
Question:
Is there any way to extract this piece from all the profiles, so that there is no need to repeat it for every profile (and possibly misspell it)?
question from:https://stackoverflow.com/questions/2012198/maven-can-i-reference-profile-id-in-profile-definition