This is an automated email from the ASF dual-hosted git repository. agoncharuk pushed a commit to branch ignite-13617 in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 6f7faee4ff742cc301ca821bbe597999c67b18c6 Author: Andrew Mashenkov <andrey.mashen...@gmail.com> AuthorDate: Wed Nov 11 22:56:51 2020 +0300 Add checkstyle plugin. Add license check plugin. --- modules/commons/pom.xml | 124 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 122 insertions(+), 2 deletions(-) diff --git a/modules/commons/pom.xml b/modules/commons/pom.xml index 7264e5b..562fd06 100644 --- a/modules/commons/pom.xml +++ b/modules/commons/pom.xml @@ -29,6 +29,119 @@ <version>3.0.0-SNAPSHOT</version> <url>http://ignite.apache.org</url> + <properties> <!-- TODO: Move section to some parent module. --> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + + <jetbrains.annotations.version>20.1.0</jetbrains.annotations.version> + <junit.jupiter.version>5.7.0</junit.jupiter.version> + <junit.platform.version>1.7.0</junit.platform.version> + + <apache.rat.plugin.version>0.13</apache.rat.plugin.version> + <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version> + <maven.surefire.plugin.version>3.0.0-M4</maven.surefire.plugin.version> + <maven.checkstyle.plugin.version>3.1.1</maven.checkstyle.plugin.version> + <checkstyle.puppycrawl.version>8.37</checkstyle.puppycrawl.version> + </properties> + + <profiles> <!-- TODO: Move section to some parent module. --> + <profile> + <id>checkstyle</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${maven.checkstyle.plugin.version}</version> + <executions> + <execution> + <id>style</id> + <goals> + <goal>check</goal> + </goals> + <phase>validate</phase> + <configuration> + <consoleOutput>true</consoleOutput> + <logViolationsToConsole>true</logViolationsToConsole> + <failsOnError>true</failsOnError> + <failOnViolation>true</failOnViolation> + <outputFile>${project.build.directory}/checkstyle-result.xml</outputFile> + <configLocation>../checkstyle/checkstyle.xml</configLocation> + <suppressionsLocation>../checkstyle/checkstyle-suppressions.xml + </suppressionsLocation> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + <excludes>**/generated/**/*</excludes> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>com.puppycrawl.tools</groupId> + <artifactId>checkstyle</artifactId> + <version>${checkstyle.puppycrawl.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>check-licenses</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <version>${apache.rat.plugin.version}</version> + <configuration> + <addDefaultLicenseMatchers>true</addDefaultLicenseMatchers> + <licenses> + <license implementation="org.apache.rat.analysis.license.FullTextMatchingLicense"> + <licenseFamilyCategory>IAL20</licenseFamilyCategory> + <licenseFamilyName>Ignite Apache License 2.0</licenseFamilyName> + <fullText> + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + </fullText> + </license> + </licenses> + <licenseFamilies> + <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily"> + <familyName>Ignite Apache License 2.0</familyName> + </licenseFamily> + </licenseFamilies> + </configuration> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>check</goal> + </goals> + <configuration> + <excludes> + <exclude>work/**</exclude> + <exclude>**/target/**</exclude> + </excludes> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <dependencies> <dependency> <groupId>junit</groupId> @@ -37,17 +150,24 @@ <scope>test</scope> </dependency> </dependencies> - <build> + + <build> <!-- TODO: Move section to some parent module. --> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> + <version>${maven.compiler.plugin.version}</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>${maven.surefire.plugin.version}</version> + </plugin> </plugins> </build> </project>