diff --git a/pom.xml b/pom.xml
index c41208d..b284f70 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.github.ozsie
detekt-maven-plugin
- 1.0.0-RC14-2
+ 1.0.0-RC14-3
maven-plugin
detekt-maven-plugin Maven Plugin
@@ -39,7 +39,7 @@
UTF-8
1.3.21
1.0.0-RC14
- 1.0.0-RC14
+ 1.0.0-RC14-2
1.72
1.21
@@ -117,7 +117,7 @@
org.jetbrains.kotlin
kotlin-test
- ${kotlin.version}
+ ${kotlin.version}
test
@@ -230,6 +230,7 @@
verify
check
+ xml:reports/detekt.xml
.*test.*
diff --git a/src/main/java/com/github/ozsie/CheckMojo.kt b/src/main/java/com/github/ozsie/CheckMojo.kt
index 9c75ecb..f4d2f1b 100644
--- a/src/main/java/com/github/ozsie/CheckMojo.kt
+++ b/src/main/java/com/github/ozsie/CheckMojo.kt
@@ -16,6 +16,9 @@ import java.nio.file.Paths
requiresDependencyResolution = ResolutionScope.TEST)
class CheckMojo : DetektMojo() {
override fun execute() {
+ getCliSting().forEach {
+ log.debug("Applying $it")
+ }
val cliArgs = parseArguments(getCliSting().log().toTypedArray()).first
if (mavenProject?.basedir != null) {
skip = !Files.isDirectory(Paths.get("${mavenProject?.basedir}/src"))
diff --git a/src/main/java/com/github/ozsie/CreateBaselineMojo.kt b/src/main/java/com/github/ozsie/CreateBaselineMojo.kt
index 0b9100e..02c646f 100644
--- a/src/main/java/com/github/ozsie/CreateBaselineMojo.kt
+++ b/src/main/java/com/github/ozsie/CreateBaselineMojo.kt
@@ -9,6 +9,9 @@ import org.apache.maven.plugins.annotations.Mojo
@Mojo(name = "create-baseline")
open class CreateBaselineMojo : DetektMojo() {
override fun execute() {
+ getCliSting().forEach {
+ log.debug("Applying $it")
+ }
val cliArgs = parseArguments(cliString).first
if (!skip) Runner(cliArgs).execute()
}
diff --git a/src/main/java/com/github/ozsie/DetektMojo.kt b/src/main/java/com/github/ozsie/DetektMojo.kt
index 79e0526..3ce7c81 100644
--- a/src/main/java/com/github/ozsie/DetektMojo.kt
+++ b/src/main/java/com/github/ozsie/DetektMojo.kt
@@ -21,6 +21,8 @@ const val PLUGINS = "-p"
const val PRINT_AST = "--print-ast"
const val RUN_RULE = "--run-rule"
const val REPORT = "-r"
+const val BUILD_UPON_DEFAULT_CONFIG = "--build-upon-default-config"
+const val FAIL_FAST = "--fail-fast"
const val MDP_ID = "com.github.ozsie:detekt-maven-plugin"
@@ -66,6 +68,12 @@ abstract class DetektMojo : AbstractMojo() {
@Parameter(property = "detekt.disableDefaultRuleset", defaultValue = "false")
var disableDefaultRuleset = false
+ @Parameter(property = "detekt.buildUponDefaultConfig", defaultValue = "false")
+ var buildUponDefaultConfig = false
+
+ @Parameter(property = "detekt.failFast", defaultValue = "false")
+ var failFast = false
+
@Parameter(property = "detekt.runRule", defaultValue = "")
var runRule = ""
@@ -93,6 +101,8 @@ abstract class DetektMojo : AbstractMojo() {
.useIf(runRule.isNotEmpty(), RUN_RULE, runRule)
.useIf(report.isNotEmpty(), toArgList(report))
.useIf(printAst, PRINT_AST)
+ .useIf(buildUponDefaultConfig, BUILD_UPON_DEFAULT_CONFIG)
+ .useIf(failFast, FAIL_FAST)
.useIf(disableDefaultRuleset, DISABLE_DEFAULT_RULE_SET)
.useIf(plugins.isNotEmpty(), PLUGINS, plugins.buildPluginPaths(mavenProject, localRepoLocation))
}