public Set < Plugin > getProfilePlugins ( MavenProject project ) { Set < Plugin > result = new HashSet < Plugin > ( ) ; @ SuppressWarnings ( "unchecked" ) List < Profile > profiles = project . getActiveProfiles ( ) ; if ( profiles != null && ! profiles . isEmpty ( ) ) { for ( Profile p : profiles ) { BuildBase b = p . getBuild ( ) ; if ( b != null ) { @ SuppressWarnings ( "unchecked" ) List < Plugin > plugins = b . getPlugins ( ) ; if ( plugins != null ) { result . addAll ( plugins ) ; } } } } return result ; }
Finds the plugins that are listed in active profiles .