[ 
https://issues.apache.org/jira/browse/SSHD-748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Goldstein Lyor updated SSHD-748:
--------------------------------
    Summary: Activate Maven PMD plugin in the project  (was: Active Maven PMD 
plugin in the project)

> Activate Maven PMD plugin in the project
> ----------------------------------------
>
>                 Key: SSHD-748
>                 URL: https://issues.apache.org/jira/browse/SSHD-748
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 1.5.0
>            Reporter: Goldstein Lyor
>            Assignee: Goldstein Lyor
>              Labels: checkstyle, pmd
>             Fix For: 1.6.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> {code:xml|title=Properties section}
> <!-- See https://pmd.github.io/ for available latest version -->
> <pmd.version>5.1.6</pmd.version>
> {code}
> {code:xml|title=Build section}
> <plugin> 
>                <!-- to disable - mvn [commands...] -Dpmd.skip --> 
>                <groupId>org.apache.maven.plugins</groupId> 
>                <artifactId>maven-pmd-plugin</artifactId> 
>                <configuration> 
>                    <rulesets> 
>                        
> <ruleset>${workspace.root.dir}${file.separator}pmd-ruleset-sshd.xml</ruleset>
>                    </rulesets> 
>                    <ncludeTests>true</includeTests>
>                </configuration> 
>                <executions> 
>                    <execution> 
>                        <id>pmd-checker</id> 
>                        <!-- Note: phase must be AFTER detection of workspace 
> root dir --> 
>                        <phase>verify</phase> 
>                        <goals> 
>                            <goal>check</goal> 
>                        </goals> 
>                    </execution> 
>                </executions> 
>            </plugin>
> {code}
> {code:xml|title=Plugins management}
> <plugin> 
>                    <groupId>org.apache.maven.plugins</groupId> 
>                    <artifactId>maven-pmd-plugin</artifactId> 
>                    <version>3.8</version> 
>                    <configuration> 
>                        <targetJdk>${javac.target}</targetJdk> 
>                        <printFailingErrors>true</printFailingErrors> 
>                        <skipPmdError>false</skipPmdError> 
>                        <excludeRoots> 
>                            
> <excludeRoot>target/generated-sources/java</excludeRoot> 
>                        </excludeRoots> 
>                    </configuration> 
>                    <dependencies> 
>                        <dependency> 
>                           <groupId>net.sourceforge.pmd</groupId> 
>                           <artifactId>pmd-core</artifactId> 
>                           <version>${pmd.version}</version> 
>                        </dependency> 
>                        <dependency> 
>                           <groupId>net.sourceforge.pmd</groupId> 
>                           <artifactId>pmd-java</artifactId> 
>                           <version>${pmd.version}</version> 
>                        </dependency> 
>                    </dependencies> 
>                </plugin>
> {code}
> {code:xml|title=Reporting section}
> <reporting> 
>        <plugins> 
>            <plugin>    <!-- used by PMD to create a source XREF --> 
>                <groupId>org.apache.maven.plugins</groupId> 
>                <artifactId>maven-jxr-plugin</artifactId> 
>                <version>2.5</version> 
>            </plugin> 
>        </plugins> 
>    </reporting>
> {code}
> {code:xml|title=pmd-ruleset-sshd.xml}
> <?xml version="1.0"?> 
> <ruleset name="MINA SSHD PMD ruleset" 
>    xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"; 
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
>    xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 
> http://pmd.sourceforge.net/ruleset_2_0_0.xsd";> 
>    <description> 
>        This ruleset defines the PMD rules for MINA SSHD project 
>    </description> 
>        <!-- See https://pmd.github.io/pmd-5.6.1/pmd-java/rules/index.html --> 
>    <rule ref="rulesets/java/basic.xml/BooleanInstantiation" /> 
>    <rule ref="rulesets/java/basic.xml/ExtendsObject" /> 
>    <rule ref="rulesets/java/braces.xml" /> 
>    <rule ref="rulesets/java/clone.xml/ProperCloneImplementation" /> 
>    <rule ref="rulesets/java/clone.xml/CloneMethodMustImplementCloneable" /> 
>    <rule ref="rulesets/java/javabeans.xml/MissingSerialVersionUID" /> 
>    <rule ref="rulesets/java/logging-java.xml/AvoidPrintStackTrace" /> 
> </ruleset>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to