ao-checkstyle-config
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>com.aoapps</groupId>
<artifactId>ao-checkstyle-config</artifactId>
<version>1.3.0</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<!--
ao-checkstyle-config - Default Checkstyle configuration for AO projects.
Copyright (C) 2022, 2023, 2024 AO Industries, Inc.
support@aoindustries.com
7262 Bull Pen Cir
Mobile, AL 36695
This file is part of ao-checkstyle-config.
ao-checkstyle-config is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ao-checkstyle-config is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with ao-checkstyle-config. If not, see <https://www.gnu.org/licenses/>.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.aoapps</groupId><artifactId>ao-oss-parent</artifactId><version>1.24.3<!-- -POST-SNAPSHOT --></version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<groupId>com.aoapps</groupId><artifactId>ao-checkstyle-config</artifactId><version>1.3.0</version>
<packaging>jar</packaging>
<properties>
<!-- Must be set to ${git.commit.time} for snapshots or ISO 8601 timestamp for releases. -->
<project.build.outputTimestamp>2024-05-08T02:16:57Z</project.build.outputTimestamp>
<module.name>com.aoapps.checkstyle.config</module.name>
<!-- Java 11 inherited from parent -->
<!-- Matches "requireJavaVersion" from ao-oss-parent -->
<!-- Plugin Dependencies -->
<com.puppycrawl.tools.checkstyle.version>10.16.0</com.puppycrawl.tools.checkstyle.version>
</properties>
<name>AO Checkstyle Config</name>
<url>https://oss.aoapps.com/checkstyle-config/</url>
<description>Default Checkstyle configuration for AO projects.</description>
<inceptionYear>2022</inceptionYear>
<licenses>
<license>
<name>GNU General Lesser Public License (LGPL) version 3.0</name>
<url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>AO Industries, Inc.</name>
<url>https://aoindustries.com/</url>
</organization>
<developers>
<developer>
<name>AO Industries, Inc.</name>
<email>support@aoindustries.com</email>
<url>https://aoindustries.com/</url>
<organization>AO Industries, Inc.</organization>
<organizationUrl>https://aoindustries.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/ao-apps/ao-checkstyle-config.git</connection>
<developerConnection>scm:git:git@github.com:ao-apps/ao-checkstyle-config.git</developerConnection>
<url>https://github.com/ao-apps/ao-checkstyle-config</url>
<tag>ao-checkstyle-config-1.3.0</tag>
</scm>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/ao-apps/ao-checkstyle-config/issues</url>
</issueManagement>
<ciManagement>
<system>Jenkins</system>
<url>https://jenkins.aoindustries.com/job/ao/job/oss/job/checkstyle-config/</url>
</ciManagement>
<!-- Only one allowed in POM:
<ciManagement>
<system>GitHub Actions</system>
<url>https://github.com/ao-apps/ao-checkstyle-config/actions</url>
</ciManagement>
-->
<repositories>
<!-- Repository required here, too, so can find parent -->
<repository>
<id>sonatype-nexus-snapshots-s01</id>
<name>Sonatype Nexus Snapshots S01</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
</repositories>
<build>
<!--
module-info.java moved to src/main/java-11, since chicken-and-egg issue activated in parent when
src/main/java is present. The parent adds ao-checkstyle-config as a plugin dependency. This, in-turn,
will attempt to fetch the dependency, not using this version from the reactor build. This may cause the
build to fail when switching to a new version of ao-checkstyle-config.
-->
<sourceDirectory>src/main/java-11</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack.google_checks.xml</id><phase>initialize</phase><goals><goal>unpack</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.puppycrawl.tools</groupId><artifactId>checkstyle</artifactId><version>${com.puppycrawl.tools.checkstyle.version}</version>
<type>jar</type>
<includes>google_checks.xml</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId><artifactId>checkstyle</artifactId><version>${com.puppycrawl.tools.checkstyle.version}</version>
<type>jar</type>
<exclusions><exclusion><groupId>*</groupId><artifactId>*</artifactId></exclusion></exclusions>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate.checkstyle-configuration.xml</id><phase>generate-sources</phase><goals><goal>run</goal></goals>
<configuration>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<copy overwrite="true" todir="${project.build.directory}/substitute-templates">
<fileset dir="${project.build.directory}/dependency" includes="google_checks.xml" />
</copy>
<replace file="${project.build.directory}/substitute-templates/google_checks.xml" summary="true" failOnNoReplacements="true">
<replacetoken><![CDATA[<property name="max" value="100"/>]]></replacetoken>
<replacevalue><![CDATA[<!-- Begin ao-checkstyle-config removed
<property name="max" value="100"/>
End ao-checkstyle-config removed -->
<!-- Begin ao-checkstyle-config added -->
<!-- Allow up to 200 characters -->
<property name="max" value="200" />
<!-- End ao-checkstyle-config added -->]]></replacevalue>
</replace>
<replace file="${project.build.directory}/substitute-templates/google_checks.xml" summary="true" failOnNoReplacements="true">
<replacetoken><![CDATA[<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>]]></replacetoken>
<replacevalue><![CDATA[<!-- Begin ao-checkstyle-config removed
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
End ao-checkstyle-config removed -->
<!-- Begin ao-checkstyle-config added -->
<!-- Allow long javadoc links -->
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|^ *\* .*(@see|\{@link)"/>
<!-- End ao-checkstyle-config added -->]]></replacevalue>
</replace>
<condition property="checkstyle-configuration.xml.matches" value="true">
<filesmatch file1="${project.build.directory}/substitute-templates/google_checks.xml" file2="${project.basedir}/src/main/resources/ao-checkstyle-config/checkstyle-configuration.xml" />
</condition>
<copy unless:set="checkstyle-configuration.xml.matches" overwrite="true" file="${project.build.directory}/substitute-templates/google_checks.xml" tofile="${project.basedir}/src/main/resources/ao-checkstyle-config/checkstyle-configuration.xml" />
<echo if:set="checkstyle-configuration.xml.matches" message="checkstyle-configuration.xml unchanged" level="info" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>