diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b675e1..a6c5fbd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,9 @@ none none ### Task -none +- [#79 - Pom.xml: added maven-checkstyle-plugin](https://github.com/Asqatasun/Contrast-Finder/issues/79) + + Contrast-Finder 0.5.2, 2017-07-04 diff --git a/documentation/en/30_Contributor_doc/README.md b/documentation/en/30_Contributor_doc/README.md index b9dd4b62..5c8344a1 100644 --- a/documentation/en/30_Contributor_doc/README.md +++ b/documentation/en/30_Contributor_doc/README.md @@ -4,38 +4,28 @@ * [Release a version of Contrast-Finder](Release/README.md) ----- - -* JavaDoc -* OWASP Dependency-Check * Checking for new dependency / plugin updates +* OWASP Dependency-Check +* Checkstyle +* JavaDoc -## JavaDoc +## Checking for new dependency / plugin updates ```bash -git clone https://github.com/Asqatasun/Contrast-Finder -cd Contrast-finder -``` +# Checking for new dependency updates +mvn versions:display-dependency-updates -One of the following command lines: -```bash -mvn javadoc:javadoc -mvn javadoc:aggregate -mvn javadoc:test-javadoc -mvn javadoc:test-aggregate -mvn site -``` +# Checking for new plugin updates +mvn versions:display-plugin-updates -JavaDoc is available in the following directories: -```bash -target/site/apidocs -target/site/testapidocs +# Checking for new property-linked updates +mvn versions:display-property-updates ``` ### Documentation -* [Apache Maven Javadoc Plugin](https://maven.apache.org/plugins/maven-javadoc-plugin/) -* [Generate Javadocs](https://maven.apache.org/plugins/maven-javadoc-plugin/usage.html) -* [Javadoc Plugin Documentation](https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html) - +* http://www.mojohaus.org/versions-maven-plugin/examples/display-dependency-updates.html +* http://www.mojohaus.org/versions-maven-plugin/examples/display-plugin-updates.html +* http://www.mojohaus.org/versions-maven-plugin/examples/display-property-updates.html ## OWASP Dependency-Check @@ -69,18 +59,75 @@ mvn dependency-check:help -Ddetail=true -Dgoal=aggregate * http://jeremylong.github.io/DependencyCheck/ * http://jeremylong.github.io/DependencyCheck/dependency-check-maven/ -## Checking for new dependency / plugin updates + +## Checkstyle +Scan Contrast-Finder to check the violations of a coding standard. + +### Documentation +* http://checkstyle.sourceforge.net/ +* http://maven.apache.org/plugins/maven-checkstyle-plugin/ + +### maven-checkstyle-plugin ```bash -# Checking for new dependency updates -mvn versions:display-dependency-updates +git clone https://github.com/Asqatasun/Contrast-Finder +cd Contrast-finder -# Checking for new plugin updates -mvn versions:display-plugin-updates +# Performs Checkstyle analysis and outputs violations or a count of violations +# to the console, potentially failing the build. +mvn checkstyle:check -# Checking for new property-linked updates -mvn versions:display-property-updates +# A reporting task that performs Checkstyle analysis +# and generates an HTML report for each module +mvn checkstyle:checkstyle + +# a reporting task that performs Checkstyle analysis +# and generates an aggregate HTML report +mvn checkstyle:checkstyle-aggregate +mvn site + +# Checking for violations as part of the Build +mvn clean install + # Before, remove comments + # around check in pom.xml file +``` + +### checkstyle CLI +```bash +apt-get install checkstyle +git clone https://github.com/Asqatasun/Contrast-Finder +checkstyle -c checkstyle.xml Contrast-Finder/**/*.java +``` + + +### CI (Travis, Gitlab, Jenkins) +... + + + +## JavaDoc + +```bash +git clone https://github.com/Asqatasun/Contrast-Finder +cd Contrast-finder +``` + +One of the following command lines: +```bash +mvn javadoc:javadoc +mvn javadoc:aggregate +mvn javadoc:test-javadoc +mvn javadoc:test-aggregate +mvn site +``` + +JavaDoc is available in the following directories: +```bash +target/site/apidocs +target/site/testapidocs ``` + ### Documentation -* http://www.mojohaus.org/versions-maven-plugin/examples/display-dependency-updates.html -* http://www.mojohaus.org/versions-maven-plugin/examples/display-plugin-updates.html -* http://www.mojohaus.org/versions-maven-plugin/examples/display-property-updates.html +* [Apache Maven Javadoc Plugin](https://maven.apache.org/plugins/maven-javadoc-plugin/) +* [Generate Javadocs](https://maven.apache.org/plugins/maven-javadoc-plugin/usage.html) +* [Javadoc Plugin Documentation](https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html) + diff --git a/pom.xml b/pom.xml index 2bf82d57..4564b576 100644 --- a/pom.xml +++ b/pom.xml @@ -88,6 +88,35 @@ + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + + validate + validate + + + UTF-8 + true + true + false + + + + + + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17