GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pmd-examples/maven/simple-project at main · pmd/pmd-examples

Expand file tree

/

simple-project

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

simple-project

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
.ci
.ci
 
 
.mvn/wrapper
.mvn/wrapper
 
 
src/main/java/net/sourceforge/pmd/examples/maven/simpleproject
src/main/java/net/sourceforge/pmd/examples/maven/simpleproject
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 

README.md

Outline

simple-project

Demonstrates the usage of PMD with maven-pmd-plugin.

Run with

mvn clean verify

This should find the following violations in Main.java:

[INFO] PMD Failure: net.sourceforge.pmd.examples.maven.simpleproject.Main:6 Rule:UnusedPrivateField Priority:3 Avoid unused private fields such as 'unusedField'..
[INFO] PMD Failure: net.sourceforge.pmd.examples.maven.simpleproject.Main:12 Rule:EmptyControlStatement Priority:3 Empty if statement.

Run with

mvn clean verify -Dpmd.version=7.30.0-SNAPSHOT -Dpmd.plugin.version=3.29.0-SNAPSHOT

in order to set specific version for PMD and/or maven-pmd-plugin.

References

  • https://docs.pmd-code.org/latest/pmd_userdocs_tools_maven.html
  • https://maven.apache.org/plugins/maven-pmd-plugin/index.html
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.