Merge pull request #50 from kemitix/clean-up

Clean up
This commit is contained in:
Paul Campbell 2017-02-09 14:32:34 +00:00 committed by GitHub
commit 4726251ade
2 changed files with 59 additions and 67 deletions

View file

@ -28,15 +28,13 @@ maven-javadoc-plugin.version|2.10.4
maven-source-plugin.version|3.0.1 maven-source-plugin.version|3.0.1
maven-gpg-plugin.version|1.6 maven-gpg-plugin.version|1.6
maven-deploy-plugin.version|2.8.2 maven-deploy-plugin.version|2.8.2
maven-checkstyle-plugin.version|2.17 kemitix-checkstyle-ruleset.version|2.1.2
checkstyle.version|7.1.1 digraph-dependency.version|0.7.0
sevntu-checkstyle-maven-plugin.version|1.21.0 maven-compiler-plugin.version|3.6.0
kemitix-checkstyle-ruleset.version|1.0.0
maven-compiler-plugin.version|3.5.1
maven-surefire-plugin.version|2.19.1 maven-surefire-plugin.version|2.19.1
maven-failsafe-plugin.version|2.19.1 maven-failsafe-plugin.version|2.19.1
maven-pmd-plugin.version|3.6 maven-pmd-plugin.version|3.7
findbugs-maven-plugin.version|3.0.4 huntbugs.version|0.0.11
jacoco-maven-plugin.version|0.7.7.201606060606 jacoco-maven-plugin.version|0.7.7.201606060606
highwheel-maven.version|1.2 highwheel-maven.version|1.2
maven-project-info-reports-plugin.version|2.9 maven-project-info-reports-plugin.version|2.9
@ -45,30 +43,25 @@ jacoco-class-line-covered-ratio|0.50
jacoco-class-instruction-covered-ratio|0.80 jacoco-class-instruction-covered-ratio|0.80
jacoco-class-missed-count-maximum|0 jacoco-class-missed-count-maximum|0
## Maven Checkstyle Plugin ## Checkstyle
The [Maven Checkstyle Plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin/) The Checkstyle plugin is configured using the
uses the latest version of the Checkstyle library `kemitix-checkstyle-ruleset-maven-plugin`.
([Release Notes](http://checkstyle.sourceforge.net/releasenotes.html)) and the
[Sevntu](http://sevntu-checkstyle.github.io/sevntu.checkstyle/) library.
As from version 2.0.0 you no longer provide a `checkstyle.xml` file. Any file you The `kemitix-checkstyle-ruleset` provides five levels of checks. The
provide will be ignored unless you re-configure the maven-checkstyle-plugin yourself. default is set to `5-complexity`, the most strict. It runs during the
`validate` phase.
The ruleset that will be used is defined in
[kemitix-checkstyle-ruleset](https://github.com/kemitix/kemitix-checkstyle-ruleset).
See that project's `README.md` file for details on the ruleset.
### Configuration ### Configuration
Ref [checkstyle:check](https://maven.apache.org/plugins/maven-checkstyle-plugin/check-mojo.html) Set the property `kemitix-checkstyle-ruleset.level` to one of the
following values to select a less-strict ruleset:
* configLocation: [checkstyle.xml](https://github.com/kemitix/kemitix-checkstyle-ruleset/blob/master/src/main/resources/net/kemitix/checkstyle.xml) * 1-layout
* consoleOutput: true * 2-naming
* encoding: UTF-8 * 3-javadoc
* failOnViolation: true * 4-tweaks
* failOnError: true * 5-complexity
* linkXRef: true
## Maven Compiler Plugin ## Maven Compiler Plugin
@ -112,20 +105,18 @@ runs the [PMD](http://pmd.sourceforge.net/) code analysis.
Runs its [pmd](https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html) Runs its [pmd](https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html)
and [cpd](https://maven.apache.org/plugins/maven-pmd-plugin/cpd-mojo.html) goals and [cpd](https://maven.apache.org/plugins/maven-pmd-plugin/cpd-mojo.html) goals
during the `verify` phase. during the `compile` phase.
### Configuration ### Configuration
No configuration applied beyond the defaults. No configuration applied beyond the defaults.
## Findbugs Maven Plugin ## Huntbugs Maven Plugin
The [Findbugs Maven Plugin](http://gleclaire.github.io/findbugs-maven-plugin/) The [Huntbugs Maven Plugin](https://github.com/amaembo/huntbugs) is a
runs the [Findbugs](http://findbugs.sourceforge.net/factSheet.html) code static code analyser.
analysis.
Runs its [check](http://gleclaire.github.io/findbugs-maven-plugin/check-mojo.html) Runs during the `compile` phase.
goal during the `verify` phase.
### Configuration ### Configuration
@ -148,13 +139,17 @@ For each class not excluded the Instructions Covered Ration must be at least
Excluded from analysis: Excluded from analysis:
* `*Test` - test classes * `*Test` - test classes
* `*IT` - integration test classes
* `*Main` - main classes
* `*Application` - application classes
* `*Configuration` - (Spring) configuration classes
## Maven Source Plugin ## Maven Source Plugin
The [Maven Source Plugin](https://maven.apache.org/plugins/maven-source-plugin/) The [Maven Source Plugin](https://maven.apache.org/plugins/maven-source-plugin/)
bundles your sources into a jar file ready for deployment. bundles your sources into a jar file ready for deployment.
Runs its [jar-no-fork](http://gleclaire.github.io/findbugs-maven-plugin/check-mojo.html) Runs its [jar-no-fork](https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html)
goal during the `verify` phase. goal during the `verify` phase.
### Configuration ### Configuration
@ -167,7 +162,7 @@ The [Maven Javadoc Plugin](https://maven.apache.org/plugins/maven-javadoc-plugin
generates your html javadocs and bundles them into a jar file ready for generates your html javadocs and bundles them into a jar file ready for
deployment. deployment.
Runs its [jar-no-fork](http://gleclaire.github.io/findbugs-maven-plugin/check-mojo.html) Runs its [jar](https://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html)
goal during the `verify` phase. goal during the `verify` phase.
### Configuration ### Configuration
@ -201,7 +196,7 @@ classes.
### Configuration ### Configuration
The plugin will `analyse` the project during the `verify` phase. The plugin will `analyse` the project during the `compile` phase.
## Digraph Dependency Plugin ## Digraph Dependency Plugin
@ -210,9 +205,9 @@ generates a DOT file diagram showing the dependencies between packages in a proj
### Configuration ### Configuration
The plugin will generate the `target/digraph.dot` file during the `verify` phase. The plugin will generate the `target/digraph.dot` file during the `validate` phase.
The plugin will filter to packages within the `net.kemitix` package namespace. Set the `digraph-dependency.basePackage` property to the root package to graph.
# Distribution Management # Distribution Management

57
pom.xml
View file

@ -41,10 +41,16 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<kemitix.build.directory>target</kemitix.build.directory> <kemitix.build.directory>target</kemitix.build.directory>
<kemitix-checkstyle-ruleset.version>2.0.4</kemitix-checkstyle-ruleset.version> <kemitix-checkstyle-ruleset.version>2.1.2</kemitix-checkstyle-ruleset.version>
<kemitix-checkstyle-ruleset.level>5-complexity</kemitix-checkstyle-ruleset.level> <kemitix-checkstyle-ruleset.level>5-complexity</kemitix-checkstyle-ruleset.level>
<lombok.version>1.16.12</lombok.version> <lombok.version>1.16.12</lombok.version>
<spring-platform.version>Athens-SR2</spring-platform.version>
<spring-cloud.version>Camden.SR4</spring-cloud.version>
<digraph-dependency.version>0.7.0</digraph-dependency.version>
<digraph-dependency.basePackage>(UNSET:basePackage)</digraph-dependency.basePackage>
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version> <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version> <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version> <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
@ -53,7 +59,6 @@
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version> <maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
<maven-pmd-plugin.version>3.7</maven-pmd-plugin.version> <maven-pmd-plugin.version>3.7</maven-pmd-plugin.version>
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
<huntbugs.version>0.0.11</huntbugs.version> <huntbugs.version>0.0.11</huntbugs.version>
<jacoco-maven-plugin.version>0.7.7.201606060606</jacoco-maven-plugin.version> <jacoco-maven-plugin.version>0.7.7.201606060606</jacoco-maven-plugin.version>
<highwheel-maven.version>1.2</highwheel-maven.version> <highwheel-maven.version>1.2</highwheel-maven.version>
@ -79,14 +84,14 @@
<dependency> <dependency>
<groupId>io.spring.platform</groupId> <groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId> <artifactId>platform-bom</artifactId>
<version>Athens-SR2</version> <version>${spring-platform.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId> <artifactId>spring-cloud-dependencies</artifactId>
<version>Camden.SR4</version> <version>${spring-cloud.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -182,9 +187,6 @@
<groupId>net.kemitix</groupId> <groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-maven-plugin</artifactId> <artifactId>kemitix-checkstyle-ruleset-maven-plugin</artifactId>
<version>${kemitix-checkstyle-ruleset.version}</version> <version>${kemitix-checkstyle-ruleset.version}</version>
<configuration>
<checkstyleVersion>7.4</checkstyleVersion>
</configuration>
<executions> <executions>
<execution> <execution>
<phase>validate</phase> <phase>validate</phase>
@ -194,6 +196,22 @@
</execution> </execution>
</executions> </executions>
</plugin><!-- kemitix-checkstyle-ruleset-maven-plugin --> </plugin><!-- kemitix-checkstyle-ruleset-maven-plugin -->
<plugin>
<groupId>net.kemitix</groupId>
<artifactId>digraph-dependency-maven-plugin</artifactId>
<version>${digraph-dependency.version}</version>
<configuration>
<basePackage>${digraph-dependency.basePackage}</basePackage>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>digraph</goal>
</goals>
</execution>
</executions>
</plugin><!-- digraph-dependency-maven-plugin -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -257,28 +275,13 @@
</executions> </executions>
</plugin><!-- maven-pmd-plugin --> </plugin><!-- maven-pmd-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs-maven-plugin.version}</version>
<executions>
<execution>
<id>check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin><!-- findbugs-maven-plugin -->
<plugin> <plugin>
<groupId>one.util</groupId> <groupId>one.util</groupId>
<artifactId>huntbugs-maven-plugin</artifactId> <artifactId>huntbugs-maven-plugin</artifactId>
<version>${huntbugs.version}</version> <version>${huntbugs.version}</version>
<executions> <executions>
<execution> <execution>
<phase>verify</phase> <phase>compile</phase>
<goals> <goals>
<goal>huntbugs</goal> <goal>huntbugs</goal>
</goals> </goals>
@ -349,7 +352,7 @@
<version>${highwheel-maven.version}</version> <version>${highwheel-maven.version}</version>
<executions> <executions>
<execution> <execution>
<phase>validate</phase> <phase>compile</phase>
<goals> <goals>
<goal>analyse</goal> <goal>analyse</goal>
</goals> </goals>
@ -390,12 +393,6 @@
<linkXRef>true</linkXRef> <linkXRef>true</linkXRef>
</configuration> </configuration>
</plugin><!-- maven-pmd-plugin --> </plugin><!-- maven-pmd-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs-maven-plugin.version}</version>
</plugin><!-- findbugs-maven-plugin -->
</plugins> </plugins>
</reporting> </reporting>