Skip to content

Commit fc01c83

Browse files
authored
infrastructure (#82)
- added resources section to build configuration of top-level aggregator pom.xml to specify both filtered and unfiltered resources directories, and updated all modules to use new resource directory configs for filtering resources - added plugins to top-level aggregator pom.xml (antrun, assembly, project-info-reports, pmd, spotbugs) - moved default plugin configurations from plugins section to pluginManagement section of top-level aggregator pom.xml, and updated all modules to use the default configurations - added checkstyle and pmd configuration files to top-level aggregator pom.xml, and configured default plugin configs to make all modules use these common configuration files - changed plugins section of top-level aggregator pom.xml to only contain non-default plugins that will be activated by default for each module: enforcer, spotbugs, checkstyle, pmd, jacoco, git-commit-id - removed unused system property configurations from failsafe and surefire plugins - moved directory plugin configuration from check-version profile definition to main plugin section in top-level aggregator pom.xml so that it can be used to reference the top-level aggregator module across all modules - Added reporting section to top-level parent pom.xml to generate project reports during the site lifecycle: aggregated javadoc and cross reference generation for source and test source aggregated checkstyle, pmd, and cpd reports per-module reports for spotbugs, version updates, surefire/failsafe tests, and jacoco test coverage - Replaced check-versions profile with version-maven-plugin build plugin management configuration run parent project version update check - Updated directory-maven-plugin build plugin management configuration to use two separate executions configured to run during the validate phase of the default lifecycle, and the other to run during the pre-site phase of the site lifecycle. - added javadoc.path property which is now referenced from maven-javadoc-plugin along with corresponding maven profiles to set the property on windows platform to javadoc.exe or from JAVA_HOME environment variable if it exists - maven-antrun-plugin updated from v1.8 to v3.0.0 - maven-assembly-plugin updated from v3.2.0 to v3.3.0 - pmd updated from v6.22.0 to v6.23.0 - added skipDeploy property to maven-site-plugin to skip deploying site during deploy phase - added specification of explicit reports to maven-surefire-report-plugin * Updates: - maven-pmd-plugin updated from v3.13.0 to v3.14.0 - maven-project-info-reports-plugin updated from v3.0.0 to v3.1.2 - spotbugs-maven-plugin updated from v4.0.0 to v4.3.0 - pmd updated from v6.23.0 to v6.37.0 - spotbugs updated from v4.0.2 to v4.3.0 - added rule to maven-version-rules.xml to ignore logback dependencies with -groovyless suffix * CI: - remove travis-ci - added settings.xml containing gpg and sonatype repo profiles for maven - github actions: add generate site step to main workflow
1 parent 2e925ba commit fc01c83

File tree

12 files changed

+714
-294
lines changed

12 files changed

+714
-294
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ jobs:
6565
- name: Maven build/test
6666
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} clean install
6767

68+
- name: Maven generate site
69+
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} site site:stage
70+
6871
- name: Maven deploy
6972
if: ${{ matrix.maven_deploy && (github.ref == 'refs/heads/main') && (github.event_name != 'pull_request') }}
7073
env:

.travis.yml.disabled

Lines changed: 0 additions & 10 deletions
This file was deleted.

.travis/install-maven.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

.travis/install-zulu.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

