diff --git a/src/main/kotlin/com/beust/kobalt/internal/JvmCompiler.kt b/src/main/kotlin/com/beust/kobalt/internal/JvmCompiler.kt index 9f4e9db7..45755f58 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/JvmCompiler.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/JvmCompiler.kt @@ -4,6 +4,7 @@ import com.beust.kobalt.api.KobaltContext import com.beust.kobalt.api.Project import com.beust.kobalt.maven.DependencyManager import com.beust.kobalt.maven.IClasspathDependency +import com.beust.kobalt.maven.KobaltException import com.google.inject.Inject import java.io.File @@ -19,10 +20,18 @@ class JvmCompiler @Inject constructor(val dependencyManager: DependencyManager) val allDependencies = arrayListOf() allDependencies.addAll(info.dependencies) allDependencies.addAll(calculateDependencies(project, context, info.dependencies)) - JvmCompilerPlugin.validateClasspath(allDependencies.map { it.jarFile.get().absolutePath }) + validateClasspath(allDependencies.map { it.jarFile.get().absolutePath }) return action.compile(info.copy(dependencies = allDependencies)) } + private fun validateClasspath(cp: List) { + cp.forEach { + if (! File(it).exists()) { + throw KobaltException("Couldn't find $it") + } + } + } + /** * @return the classpath for this project, including the IClasspathContributors. */ diff --git a/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt b/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt index 3d378e7f..e7cdfbdb 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt @@ -30,14 +30,6 @@ abstract class JvmCompilerPlugin @Inject constructor( const val SOURCE_SET_MAIN = "main" const val SOURCE_SET_TEST = "test" const val DOCS_DIRECTORY = "docs/javadoc" - - fun validateClasspath(cp: List) { - cp.forEach { - if (! File(it).exists()) { - throw KobaltException("Couldn't find $it") - } - } - } } /**