protected boolean isProfileActive ( MavenProject project , String profileName ) { @ SuppressWarnings ( "unchecked" ) List < Profile > activeProfiles = project . getActiveProfiles ( ) ; if ( activeProfiles != null && ! activeProfiles . isEmpty ( ) ) { for ( Profile profile : activeProfiles ) { if ( profile . getId ( ) . equals ( profileName ) ) { return true ; } } } return false ; }
Checks if profile is active .