checkstyle.xml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2016 Luminosity Labs LLC. All rights reserved.
4+
5+
Licensed to the Apache Software Foundation (ASF) under one or more
6+
contributor license agreements. See the NOTICE file distributed with this
7+
work for additional information regarding copyright ownership. The ASF
8+
licenses this file to you under the Apache License, Version 2.0
9+
(the "License"); you may not use this file except in compliance with the
10+
License. You may obtain a copy of the License at
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15+
License for the specific language governing permissions and limitations
16+
under the License.
17+
-->
18+
<!DOCTYPE module PUBLIC
19+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
20+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
21+
<module name="Checker">
22+
<!--
23+
If you set the basedir property below, then all reported file
24+
names will be relative to the specified directory. See
25+
http://checkstyle.sourceforge.net/5.x/config.html#Checker
26+
<property name="basedir" value="${basedir}"/>
27+
-->
28+
29+
<property name="fileExtensions" value="java, properties, xml"/>
30+
31+
<!-- Enable suppression with @SuppressWarnings annotations-->
32+
<module name="SuppressWarningsFilter"/>
33+
34+
<!-- Checks that a package-info.java file exists for each package. -->
35+
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
36+
<module name="JavadocPackage"/>
37+
38+
<!-- Checks whether files end with a new line. -->
39+
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
40+
<module name="NewlineAtEndOfFile"/>
41+
42+
<!-- Checks that property files contain the same keys. -->
43+
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
44+
<module name="Translation"/>
45+
46+
<!-- Checks for Size Violations. -->
47+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
48+
<module name="FileLength"/>
49+
<module name="LineLength">
50+
<property name="max" value="120"/>
51+
</module>
52+
53+
<!-- Checks for whitespace -->
54+
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
55+
<module name="FileTabCharacter"/>
56+
57+
<!-- Miscellaneous other checks. -->
58+
<!-- See http://checkstyle.sf.net/config_misc.html -->
59+
<module name="RegexpSingleline">
60+
<property name="format" value="\s+$"/>
61+
<property name="minimum" value="0"/>
62+
<property name="maximum" value="0"/>
63+
<property name="message" value="Line has trailing spaces."/>
64+
</module>
65+
66+
<!-- Checks for Headers -->
67+
<!-- See http://checkstyle.sf.net/config_header.html -->
68+
<!-- <module name="Header"> -->
69+
<!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
70+
<!-- <property name="fileExtensions" value="java"/> -->
71+
<!-- </module> -->
72+
73+
74+
<module name="TreeWalker">
75+
76+
<!-- Make annotations available for filtering via SuppressWarningsFilter -->
77+
<module name="SuppressWarningsHolder"/>
78+
79+
<!-- Checks for Javadoc comments. -->
80+
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
81+
<module name="JavadocMethod"/>
82+
<module name="JavadocType"/>
83+
<module name="JavadocVariable"/>
84+
<module name="JavadocStyle"/>
85+
86+
<!-- Checks for Naming Conventions. -->
87+
<!-- See http://checkstyle.sf.net/config_naming.html -->
88+
<module name="ConstantName">
89+
<property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*|logger$"/>
90+
</module>
91+
<module name="LocalFinalVariableName"/>
92+
<module name="LocalVariableName"/>
93+
<module name="MemberName"/>
94+
<module name="MethodName"/>
95+
<module name="PackageName"/>
96+
<module name="ParameterName"/>
97+
<module name="StaticVariableName"/>
98+
<module name="TypeName"/>
99+
100+
<!-- Checks for imports -->
101+
<!-- See http://checkstyle.sf.net/config_import.html -->
102+
<module name="AvoidStarImport"/>
103+
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
104+
<module name="RedundantImport"/>
105+
<module name="UnusedImports"/>
106+
107+
<!-- Checks for Size Violations. -->
108+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
109+
<module name="MethodLength"/>
110+
<module name="ParameterNumber">
111+
<!--<property name="max" value="7"/>-->
112+
<property name="max" value="10"/>
113+
</module>
114+
115+
<!-- Checks for whitespace -->
116+
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
117+
<module name="EmptyForIteratorPad"/>
118+
<module name="GenericWhitespace"/>
119+
<module name="MethodParamPad"/>
120+
<module name="NoWhitespaceAfter"/>
121+
<module name="NoWhitespaceBefore"/>
122+
<module name="OperatorWrap"/>
123+
<module name="ParenPad"/>
124+
<module name="TypecastParenPad"/>
125+
<module name="WhitespaceAfter">
126+
<property name="tokens" value="COMMA, SEMI"/>
127+
</module>
128+
<module name="WhitespaceAround"/>
129+
130+
<!-- Modifier Checks -->
131+
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
132+
<module name="ModifierOrder"/>
133+
<module name="RedundantModifier"/>
134+
135+
<!-- Checks for blocks. You know, those {}'s -->
136+
<!-- See http://checkstyle.sf.net/config_blocks.html -->
137+
<module name="AvoidNestedBlocks"/>
138+
<module name="EmptyBlock"/>
139+
<module name="LeftCurly"/>
140+
<module name="NeedBraces"/>
141+
<module name="RightCurly"/>
142+
143+
<!-- Checks for common coding problems -->
144+
<!-- See http://checkstyle.sf.net/config_coding.html -->
145+
<module name="AvoidInlineConditionals"/>
146+
<module name="EmptyStatement"/>
147+
<module name="EqualsHashCode"/>
148+
<module name="HiddenField">
149+
<property name="ignoreSetter" value="true"/>
150+
<property name="ignoreConstructorParameter" value="true"/>
151+
<property name="setterCanReturnItsClass" value="true"/>
152+
</module>
153+
<module name="IllegalInstantiation"/>
154+
<module name="InnerAssignment"/>
155+
<module name="MagicNumber"/>
156+
<module name="MissingSwitchDefault"/>
157+
<module name="SimplifyBooleanExpression"/>
158+
<module name="SimplifyBooleanReturn"/>
159+
160+
<!-- Checks for class design -->
161+
<!-- See http://checkstyle.sf.net/config_design.html -->
162+
<!--<module name="DesignForExtension"/>-->
163+
<module name="FinalClass"/>
164+
<module name="HideUtilityClassConstructor"/>
165+
<module name="InterfaceIsType"/>
166+
<module name="VisibilityModifier"/>
167+
168+
<!-- Miscellaneous other checks. -->
169+
<!-- See http://checkstyle.sf.net/config_misc.html -->
170+
<module name="ArrayTypeStyle"/>
171+
<module name="FinalParameters"/>
172+
<module name="TodoComment"/>
173+
<module name="UpperEll"/>
174+
175+
</module>
176+
177+
</module>

