diff --git a/pmd-cli/pom.xml b/pmd-cli/pom.xml index 2a9b53f3c1..0773366c89 100644 --- a/pmd-cli/pom.xml +++ b/pmd-cli/pom.xml @@ -47,6 +47,28 @@ + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-completion-artifact + + attach-artifact + + + + + ${project.build.directory}/pmd_completion.sh + sh + completion + + + + + + diff --git a/pmd-dist/pom.xml b/pmd-dist/pom.xml index 5d482c5a87..8bd93b1d3d 100644 --- a/pmd-dist/pom.xml +++ b/pmd-dist/pom.xml @@ -134,6 +134,14 @@ pmd-cli ${project.version} + + + net.sourceforge.pmd + pmd-cli + ${project.version} + sh + completion + net.sourceforge.pmd pmd-core diff --git a/pmd-dist/src/main/resources/assemblies/pmd-bin.xml b/pmd-dist/src/main/resources/assemblies/pmd-bin.xml index acd37c2cfe..c783dc530f 100644 --- a/pmd-dist/src/main/resources/assemblies/pmd-bin.xml +++ b/pmd-dist/src/main/resources/assemblies/pmd-bin.xml @@ -54,8 +54,25 @@ + runtime + + net.sourceforge.pmd:pmd-cli:sh:completion:* + + pmd-completion.sh + shell + 0755 + 0644 + false + + + + + runtime + + net.sourceforge.pmd:pmd-cli:sh:completion:* + lib 0755 0644