Navigatable () { if (myProject == null) return null; final List<MavenDomProfile> profiles = new ArrayList<>(); // search in "Per User Maven Settings" - %USER_HOME%/.m2/settings.xml // and in "Global Maven Settings" - %M2_HOME%/conf/settings.xml for (VirtualFile virtualFile : myMavenProjectsStructure.getProjectsManager().getGeneralSettings().getEffectiveSettingsFiles()) { if (virtualFile != null) { final MavenDomSettingsModel model = MavenDomUtil.getMavenDomModel(myProject, virtualFile, MavenDomSettingsModel.class); if (model != null) { addProfiles(profiles, model.getProfiles().getProfiles()); } } } for (MavenProject mavenProject : myMavenProjectsStructure.getProjectsManager().getProjects()) { // search in "Profile descriptors" - located in project basedir (profiles.xml) final VirtualFile mavenProjectFile = mavenProject.getFile(); final VirtualFile profilesXmlFile = MavenUtil.findProfilesXmlFile(mavenProjectFile); if (profilesXmlFile != null) { final MavenDomProfiles profilesModel = MavenDomUtil.getMavenDomProfilesModel(myProject, profilesXmlFile); if (profilesModel != null) { addProfiles(profiles, profilesModel.getProfiles()); } } // search in "Per Project" - Defined in the POM itself (pom.xml) final MavenDomProjectModel projectModel = MavenDomUtil.getMavenDomProjectModel(myProject, mavenProjectFile); if (projectModel != null) { addProfiles(profiles, projectModel.getProfiles().getProfiles()); } } return getNavigatable(profiles); }