code: 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;
      }
docs: Checks if profile is active.
  
  @param project the project
  @param profileName the profile name
  @return <code>true</code> if profile is active, otherwise <code>false</code>