Search in sources :

Example 11 with BuildDataPaths

use of org.jetbrains.jps.builders.storage.BuildDataPaths in project intellij-plugins by JetBrains.

the class OsgiBuildUtil method findMavenProjectPath.

private static File findMavenProjectPath(CompileContext context, JpsModule module) {
    BuildDataPaths dataPaths = context.getProjectDescriptor().dataManager.getDataPaths();
    MavenProjectConfiguration projectConfig = JpsMavenExtensionService.getInstance().getMavenProjectConfiguration(dataPaths);
    if (projectConfig != null) {
        MavenModuleResourceConfiguration moduleConfig = projectConfig.moduleConfigurations.get(module.getName());
        if (moduleConfig != null) {
            return new File(FileUtil.toSystemDependentName(moduleConfig.directory), "pom.xml");
        }
    }
    return null;
}
Also used : MavenProjectConfiguration(org.jetbrains.jps.maven.model.impl.MavenProjectConfiguration) BuildDataPaths(org.jetbrains.jps.builders.storage.BuildDataPaths) MavenModuleResourceConfiguration(org.jetbrains.jps.maven.model.impl.MavenModuleResourceConfiguration) File(java.io.File)

Aggregations

BuildDataPaths (org.jetbrains.jps.builders.storage.BuildDataPaths)11 IOException (java.io.IOException)5 File (java.io.File)4 BuildDataPathsImpl (org.jetbrains.jps.builders.impl.BuildDataPathsImpl)4 BuildRootIndexImpl (org.jetbrains.jps.builders.impl.BuildRootIndexImpl)4 BuildTargetRegistryImpl (org.jetbrains.jps.builders.impl.BuildTargetRegistryImpl)4 ModuleExcludeIndex (org.jetbrains.jps.indices.ModuleExcludeIndex)4 IgnoredFileIndexImpl (org.jetbrains.jps.indices.impl.IgnoredFileIndexImpl)4 ModuleExcludeIndexImpl (org.jetbrains.jps.indices.impl.ModuleExcludeIndexImpl)4 BuildTargetIndexImpl (org.jetbrains.jps.builders.impl.BuildTargetIndexImpl)3 CompilerMessage (org.jetbrains.jps.incremental.messages.CompilerMessage)3 ProgressMessage (org.jetbrains.jps.incremental.messages.ProgressMessage)3 BuildDataManager (org.jetbrains.jps.incremental.storage.BuildDataManager)3 BuildTargetsState (org.jetbrains.jps.incremental.storage.BuildTargetsState)3 ProjectTimestamps (org.jetbrains.jps.incremental.storage.ProjectTimestamps)3 ProjectDescriptor (org.jetbrains.jps.cmdline.ProjectDescriptor)2 BuildFSState (org.jetbrains.jps.incremental.fs.BuildFSState)2 MavenModuleResourceConfiguration (org.jetbrains.jps.maven.model.impl.MavenModuleResourceConfiguration)2 MavenProjectConfiguration (org.jetbrains.jps.maven.model.impl.MavenProjectConfiguration)2 HashSet (com.intellij.util.containers.HashSet)1