maven-version-rules.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,11 @@
2121
<ignoreVersion type="regex">7\..*</ignoreVersion>
2222
</ignoreVersions>
2323
</rule>
24+
<!-- Ignore logback version with groovyless suffix -->
25+
<rule groupId="ch.qos.logback">
26+
<ignoreVersions>
27+
<ignoreVersion type="regex">.*-groovyless</ignoreVersion>
28+
</ignoreVersions>
29+
</rule>
2430
</rules>
2531
</ruleset>

pmd.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"
4+
name="PMD Ruleset"
5+
>
6+
<description>
7+
This ruleset is adapted from the default maven PMD plugin ruleset which can be found here:
8+
https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/main/resources/rulesets/java/maven-pmd-plugin-default.xml;hb=HEAD
9+
It contains the rules of the old (pre PMD 6.0.0) rulesets java-basic, java-empty, java-imports,
10+
java-unnecessary, java-unusedcode. (see https://pmd.github.io/latest/pmd_userdocs_making_rulesets.html)
11+
</description>
12+
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/>
13+
<rule ref="category/java/bestpractices.xml/CheckResultSet"/>
14+
<rule ref="category/java/bestpractices.xml/UnusedImports"/>
15+
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
16+
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/>
17+
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
18+
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
19+
<rule ref="category/java/codestyle.xml/DontImportJavaLang"/>
20+
<rule ref="category/java/codestyle.xml/DuplicateImports"/>
21+
<rule ref="category/java/codestyle.xml/ExtendsObject"/>
22+
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop"/>
23+
<rule ref="category/java/codestyle.xml/TooManyStaticImports"/>
24+
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/>
25+
<rule ref="category/java/codestyle.xml/UnnecessaryModifier"/>
26+
<rule ref="category/java/codestyle.xml/UnnecessaryReturn"/>
27+
<rule ref="category/java/codestyle.xml/UselessParentheses"/>
28+
<rule ref="category/java/codestyle.xml/UselessQualifiedThis"/>
29+
<rule ref="category/java/design.xml/CollapsibleIfStatements"/>
30+
<rule ref="category/java/design.xml/SimplifiedTernary"/>
31+
<rule ref="category/java/design.xml/UselessOverridingMethod"/>
32+
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop"/>
33+
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
34+
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/>
35+
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/>
36+
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/>
37+
<rule ref="category/java/errorprone.xml/CheckSkipResult"/>
38+
<rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray"/>
39+
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
40+
<rule ref="category/java/errorprone.xml/EmptyCatchBlock"/>
41+
<rule ref="category/java/errorprone.xml/EmptyFinallyBlock"/>
42+
<rule ref="category/java/errorprone.xml/EmptyIfStmt"/>
43+
<rule ref="category/java/errorprone.xml/EmptyInitializer"/>
44+
<rule ref="category/java/errorprone.xml/EmptyStatementBlock"/>
45+
<rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop"/>
46+
<rule ref="category/java/errorprone.xml/EmptySwitchStatements"/>
47+
<rule ref="category/java/errorprone.xml/EmptySynchronizedBlock"/>
48+
<rule ref="category/java/errorprone.xml/EmptyTryBlock"/>
49+
<rule ref="category/java/errorprone.xml/EmptyWhileStmt"/>
50+
<rule ref="category/java/errorprone.xml/ImportFromSamePackage"/>
51+
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
52+
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
53+
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/>
54+
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/>
55+
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/>
56+
<rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary"/>
57+
<rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals"/>
58+
<rule ref="category/java/errorprone.xml/UselessOperationOnImmutable"/>
59+
<rule ref="category/java/multithreading.xml/AvoidThreadGroup"/>
60+
<rule ref="category/java/multithreading.xml/DontCallThreadRun"/>
61+
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking"/>
62+
<rule ref="category/java/performance.xml/BigIntegerInstantiation"/>
63+
<rule ref="category/java/performance.xml/BooleanInstantiation"/>
64+
</ruleset>

0 commit comments

Comments
 (0)