Skip to content
Snippets Groups Projects
Verified Commit 7842e347 authored by Jan-Niclas Strüwer's avatar Jan-Niclas Strüwer
Browse files

programmatically creating output directories.

parent 81dca508
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ import de.fraunhofer.iem.dataprovider.taskManager.model.Event ...@@ -4,6 +4,7 @@ import de.fraunhofer.iem.dataprovider.taskManager.model.Event
import de.fraunhofer.iem.dataprovider.toolRun.ToolRunService import de.fraunhofer.iem.dataprovider.toolRun.ToolRunService
import org.springframework.core.io.ClassPathResource import org.springframework.core.io.ClassPathResource
import org.springframework.core.io.Resource import org.springframework.core.io.Resource
import java.nio.file.Files
import java.nio.file.Path import java.nio.file.Path
import java.nio.file.Paths import java.nio.file.Paths
import java.util.* import java.util.*
...@@ -21,4 +22,8 @@ class DetektTask( ...@@ -21,4 +22,8 @@ class DetektTask(
override val flags: Array<String> = arrayOf(resource.file.absolutePath, projectPath, outputPath) override val flags: Array<String> = arrayOf(resource.file.absolutePath, projectPath, outputPath)
override val execPath: String = "/bin/sh" override val execPath: String = "/bin/sh"
override val resultPath: Path = Paths.get(outputPath, "detekt", "report.sarif") override val resultPath: Path = Paths.get(outputPath, "detekt", "report.sarif")
init {
Files.createDirectories(Paths.get(outputPath, "detekt"))
}
} }
...@@ -4,6 +4,7 @@ import de.fraunhofer.iem.dataprovider.taskManager.model.Event ...@@ -4,6 +4,7 @@ import de.fraunhofer.iem.dataprovider.taskManager.model.Event
import de.fraunhofer.iem.dataprovider.toolRun.ToolRunService import de.fraunhofer.iem.dataprovider.toolRun.ToolRunService
import org.springframework.core.io.ClassPathResource import org.springframework.core.io.ClassPathResource
import org.springframework.core.io.Resource import org.springframework.core.io.Resource
import java.nio.file.Files
import java.nio.file.Path import java.nio.file.Path
import java.nio.file.Paths import java.nio.file.Paths
import java.util.* import java.util.*
...@@ -20,4 +21,8 @@ class OdcTask( ...@@ -20,4 +21,8 @@ class OdcTask(
override val flags: Array<String> = arrayOf(resource.file.absolutePath, outputPath, projectPath) override val flags: Array<String> = arrayOf(resource.file.absolutePath, outputPath, projectPath)
override val execPath: String = "/bin/sh" override val execPath: String = "/bin/sh"
override val resultPath: Path = Paths.get(outputPath, "odc", "dependency-check-report.sarif") override val resultPath: Path = Paths.get(outputPath, "odc", "dependency-check-report.sarif")
init {
Files.createDirectories(Paths.get(outputPath, "odc"))
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.