appengine: fixed starting enhancer for latest versions of SDK

This commit is contained in:
nik
2014-07-24 15:58:22 +04:00
parent 649e6b93fa
commit 307f4025a4
3 changed files with 11 additions and 0 deletions
@@ -113,7 +113,11 @@ public class AppEngineEnhancerBuilder extends ModuleLevelBuilder {
List<String> classpath = new ArrayList<String>();
classpath.add(extension.getToolsApiJarPath());
classpath.add(PathManager.getJarPathForClass(EnhancerRunner.class));
boolean removeOrmJars = Boolean.parseBoolean(System.getProperty("jps.appengine.enhancer.remove.orm.jars", "true"));
for (File file : JpsJavaExtensionService.dependencies(module).recursively().compileOnly().productionOnly().classes().getRoots()) {
if (removeOrmJars && FileUtil.isAncestor(new File(extension.getOrmLibPath()), file, true)) {
continue;
}
classpath.add(file.getAbsolutePath());
}
@@ -26,6 +26,8 @@ import java.util.List;
public interface JpsAppEngineModuleExtension extends JpsElement {
JpsModule getModule();
String getOrmLibPath();
String getSdkHomePath();
boolean isRunEnhancerOnMake();
@@ -70,6 +70,11 @@ public class JpsAppEngineModuleExtensionImpl extends JpsElementBase<JpsAppEngine
return FileUtil.toSystemDependentName(JpsArtifactPathUtil.appendToPath(getSdkHomePath(), LIB_APPENGINE_TOOLS_API_JAR));
}
@Override
public String getOrmLibPath() {
return FileUtil.toSystemDependentName(JpsArtifactPathUtil.appendToPath(getSdkHomePath(), "/lib/user/orm"));
}
@Override
public String getSdkHomePath() {
return myProperties.mySdkHomePath;