diff --git a/src/main/kotlin/de/fraunhofer/iem/dataprovider/taskManager/tasks/DetektTask.kt b/src/main/kotlin/de/fraunhofer/iem/dataprovider/taskManager/tasks/DetektTask.kt index 45b5f0899795344a3d4b37104ecd15b40762b3cb..1fda82f8e3767dfeadf9bd658b5ddac042513ee5 100644 --- a/src/main/kotlin/de/fraunhofer/iem/dataprovider/taskManager/tasks/DetektTask.kt +++ b/src/main/kotlin/de/fraunhofer/iem/dataprovider/taskManager/tasks/DetektTask.kt @@ -4,6 +4,7 @@ import de.fraunhofer.iem.dataprovider.taskManager.model.Event import de.fraunhofer.iem.dataprovider.toolRun.ToolRunService import org.springframework.core.io.ClassPathResource import org.springframework.core.io.Resource +import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths import java.util.* @@ -21,4 +22,8 @@ class DetektTask( override val flags: Array<String> = arrayOf(resource.file.absolutePath, projectPath, outputPath) override val execPath: String = "/bin/sh" override val resultPath: Path = Paths.get(outputPath, "detekt", "report.sarif") + + init { + Files.createDirectories(Paths.get(outputPath, "detekt")) + } } diff --git a/src/main/kotlin/de/fraunhofer/iem/dataprovider/taskManager/tasks/OdcTask.kt b/src/main/kotlin/de/fraunhofer/iem/dataprovider/taskManager/tasks/OdcTask.kt index 0163c7b7ce6c1d1ab4e5f4452ae257b7d60e9d3d..0141584cbce3ea0da45c11c39998c15dddf4bbe3 100644 --- a/src/main/kotlin/de/fraunhofer/iem/dataprovider/taskManager/tasks/OdcTask.kt +++ b/src/main/kotlin/de/fraunhofer/iem/dataprovider/taskManager/tasks/OdcTask.kt @@ -4,6 +4,7 @@ import de.fraunhofer.iem.dataprovider.taskManager.model.Event import de.fraunhofer.iem.dataprovider.toolRun.ToolRunService import org.springframework.core.io.ClassPathResource import org.springframework.core.io.Resource +import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths import java.util.* @@ -20,4 +21,8 @@ class OdcTask( override val flags: Array<String> = arrayOf(resource.file.absolutePath, outputPath, projectPath) override val execPath: String = "/bin/sh" override val resultPath: Path = Paths.get(outputPath, "odc", "dependency-check-report.sarif") + + init { + Files.createDirectories(Paths.get(outputPath, "odc")) + } }