private void addProfiles ( MavenPomDescriptor pomDescriptor , Model model , ScannerContext scannerContext ) { List < Profile > profiles = model . getProfiles ( ) ; Store store = scannerContext . getStore ( ) ; for ( Profile profile : profiles ) { MavenProfileDescriptor mavenProfileDescriptor = store . create ( MavenProfileDescriptor . class ) ; pomDescriptor . getProfiles ( ) . add ( mavenProfileDescriptor ) ; mavenProfileDescriptor . setId ( profile . getId ( ) ) ; addProperties ( mavenProfileDescriptor , profile . getProperties ( ) , store ) ; addModules ( mavenProfileDescriptor , profile . getModules ( ) , store ) ; addPlugins ( mavenProfileDescriptor , profile . getBuild ( ) , scannerContext ) ; addManagedPlugins ( mavenProfileDescriptor , profile . getBuild ( ) , scannerContext ) ; addDependencies ( mavenProfileDescriptor , ProfileDeclaresDependencyDescriptor . class , ProfileManagesDependencyDescriptor . class , profile , scannerContext ) ; addActivation ( mavenProfileDescriptor , profile . getActivation ( ) , store ) ; addRepository ( of ( mavenProfileDescriptor ) , profile . getRepositories ( ) , store ) ; } }
Adds information about defined profile .