Skip to content

Commit

Permalink
Add CheckStyle to the default Maven goal
Browse files Browse the repository at this point in the history
- Inherit maven-checkstyle-pluginversion from parent POM
- Bump commons-parent from 71 to 73
  • Loading branch information
garydgregory committed Aug 18, 2024
1 parent b693c19 commit 2e069ab
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 25 deletions.
1 change: 1 addition & 0 deletions commons-rdf-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<description>Commons Java API for RDF 1.1</description>

<properties>
<commons.parent.dir>${basedir}/..</commons.parent.dir>
<commons.osgi.symbolicName>org.apache.commons.rdf.api</commons.osgi.symbolicName>
<project.build.outputTimestamp>2024-02-01T03:27:02Z</project.build.outputTimestamp>
</properties>
Expand Down
1 change: 1 addition & 0 deletions commons-rdf-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<version>0.1</version>

<properties>
<commons.parent.dir>${basedir}/..</commons.parent.dir>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.outputTimestamp>2024-02-01T03:27:02Z</project.build.outputTimestamp>
Expand Down
1 change: 1 addition & 0 deletions commons-rdf-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<artifactId>commons-rdf-integration-tests</artifactId>
<name>Commons RDF Integration tests</name>
<properties>
<commons.parent.dir>${basedir}/..</commons.parent.dir>
<project.build.outputTimestamp>2024-02-01T03:27:02Z</project.build.outputTimestamp>
</properties>
<dependencies>
Expand Down
1 change: 1 addition & 0 deletions commons-rdf-jena/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<name>Commons RDF impl: Jena</name>
<description>Apache Jena implementation of Commons RDF API</description>
<properties>
<commons.parent.dir>${basedir}/..</commons.parent.dir>
<project.build.outputTimestamp>2024-02-01T03:27:02Z</project.build.outputTimestamp>
</properties>

Expand Down
1 change: 1 addition & 0 deletions commons-rdf-jsonld-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<name>Commons RDF impl: JSON-LD Java</name>
<description>Parser integration of JSON-LD Java</description>
<properties>
<commons.parent.dir>${basedir}/..</commons.parent.dir>
<project.build.outputTimestamp>2024-02-01T03:27:02Z</project.build.outputTimestamp>
</properties>

Expand Down
1 change: 1 addition & 0 deletions commons-rdf-rdf4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<name>Commons RDF impl: RDF4j</name>
<description>Eclipse RDF4j implementation of Commons RDF API</description>
<properties>
<commons.parent.dir>${basedir}/..</commons.parent.dir>
<project.build.outputTimestamp>2024-02-01T03:27:02Z</project.build.outputTimestamp>
</properties>

Expand Down
1 change: 1 addition & 0 deletions commons-rdf-simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
</site>
</distributionManagement>
<properties>
<commons.parent.dir>${basedir}/..</commons.parent.dir>
<project.build.outputTimestamp>2024-02-01T03:27:02Z</project.build.outputTimestamp>
</properties>

Expand Down
16 changes: 13 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>71</version>
<version>73</version>
</parent>

<artifactId>commons-rdf-parent</artifactId>
Expand All @@ -43,6 +43,7 @@
<maven.compiler.target>11</maven.compiler.target>
<project.build.encoding>UTF-8</project.build.encoding>
<project.build.outputTimestamp>2024-02-01T03:27:02Z</project.build.outputTimestamp>
<commons.parent.dir>${basedir}</commons.parent.dir>
<commons.encoding>UTF-8</commons.encoding>
<commons.componentid>rdf</commons.componentid>
<commons.module.name>org.apache.commons.rdf</commons.module.name>
Expand Down Expand Up @@ -288,7 +289,7 @@
</dependencies>

<build>
<defaultGoal>clean verify javadoc:javadoc</defaultGoal>
<defaultGoal>clean verify checkstyle:check javadoc:javadoc</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -509,6 +510,16 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${commons.parent.dir}/src/conf/checkstyle.xml</configLocation>
<propertyExpansion>config_loc=${commons.parent.dir}/src/conf/</propertyExpansion>
<enableRulesSummary>false</enableRulesSummary>
<suppressionsLocation>${commons.parent.dir}/src/conf/checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down Expand Up @@ -539,7 +550,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<configLocation>${project.basedir}/src/conf/checkstyle.xml</configLocation>
<!-- Needed to define config_loc -->
Expand Down
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
<action type="update" dev="ggregory" due-to="Gary Gregory">
Bump Java from 8 to 11.
</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">
Bump commons-parent from 71 to 73.
</action>
</release>
<release version="0.5.0" date="2017-11-19" description="Minor feature and bug fix release.">
<action type="fix" issue="COMMONSRDF-47">
Expand Down
33 changes: 11 additions & 22 deletions src/conf/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,11 @@ limitations under the License.
<property name="fileExtensions" value="java" />
<property name="severity" value="warning" />
</module>
<module name="LineLength">
<property name="max" value="160"/>
</module>

<module name="TreeWalker">
<property name="cacheFile" value="target/cachefile" />
<!--
-->
<module name="LineLength">
<property name="max" value="160"/>
</module>

<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
Expand Down Expand Up @@ -173,31 +170,23 @@ limitations under the License.
<module name="UpperEll"/>

<!-- Required for SuppressionCommentFilter below -->
<module name="FileContentsHolder"/>
<module name="ImportOrder">
<property name="option" value="top"/>
<property name="groups" value="java,javax,org"/>
<property name="ordered" value="true"/>
<property name="separated" value="true"/>
</module>

</module>

<module name="SuppressionCommentFilter"/>

<module name="SuppressionFilter">
<!-- config_loc is used by Eclipse plugin -->
<property name="file" value="${config_loc}/src/conf/checkstyle-suppressions.xml"/>
</module>

<!--
<module name="SuppressionCommentFilter"/>
<!--
Allow comment to suppress checkstyle for a single line
e.g. // CHECKSTYLE IGNORE MagicNumber
-->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="CHECKSTYLE IGNORE (\w+)"/>
<property name="checkFormat" value="$1"/>
-->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="CHECKSTYLE IGNORE (\w+)"/>
<property name="checkFormat" value="$1"/>
</module>
</module>

<!-- @author tags are deprecated -->
<module name="RegexpSingleline">
<property name="format" value="^\s+\*\s+@author\s" />
Expand Down

0 comments on commit 2e069ab

Please sign in to comment.