use of org.jetbrains.jps.maven.model.impl.MavenModuleResourceConfiguration in project intellij-plugins by JetBrains.
the class OsgiBuildUtil method collectMavenProjectProperties.
private static void collectMavenProjectProperties(CompileContext context, JpsModule module, final Properties result) {
BuildDataPaths dataPaths = context.getProjectDescriptor().dataManager.getDataPaths();
MavenProjectConfiguration projectConfig = JpsMavenExtensionService.getInstance().getMavenProjectConfiguration(dataPaths);
if (projectConfig != null) {
JpsJavaExtensionService.dependencies(module).recursively().productionOnly().processModules(module1 -> {
MavenModuleResourceConfiguration moduleConfig = projectConfig.moduleConfigurations.get(module1.getName());
if (moduleConfig != null) {
for (Map.Entry<String, String> entry : moduleConfig.properties.entrySet()) {
result.setProperty(entry.getKey(), entry.getValue());
}
}
});
}
}
use of org.jetbrains.jps.maven.model.impl.MavenModuleResourceConfiguration 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;
}
Aggregations