diff --git a/README.md b/README.md index f99eda9..86d5c2e 100755 --- a/README.md +++ b/README.md @@ -12,26 +12,27 @@ To check all source code using the [java quickstart rule](https://pmd.github.io/ ```java @BuildCommand public void pmd() throws Exception { - new PmdOperation + new PmdOperation() .fromProject(this) .execute(); } ``` + ```text ./bld pmd test ``` -To check the main source code using a custom rule, [java error prone rule](https://pmd.github.io/pmd/pmd_rules_java.html) and failing on any violation. +To check the main source directory using a custom rule, [java error prone rule](https://pmd.github.io/pmd/pmd_rules_java.html) and failing on any violation. ```java @BuildCommand public void pmdMain() throws Exception { - new PmdOperation - .fromProject(this) - .failOnValidation(true) - .addInputPath(project.srcMainDirectory().toPath()) - .addRuletSet("config/pmd.xml", "category/java/errorprone.xml"); - .execute(); + new PmdOperation() + .fromProject(this) + .failOnViolation(true) + .inputPaths(this.srcMainDirectory().toPath()) + .ruleSets("config/pmd.xml", "category/java/errorprone.xml") + .execute(); } ``` diff --git a/src/bld/java/rife/bld/extension/PmdOperationBuild.java b/src/bld/java/rife/bld/extension/PmdOperationBuild.java index f21951d..34e50ba 100644 --- a/src/bld/java/rife/bld/extension/PmdOperationBuild.java +++ b/src/bld/java/rife/bld/extension/PmdOperationBuild.java @@ -16,7 +16,7 @@ public class PmdOperationBuild extends Project { public PmdOperationBuild() { pkg = "rife.bld.extension"; name = "bld-pmd"; - version = version(0, 9, 0, "SNAPSHOT"); + version = version(0, 9, 1, "SNAPSHOT"); javaRelease = 17; downloadSources = true; @@ -40,7 +40,7 @@ public class PmdOperationBuild extends Project { .link("https://javadoc.io/doc/net.sourceforge.pmd/pmd-core/latest/"); publishOperation() -// .repository(MAVEN_LOCAL) + // .repository(MAVEN_LOCAL) .repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2")) .info() .groupId("com.uwyn.rife2")