Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion parent_toplevel/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
xsi:schemaLocation="http://maven.apache.org/changes/2.0.0 https://maven.apache.org/xsd/changes-2.0.0.xsd">
<body>

<release version="2.1.4" date="not released">
<release version="2.2.0" date="not released">
<action type="add" dev="sseifert" issue="92">
Apply automatic Spotless formatting for Java and POM files.
</action>
<action type="update" dev="sseifert">
Update global-parent dependency to 76.
</action>
Expand Down
100 changes: 88 additions & 12 deletions parent_toplevel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
limitations under the License.
#L%
-->

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

Expand All @@ -31,7 +30,7 @@

<groupId>io.wcm.devops</groupId>
<artifactId>io.wcm.devops.parent_toplevel</artifactId>
<version>2.1.3-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Toplevel Parent</name>
Expand All @@ -41,8 +40,8 @@
<scm>
<connection>scm:git:https://github.com/wcm-io-devops/devops-tooling.git</connection>
<developerConnection>scm:git:https://github.com/wcm-io-devops/devops-tooling.git</developerConnection>
<url>https://github.com/wcm-io-devops/devops-tooling</url>
<tag>HEAD</tag>
<url>https://github.com/wcm-io-devops/devops-tooling</url>
</scm>

<inceptionYear>2015</inceptionYear>
Expand Down Expand Up @@ -185,10 +184,10 @@
<artifactId>license-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check-file-header</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
Expand All @@ -211,18 +210,18 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<generateReports>true</generateReports>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
<dependencies>
<dependency>
<groupId>io.wcm.maven.skins</groupId>
<artifactId>reflow-velocity-tools</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
<configuration>
<generateReports>true</generateReports>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
<executions>
<execution>
<id>attach-descriptor</id>
Expand All @@ -233,6 +232,56 @@
</executions>
</plugin>

<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<java>
<eclipse>
<file>global-build-tools/eclipse/java-formatter.xml</file>
</eclipse>
<removeUnusedImports />
<licenseHeader>
<file>global-build-tools/spotless/header-java.txt</file>
</licenseHeader>
</java>
<!-- accept all endings to support validations on top of source archives -->
<lineEndings>PRESERVE</lineEndings>
<pom>
<licenseHeader>
<file>global-build-tools/spotless/header-xml.txt</file>
<delimiter>&lt;project</delimiter>
</licenseHeader>
<sortPom>
<sortOrderFile>global-build-tools/spotless/sortpom.xml</sortOrderFile>
<nrOfIndentSpace>2</nrOfIndentSpace>
<expandEmptyElements>false</expandEmptyElements>
<!-- https://issues.apache.org/jira/browse/MRELEASE-1111 -->
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
</configuration>
<dependencies>
<dependency>
<groupId>io.wcm.maven</groupId>
<artifactId>io.wcm.maven.global-build-tools</artifactId>
<version>36-SNAPSHOT</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>${spotless.action}</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>

<!-- Workaround for change of report filename changes-report.html to changes.html with maven-changes-plugin 3.x
We have a lot of links out there from GitHub releases, and we cannot configure a server-side redirect for GitHub pages.
So, create a file that redirects to the new report name here. -->
Expand All @@ -257,10 +306,10 @@
<executions>
<execution>
<id>generate-file</id>
<phase>site</phase>
<goals>
<goal>write</goal>
</goals>
<phase>site</phase>
</execution>
</executions>
</plugin>
Expand Down Expand Up @@ -375,6 +424,7 @@
</reporting>

<profiles>

<!-- profile used for building releases and deployment to sonatype/maven central -->
<profile>
<id>release-profile</id>
Expand All @@ -394,19 +444,19 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<!-- configure staging process at sonatype.-->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<inherited>true</inherited>
<extensions>true</extensions>
<inherited>true</inherited>
<configuration>
<publishingServerId>sonatype-central</publishingServerId>
<deploymentName>${project.artifactId} ${project.version}</deploymentName>
Expand All @@ -415,6 +465,32 @@
</plugins>
</build>
</profile>

<!-- only check formatting with spotless by default in CI builds -->
<profile>
<id>spotless-format-check</id>
<activation>
<property>
<name>env.CI</name>
</property>
</activation>
<properties>
<spotless.action>check</spotless.action>
</properties>
</profile>
<!-- reformat during build with spotless with -Pformat -->
<profile>
<id>format</id>
<activation>
<property>
<name>!env.CI</name>
</property>
</activation>
<properties>
<spotless.action>apply</spotless.action>
</properties>
</profile>

</profiles>

<distributionManagement>
Expand Down
6 changes: 2 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
limitations under the License.
#L%
-->

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.wcm.devops</groupId>
<artifactId>io.wcm.devops.parent_toplevel</artifactId>
<version>2.1.2</version>
<version>2.2.0-SNAPSHOT</version>
<relativePath>parent_toplevel/pom.xml</relativePath>
</parent>

Expand Down
8 changes: 3 additions & 5 deletions public_site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
limitations under the License.
#L%
-->

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.wcm.devops</groupId>
<artifactId>io.wcm.devops.parent_toplevel</artifactId>
<version>2.1.2</version>
<version>2.2.0-SNAPSHOT</version>
<relativePath>../parent_toplevel/pom.xml</relativePath>
</parent>

Expand All @@ -42,8 +40,8 @@
<scm>
<connection>scm:git:https://github.com/wcm-io-devops/devops-tooling.git</connection>
<developerConnection>scm:git:https://github.com/wcm-io-devops/devops-tooling.git</developerConnection>
<url>https://github.com/wcm-io-devops/devops-tooling</url>
<tag>HEAD</tag>
<url>https://github.com/wcm-io-devops/devops-tooling</url>
</scm>

<ciManagement>
Expand Down