compile server: canonicalize output paths and library classpath

This commit is contained in:
nik
2012-03-14 10:11:42 +04:00
parent 6b6586b01d
commit ca6bf7d2b5
2 changed files with 7 additions and 5 deletions
@@ -1,5 +1,7 @@
package org.jetbrains.jps
import com.intellij.openapi.util.io.FileUtil
/**
* @author max
*/
@@ -23,11 +25,11 @@ class Library extends LazyInitializeableObject implements ClasspathItem {
Closure lazyInit = {
def meta = new InitializingExpando()
meta.classpath = {Object[] arg ->
arg.each { classpath << it.toString() }
arg.each { classpath << FileUtil.toCanonicalPath(it.toString()) }
}
meta.src = {Object[] arg ->
arg.each { sourceRoots << it.toString() }
arg.each { sourceRoots << FileUtil.toCanonicalPath(it.toString()) }
}
initializer.delegate = meta
@@ -291,7 +291,7 @@ public class IdeaProjectLoader {
}
def outputTag = componentTag?.output?.getAt(0)
String outputPath = outputTag != null ? IdeaProjectLoadingUtil.pathFromUrl(outputTag.'@url') : null
projectOutputPath = outputPath != null && outputPath.length() > 0 ? projectMacroExpander.expandMacros(outputPath) : null
projectOutputPath = outputPath != null && outputPath.length() > 0 ? FileUtil.toCanonicalPath(projectMacroExpander.expandMacros(outputPath)) : null
project.projectSdk = sdk
projectLanguageLevel = componentTag?."@languageLevel"
}
@@ -540,8 +540,8 @@ public class IdeaProjectLoader {
}
}
else {
currentModule.outputPath = moduleMacroExpander.expandMacros(IdeaProjectLoadingUtil.pathFromUrl(componentTag.output[0]?.@url))
currentModule.testOutputPath = moduleMacroExpander.expandMacros(IdeaProjectLoadingUtil.pathFromUrl(componentTag."output-test"[0]?.'@url'))
currentModule.outputPath = FileUtil.toCanonicalPath(moduleMacroExpander.expandMacros(IdeaProjectLoadingUtil.pathFromUrl(componentTag.output[0]?.@url)))
currentModule.testOutputPath = FileUtil.toCanonicalPath(moduleMacroExpander.expandMacros(IdeaProjectLoadingUtil.pathFromUrl(componentTag."output-test"[0]?.'@url')))
if (currentModule.testOutputPath == null) {
currentModule.testOutputPath = currentModule.outputPath
}