Maven Build Profiles
Maven Build Profiles
Beginner to Guru
• Per User
• Defined in <user home>/.m2/settings.xml
• Global
• Defined in <Maven Home>/conf/settings.xml
Declaring Build Profiles
• Profile Descriptor
• Defined in profiles.xml
• Not Supported by Maven 3.0 (Released in 2010)
• Protection of secrets
• Environment Config values
Combo of Declaration Methods?
• Can you define profile values in both POM and settings.xml for the same profile?
• Short answer is yes. . .
• Not recommended
• testResources
• finalName
View Active Profiles
• Command: mvn help:active-profiles
• Note should be used with relevant CLI options
• mvn help:active-profiles -P <profile-1>