Search in sources :

Example 1 with ProfileApplicationResult

use of org.jetbrains.idea.maven.server.ProfileApplicationResult in project intellij-community by JetBrains.

the class MavenProjectReader method doReadProjectModel.

private Pair<RawModelReadResult, MavenExplicitProfiles> doReadProjectModel(MavenGeneralSettings generalSettings, VirtualFile file, MavenExplicitProfiles explicitProfiles, Set<VirtualFile> recursionGuard, MavenProjectReaderProjectLocator locator) {
    RawModelReadResult cachedModel = myRawModelsCache.get(file);
    if (cachedModel == null) {
        cachedModel = doReadProjectModel(file, false);
        myRawModelsCache.put(file, cachedModel);
    }
    // todo modifying cached model and problems here??????
    MavenModel model = cachedModel.model;
    Set<String> alwaysOnProfiles = cachedModel.alwaysOnProfiles;
    Collection<MavenProjectProblem> problems = cachedModel.problems;
    model = resolveInheritance(generalSettings, model, file, explicitProfiles, recursionGuard, locator, problems);
    addSettingsProfiles(generalSettings, model, alwaysOnProfiles, problems);
    ProfileApplicationResult applied = applyProfiles(model, getBaseDir(file), explicitProfiles, alwaysOnProfiles);
    model = applied.getModel();
    repairModelBody(model);
    return Pair.create(new RawModelReadResult(model, problems, alwaysOnProfiles), applied.getActivatedProfiles());
}
Also used : ProfileApplicationResult(org.jetbrains.idea.maven.server.ProfileApplicationResult)

Aggregations

ProfileApplicationResult (org.jetbrains.idea.maven.server.ProfileApplicationResult)1