Merge pull request #54 from kemitix/release/3.2.0

Release 3.2.0
This commit is contained in:
Paul Campbell 2017-06-12 10:08:57 +01:00 committed by GitHub
commit d0d38ed728
22 changed files with 129 additions and 492 deletions

View file

@ -8,6 +8,7 @@ install: true
script: "./mvnw clean install" script: "./mvnw clean install"
after_success: after_success:
- "./travis-ci/travis-coveralls-report.sh" - "./travis-ci/travis-coveralls-report.sh"
- bash <(curl -s https://codecov.io/bash)
- "./travis-ci/travis-deploy.sh" - "./travis-ci/travis-deploy.sh"
env: env:
global: global:

View file

@ -1,6 +1,17 @@
CHANGELOG CHANGELOG
========= =========
3.2.0
-----
* Restructure module parent poms
* Upgrade kemitix-parent to 3.0.0
* CheckMojo: provide name for parameter 'level'
* Normalise maven pom names
* circle.yml: added
* travis-ci: publish code coverate to codecov
* Add level 0 Disabled
3.1.0 3.1.0
----- -----

View file

@ -27,6 +27,7 @@ The `maven-checkstyle-plugin` will be included automatically.
The following levels implement increasingly strict rulesets: The following levels implement increasingly strict rulesets:
* 0-disabled
* 1-layout * 1-layout
* 2-naming * 2-naming
* 3-javadoc * 3-javadoc

View file

@ -6,16 +6,15 @@
<parent> <parent>
<groupId>net.kemitix</groupId> <groupId>net.kemitix</groupId>
<artifactId>kemitix-parent</artifactId> <artifactId>kemitix-checkstyle-ruleset-parent</artifactId>
<version>2.8.0</version> <version>3.2.0</version>
<relativePath/>
</parent> </parent>
<artifactId>kemitix-checkstyle-ruleset-builder</artifactId> <artifactId>kemitix-checkstyle-ruleset-builder</artifactId>
<version>3.1.0</version> <version>3.2.0</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Kemitix Checkstyle Ruleset Builder</name> <name>Kemitix Checkstyle :: Ruleset :: Builder</name>
<description>Builder for the Kemitix Checkstyle Ruleset</description> <description>Builder for the Kemitix Checkstyle Ruleset</description>
<issueManagement> <issueManagement>
@ -34,18 +33,25 @@
<inceptionYear>2016</inceptionYear> <inceptionYear>2016</inceptionYear>
<properties> <properties>
<java.version>1.8</java.version> <spring-platform.version>Brussels-SR2</spring-platform.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>1.5.3.RELEASE</spring-boot.version> <spring-boot.version>1.5.3.RELEASE</spring-boot.version>
<assertj.version>3.8.0</assertj.version>
<mapstream.version>2.3.5</mapstream.version> <mapstream.version>2.3.5</mapstream.version>
<map-builder.version>1.0.0</map-builder.version> <map-builder.version>1.0.0</map-builder.version>
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version> <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
<checkstyle.version>7.8</checkstyle.version>
<sevntu.version>1.24.0</sevntu.version>
</properties> </properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>${spring-platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@ -66,12 +72,6 @@
<artifactId>spring-boot-configuration-processor</artifactId> <artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>com.speedment.common</groupId> <groupId>com.speedment.common</groupId>
<artifactId>mapstream</artifactId> <artifactId>mapstream</artifactId>

View file

@ -28,6 +28,7 @@ package net.kemitix.checkstyle.ruleset.builder;
*/ */
public enum RuleLevel { public enum RuleLevel {
DISABLED,
LAYOUT, LAYOUT,
NAMING, NAMING,
JAVADOC, JAVADOC,

View file

@ -27,6 +27,7 @@ The `maven-checkstyle-plugin` will be included automatically.
The following levels implement increasingly strict rulesets: The following levels implement increasingly strict rulesets:
* 0-disabled
* 1-layout * 1-layout
* 2-naming * 2-naming
* 3-javadoc * 3-javadoc

View file

@ -1,6 +1,7 @@
output: output:
directory: ruleset/src/main/resources/net/kemitix directory: ruleset/src/main/resources/net/kemitix
ruleset-files: ruleset-files:
DISABLED: checkstyle-0-disabled.xml
LAYOUT: checkstyle-1-layout.xml LAYOUT: checkstyle-1-layout.xml
NAMING: checkstyle-2-naming.xml NAMING: checkstyle-2-naming.xml
JAVADOC: checkstyle-3-javadoc.xml JAVADOC: checkstyle-3-javadoc.xml

View file

@ -67,7 +67,8 @@ public class CheckstyleWriterTest {
ruleName = "RegexpOnFilename"; ruleName = "RegexpOnFilename";
ruleClassname = "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpOnFilenameCheck"; ruleClassname = "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpOnFilenameCheck";
outputProperties = new OutputProperties(); outputProperties = new OutputProperties();
outputFiles = new MapBuilder<RuleLevel, String>().put(getOutputFile(RuleLevel.LAYOUT)) outputFiles = new MapBuilder<RuleLevel, String>().put(getOutputFile(RuleLevel.DISABLED))
.put(getOutputFile(RuleLevel.LAYOUT))
.put(getOutputFile(RuleLevel.NAMING)) .put(getOutputFile(RuleLevel.NAMING))
.put(getOutputFile(RuleLevel.JAVADOC)) .put(getOutputFile(RuleLevel.JAVADOC))
.put(getOutputFile(RuleLevel.TWEAKS)) .put(getOutputFile(RuleLevel.TWEAKS))
@ -221,8 +222,8 @@ public class CheckstyleWriterTest {
final ThrowableAssert.ThrowingCallable action = () -> checkstyleWriter.run(); final ThrowableAssert.ThrowingCallable action = () -> checkstyleWriter.run();
//then //then
assertThatThrownBy(action).isInstanceOf(CheckstyleWriterException.class) assertThatThrownBy(action).isInstanceOf(CheckstyleWriterException.class)
.hasMessage( .hasMessageStartingWith(
String.format("java.nio.file.NoSuchFileException: %scheckstyle-LAYOUT.xml", String.format("java.nio.file.NoSuchFileException: %scheckstyle-",
imaginary + FILE_SEPARATOR imaginary + FILE_SEPARATOR
)); ));
} }

3
circle.yml Normal file
View file

@ -0,0 +1,3 @@
test:
override:
- ./mvnw clean install

View file

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<properties>
<kemitix-checkstyle-ruleset.level>2-naming</kemitix-checkstyle-ruleset.level>
</properties>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-sample-parent</artifactId>
<version>3.1.0</version>
<relativePath>../sample-parent</relativePath>
</parent>
<artifactId>kemitix-checkstyle-ruleset-plugin-sample</artifactId>
<version>3.1.0</version>
<name>Kemitix Checkstyle Ruleset Plugin Sample</name>
<description>Sample usage of the Kemitix Checkstyle Ruleset Plugin</description>
</project>

View file

@ -1,38 +0,0 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2017 Paul Campbell
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.kemitix.checkstyle.sample;
/**
* Sample class to test the Kemitix Checkstyle Ruleset Maven Plugin against.
*
* <p>This sample is deliberately only valid for level 1-layout and 2-naming. The plugin should report errors for levels
* 3-javadoc and above.</p>
*
* @author Paul Campbell (paul.campbell@hubio.com)
*/
public class Sample {
public static void main(String[] args) {
System.out.println("Sample!");
}
}

View file

@ -7,33 +7,20 @@
<parent> <parent>
<groupId>net.kemitix</groupId> <groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-parent</artifactId> <artifactId>kemitix-checkstyle-ruleset-parent</artifactId>
<version>3.1.0</version> <version>3.2.0</version>
</parent> </parent>
<artifactId>kemitix-checkstyle-ruleset-maven-plugin</artifactId> <artifactId>kemitix-checkstyle-ruleset-maven-plugin</artifactId>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>Kemitix Checkstyle Ruleset Maven Plugin</name> <name>Kemitix Checkstyle :: Ruleset :: Plugin</name>
<description>Checkstyle configuration using the Kemitix Checkstyle Ruleset</description> <description>Checkstyle configuration using the Kemitix Checkstyle Ruleset</description>
<properties> <properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.version>3.5.0</maven.version> <maven.version>3.5.0</maven.version>
<maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
<maven-plugin-plugin.version>3.5</maven-plugin-plugin.version> <maven-plugin-plugin.version>3.5</maven-plugin-plugin.version>
<maven-plugin-annotations.version>3.5</maven-plugin-annotations.version> <maven-plugin-annotations.version>3.5</maven-plugin-annotations.version>
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<mojo-executor.version>2.3.0</mojo-executor.version> <mojo-executor.version>2.3.0</mojo-executor.version>
<lombok.version>1.16.16</lombok.version>
<map-builder.version>1.0.0</map-builder.version> <map-builder.version>1.0.0</map-builder.version>
<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
<jacoco-class-line-covered-ratio>0.50</jacoco-class-line-covered-ratio>
<jacoco-class-instruction-covered-ratio>0.80</jacoco-class-instruction-covered-ratio>
<jacoco-class-missed-count-maximum>0</jacoco-class-missed-count-maximum>
</properties> </properties>
<dependencies> <dependencies>
@ -58,12 +45,6 @@
<artifactId>mojo-executor</artifactId> <artifactId>mojo-executor</artifactId>
<version>${mojo-executor.version}</version> <version>${mojo-executor.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>me.andrz</groupId> <groupId>me.andrz</groupId>
<artifactId>map-builder</artifactId> <artifactId>map-builder</artifactId>
@ -85,70 +66,9 @@
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-plugin-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version> <version>${maven-plugin-plugin.version}</version>
<configuration> </plugin><!-- maven-plugin-plugin -->
<compilerArgs>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin><!-- maven-compiler-plugin -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<rule>
<element>CLASS</element>
<excludes>
<exclude>*HelpMojo</exclude>
</excludes>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-class-line-covered-ratio}</minimum>
</limit>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-class-instruction-covered-ratio}</minimum>
</limit>
<limit>
<counter>CLASS</counter>
<value>MISSEDCOUNT</value>
<maximum>${jacoco-class-missed-count-maximum}</maximum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</plugin><!-- jacoco-maven-plugin -->
</plugins> </plugins>
</build> </build>
</project> </project>

View file

@ -1,26 +1,23 @@
/* /**
The MIT License (MIT) * The MIT License (MIT)
*
Copyright (c) 2016 Paul Campbell * Copyright (c) 2017 Paul Campbell
*
Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
of this software and associated documentation files (the "Software"), to deal * and associated documentation files (the "Software"), to deal in the Software without restriction,
in the Software without restriction, including without limitation the rights * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
copies of the Software, and to permit persons to whom the Software is * subject to the following conditions:
furnished to do so, subject to the following conditions: *
* The above copyright notice and this permission notice shall be included in all copies
The above copyright notice and this permission notice shall be included in all * or substantial portions of the Software.
copies or substantial portions of the Software. *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, */
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
package net.kemitix.checkstyle.ruleset.plugin; package net.kemitix.checkstyle.ruleset.plugin;
@ -68,7 +65,7 @@ public class CheckMojo extends AbstractMojo {
@Parameter(defaultValue = "${localRepository}", readonly = true, required = true) @Parameter(defaultValue = "${localRepository}", readonly = true, required = true)
private ArtifactRepository artifactRepository; private ArtifactRepository artifactRepository;
@Parameter(defaultValue = "5-complexity", readonly = true) @Parameter(name = "level", defaultValue = "5-complexity", readonly = true)
private String level = "5-complexity"; private String level = "5-complexity";
@Setter @Setter

View file

@ -42,5 +42,10 @@ interface CheckstyleExecutor {
*/ */
void performCheck(CheckConfiguration configuration) throws MojoExecutionException, MojoFailureException; void performCheck(CheckConfiguration configuration) throws MojoExecutionException, MojoFailureException;
/**
* Set the logger to use.
*
* @param log the logger.
*/
void setLog(Log log); void setLog(Log log);
} }

View file

@ -53,6 +53,7 @@ import java.util.Properties;
* *
* @author Paul Campbell (pcampbell@kemitix.net) * @author Paul Campbell (pcampbell@kemitix.net)
*/ */
@SuppressWarnings("classfanoutcomplexity")
@RequiredArgsConstructor @RequiredArgsConstructor
public class DefaultCheckstyleExecutor implements CheckstyleExecutor { public class DefaultCheckstyleExecutor implements CheckstyleExecutor {

View file

@ -1,31 +1,22 @@
/*
The MIT License (MIT)
Copyright (c) 2016 Paul Campbell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/** /**
* . * The MIT License (MIT)
* *
* @author Paul Campbell (pcampbell@kemitix.net) * Copyright (c) 2017 Paul Campbell
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.kemitix.checkstyle.ruleset.plugin; package net.kemitix.checkstyle.ruleset.plugin;

117
pom.xml
View file

@ -3,26 +3,25 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.kemitix</groupId> <groupId>net.kemitix</groupId>
<artifactId>kemitix-parent</artifactId>
<version>3.0.0</version>
<relativePath/>
</parent>
<artifactId>kemitix-checkstyle-ruleset-parent</artifactId> <artifactId>kemitix-checkstyle-ruleset-parent</artifactId>
<version>3.1.0</version> <version>3.2.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Kemitix Checkstyle Ruleset (Parent)</name> <name>Kemitix Checkstyle :: Ruleset :: Parent</name>
<description>Parent POM for the Kemitix Checkstyle Ruleset and it's Builder</description> <description>Parent POM for the Kemitix Checkstyle Ruleset and it's Builder</description>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version> <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
<checkstyle.version>7.8</checkstyle.version> <checkstyle.version>7.8</checkstyle.version>
<sevntu.version>1.24.0</sevntu.version> <sevntu.version>1.24.0</sevntu.version>
<mockito.version>1.10.19</mockito.version> <mockito.version>1.10.19</mockito.version>
<assertj.version>3.8.0</assertj.version> <assertj.version>3.8.0</assertj.version>
</properties> </properties>
@ -31,9 +30,7 @@
<module>builder</module> <module>builder</module>
<module>ruleset</module> <module>ruleset</module>
<module>plugin</module> <module>plugin</module>
<module>plugin-sample</module>
<module>regressions</module> <module>regressions</module>
<module>sample-parent</module>
</modules> </modules>
<issueManagement> <issueManagement>
@ -51,90 +48,6 @@
<inceptionYear>2016</inceptionYear> <inceptionYear>2016</inceptionYear>
<prerequisites>
<maven>3.0.4</maven>
</prerequisites>
<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>
<developers>
<developer>
<name>Paul Campbell</name>
<email>pcampbell@kemitix.net</email>
<organization>Kemitix</organization>
<organizationUrl>https://github.com/kemitix/</organizationUrl>
</developer>
</developers>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!-- plugin sequence: javadoc, sources, gpg, deploy -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-javadoc-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-source-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-gpg-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin><!-- maven deploy-plugin -->
</plugins>
</build>
</profile><!-- release -->
</profiles>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
@ -150,16 +63,4 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project> </project>

View file

@ -2,26 +2,28 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>kemitix-checkstyle-ruleset-sample-parent</artifactId>
<groupId>net.kemitix</groupId>
<version>3.1.0</version>
<relativePath>../sample-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-parent</artifactId>
<version>3.2.0</version>
</parent>
<artifactId>kemitix-checkstyle-ruleset-regressions</artifactId> <artifactId>kemitix-checkstyle-ruleset-regressions</artifactId>
<name>Regression Tests</name> <name>Kemitix Checkstyle :: Ruleset :: Regression Tests</name>
<properties> <properties>
<kemitix-checkstyle-ruleset-level>5-complexity</kemitix-checkstyle-ruleset-level> <kemitix-checkstyle-ruleset.version>${project.version}</kemitix-checkstyle-ruleset.version>
<kemitix-checkstyle-ruleset.level>5-complexity</kemitix-checkstyle-ruleset.level>
<pitest.skip>true</pitest.skip>
<immutables.version>2.4.4</immutables.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.immutables</groupId> <groupId>org.immutables</groupId>
<artifactId>value</artifactId> <artifactId>value</artifactId>
<version>2.4.4</version> <version>${immutables.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View file

@ -7,14 +7,14 @@
<parent> <parent>
<groupId>net.kemitix</groupId> <groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-parent</artifactId> <artifactId>kemitix-checkstyle-ruleset-parent</artifactId>
<version>3.1.0</version> <version>3.2.0</version>
</parent> </parent>
<artifactId>kemitix-checkstyle-ruleset</artifactId> <artifactId>kemitix-checkstyle-ruleset</artifactId>
<version>3.1.0</version> <version>3.2.0</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Kemitix Checkstyle Ruleset</name> <name>Kemitix Checkstyle :: Ruleset</name>
<description>Checkstyle Ruleset for use by packages derived from kemitix-parent</description> <description>Checkstyle Ruleset for use by packages derived from kemitix-parent</description>
<properties> <properties>

View file

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
</module><!-- /TreeWalker -->
</module><!-- /Checker -->

View file

@ -1,154 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-sample-parent</artifactId>
<packaging>pom</packaging>
<version>3.1.0</version>
<name>Kemitix Checkstyle Ruleset Sample Parent</name>
<description>Sample parent for modules that use kemitix-checkstyle-ruleset-maven-plugin</description>
<properties>
<kemitix-checkstyle-ruleset.version>${project.version}</kemitix-checkstyle-ruleset.version>
<kemitix-checkstyle-ruleset.level>5-complexity</kemitix-checkstyle-ruleset.level>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
</properties>
<url>https://github.com/kemitix/kemitix-checkstyle-ruleset</url>
<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>
<scm>
<connection>scm:git:git@github.com:kemitix/kemitix-checkstyle-ruleset.git</connection>
<developerConnection>scm:git:git@github.com:kemitix/kemitix-checkstyle-ruleset.git</developerConnection>
<url>git@github.com:kemitix/kemitix-checkstyle-ruleset.git</url>
</scm>
<developers>
<developer>
<name>Paul Campbell</name>
<email>pcampbell@kemitix.net</email>
<organization>Kemitix</organization>
<organizationUrl>https://github.com/kemitix/</organizationUrl>
</developer>
</developers>
<build>
<plugins>
<plugin>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-maven-plugin</artifactId>
<version>${kemitix-checkstyle-ruleset.version}</version>
<configuration>
<level>${kemitix-checkstyle-ruleset.level}</level>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!-- plugin sequence: javadoc, sources, gpg, deploy -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-javadoc-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-source-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-gpg-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin><!-- maven deploy-plugin -->
</plugins>
</build>
</profile><!-- release -->
</profiles>
<pluginRepositories>
<pluginRepository>
<id>sevntu-maven</id>
<name>sevntu-maven</name>
<url>http://sevntu-checkstyle.github.io/sevntu.checkstyle/maven2</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [ "$TRAVIS_BRANCH" = 'master' ]; then if [ "$TRAVIS_BRANCH" = 'master' ] && [ "$TRAVIS_PULL_REQUEST" == 'false' ]; then
echo "Preparing to deploy to nexus..." echo "Preparing to deploy to nexus..."
openssl aes-256-cbc -K $encrypted_efec3258f55d_key -iv $encrypted_efec3258f55d_iv \ openssl aes-256-cbc -K $encrypted_efec3258f55d_key -iv $encrypted_efec3258f55d_iv \
-in travis-ci/codesigning.asc.enc -out travis-ci/codesigning.asc -d -in travis-ci/codesigning.asc.enc -out travis-ci/codesigning.asc -d
echo "Signing key decrypted" echo "Signing key decrypted"
gpg --batch --fast-import travis-ci/codesigning.asc gpg --batch --fast-import travis-ci/codesigning.asc
echo "Signing key imported" echo "Signing key imported"
./mvnw --projects plugin,ruleset --settings travis-ci/travis-settings.xml \ ./mvnw --projects .,plugin,ruleset --settings travis-ci/travis-settings.xml \
-Dskip-Tests=true -P release -B deploy -Dskip-Tests=true -P release -B deploy
echo "Deploy complete" echo "Deploy complete"
else else