Skip to content

Commit 5e0f01f

Browse files
cstamasvorburger
authored andcommitted
Auto format source and POM
Code change in pom.xml: * added spotless plugin w/: googleJavaFormat, removeUnusedImports and sortPom * added profiles (dev reformat, CI enforce formatting) Rest of codebase is _reformatted only_ (more precisely, no semantic changes, imports are optimized to remove wildcard imports).
1 parent 9951638 commit 5e0f01f

27 files changed

Lines changed: 5935 additions & 5306 deletions

pom.xml

Lines changed: 169 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,179 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>com.github.ipfs</groupId>
6-
<artifactId>java-ipfs-http-client</artifactId>
7-
<version>v1.4.5-SNAPSHOT</version>
8-
<packaging>jar</packaging>
5+
<groupId>com.github.ipfs</groupId>
6+
<artifactId>java-ipfs-http-client</artifactId>
7+
<version>v1.4.5-SNAPSHOT</version>
8+
<packaging>jar</packaging>
99

10-
<name>java-ipfs-http-client</name>
11-
<url>https://github.com/ipfs/java-ipfs-http-client</url>
10+
<name>java-ipfs-http-client</name>
11+
<url>https://github.com/ipfs/java-ipfs-http-client</url>
1212

13-
<issueManagement>
14-
<url>https://github.com/ipfs/java-ipfs-http-client/issues</url>
15-
<system>GitHub Issues</system>
16-
</issueManagement>
13+
<licenses>
14+
<license>
15+
<name>MIT License</name>
16+
<url>https://github.com/ipfs/java-ipfs-http-client/blob/master/LICENSE</url>
17+
<distribution>repo</distribution>
18+
</license>
19+
</licenses>
1720

18-
<scm>
19-
<connection>scm:git:git://github.com/ipfs/java-ipfs-http-client.git</connection>
20-
<developerConnection>scm:git:git@github.com:ipfs/java-ipfs-http-client.git</developerConnection>
21-
<tag>HEAD</tag>
22-
<url>https://github.com/ipfs/java-ipfs-http-client</url>
23-
</scm>
21+
<scm>
22+
<connection>scm:git:git://github.com/ipfs/java-ipfs-http-client.git</connection>
23+
<developerConnection>scm:git:git@github.com:ipfs/java-ipfs-http-client.git</developerConnection>
24+
<tag>HEAD</tag>
25+
<url>https://github.com/ipfs/java-ipfs-http-client</url>
26+
</scm>
2427

25-
<licenses>
26-
<license>
27-
<name>MIT License</name>
28-
<url>https://github.com/ipfs/java-ipfs-http-client/blob/master/LICENSE</url>
29-
<distribution>repo</distribution>
30-
</license>
31-
</licenses>
28+
<issueManagement>
29+
<system>GitHub Issues</system>
30+
<url>https://github.com/ipfs/java-ipfs-http-client/issues</url>
31+
</issueManagement>
3232

33-
<properties>
34-
<project.build.outputTimestamp>2026-01-20T00:00:00Z</project.build.outputTimestamp>
35-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
37-
<maven.compiler.release>11</maven.compiler.release>
38-
<version.junit>4.13.2</version.junit>
39-
<version.hamcrest>2.2</version.hamcrest>
40-
<version.multiaddr>v1.4.13</version.multiaddr>
41-
</properties>
33+
<properties>
34+
<project.build.outputTimestamp>2026-01-20T00:00:00Z</project.build.outputTimestamp>
35+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
37+
<maven.compiler.release>11</maven.compiler.release>
38+
<version.junit>4.13.2</version.junit>
39+
<version.hamcrest>2.2</version.hamcrest>
40+
<version.multiaddr>v1.4.13</version.multiaddr>
41+
</properties>
4242

43-
<repositories>
44-
<repository>
45-
<id>jitpack.io</id>
46-
<url>https://jitpack.io</url>
47-
</repository>
48-
</repositories>
43+
<dependencies>
44+
<dependency>
45+
<groupId>com.github.multiformats</groupId>
46+
<artifactId>java-multiaddr</artifactId>
47+
<version>${version.multiaddr}</version>
48+
</dependency>
49+
<dependency>
50+
<groupId>junit</groupId>
51+
<artifactId>junit</artifactId>
52+
<version>${version.junit}</version>
53+
<scope>test</scope>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.hamcrest</groupId>
57+
<artifactId>hamcrest</artifactId>
58+
<version>${version.hamcrest}</version>
59+
<scope>test</scope>
60+
</dependency>
61+
</dependencies>
4962

50-
<dependencies>
51-
<dependency>
52-
<groupId>com.github.multiformats</groupId>
53-
<artifactId>java-multiaddr</artifactId>
54-
<version>${version.multiaddr}</version>
55-
</dependency>
56-
<dependency>
57-
<groupId>junit</groupId>
58-
<artifactId>junit</artifactId>
59-
<version>${version.junit}</version>
60-
<scope>test</scope>
61-
</dependency>
62-
<dependency>
63-
<groupId>org.hamcrest</groupId>
64-
<artifactId>hamcrest</artifactId>
65-
<version>${version.hamcrest}</version>
66-
<scope>test</scope>
67-
</dependency>
68-
</dependencies>
63+
<repositories>
64+
<repository>
65+
<id>jitpack.io</id>
66+
<url>https://jitpack.io</url>
67+
</repository>
68+
</repositories>
6969

70-
<build>
71-
<plugins>
72-
<plugin>
73-
<groupId>org.apache.maven.plugins</groupId>
74-
<artifactId>maven-enforcer-plugin</artifactId>
75-
<version>3.6.2</version>
76-
<configuration>
77-
<rules>
78-
<requireMavenVersion>
79-
<version>3.9.6</version>
80-
</requireMavenVersion>
81-
<requireJavaVersion>
82-
<version>21</version>
83-
</requireJavaVersion>
84-
</rules>
85-
</configuration>
86-
<executions>
87-
<execution>
88-
<id>enforce</id>
89-
<goals>
90-
<goal>enforce</goal>
91-
</goals>
92-
<phase>validate</phase>
93-
</execution>
94-
</executions>
95-
</plugin>
96-
<plugin>
97-
<groupId>org.apache.maven.plugins</groupId>
98-
<artifactId>maven-compiler-plugin</artifactId>
99-
<version>3.14.1</version>
100-
</plugin>
101-
<plugin>
102-
<groupId>org.apache.maven.plugins</groupId>
103-
<artifactId>maven-surefire-plugin</artifactId>
104-
<version>3.5.4</version>
105-
</plugin>
106-
<plugin>
107-
<groupId>org.apache.maven.plugins</groupId>
108-
<artifactId>maven-jar-plugin</artifactId>
109-
<version>3.5.0</version>
110-
<configuration>
111-
<archive>
112-
<manifest>
113-
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
114-
</manifest>
115-
</archive>
116-
</configuration>
117-
</plugin>
118-
</plugins>
119-
</build>
70+
<build>
71+
<plugins>
72+
<plugin>
73+
<groupId>org.apache.maven.plugins</groupId>
74+
<artifactId>maven-enforcer-plugin</artifactId>
75+
<version>3.6.2</version>
76+
<configuration>
77+
<rules>
78+
<requireMavenVersion>
79+
<version>3.9.6</version>
80+
</requireMavenVersion>
81+
<requireJavaVersion>
82+
<version>21</version>
83+
</requireJavaVersion>
84+
</rules>
85+
</configuration>
86+
<executions>
87+
<execution>
88+
<id>enforce</id>
89+
<goals>
90+
<goal>enforce</goal>
91+
</goals>
92+
<phase>validate</phase>
93+
</execution>
94+
</executions>
95+
</plugin>
96+
<plugin>
97+
<groupId>com.diffplug.spotless</groupId>
98+
<artifactId>spotless-maven-plugin</artifactId>
99+
<version>3.1.0</version>
100+
<configuration>
101+
<java>
102+
<googleJavaFormat>
103+
<version>1.33.0</version>
104+
</googleJavaFormat>
105+
<removeUnusedImports>
106+
<engine>google-java-format</engine>
107+
</removeUnusedImports>
108+
<forbidWildcardImports />
109+
</java>
110+
<pom>
111+
<sortPom>
112+
<expandEmptyElements>false</expandEmptyElements>
113+
<!-- https://issues.apache.org/jira/browse/MRELEASE-1111 -->
114+
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
115+
<quiet>true</quiet>
116+
</sortPom>
117+
</pom>
118+
<upToDateChecking>
119+
<enabled>true</enabled>
120+
</upToDateChecking>
121+
</configuration>
122+
<executions>
123+
<execution>
124+
<goals>
125+
<goal>${spotless.action}</goal>
126+
</goals>
127+
<phase>process-sources</phase>
128+
</execution>
129+
</executions>
130+
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-compiler-plugin</artifactId>
134+
<version>3.14.1</version>
135+
</plugin>
136+
<plugin>
137+
<groupId>org.apache.maven.plugins</groupId>
138+
<artifactId>maven-surefire-plugin</artifactId>
139+
<version>3.5.4</version>
140+
</plugin>
141+
<plugin>
142+
<groupId>org.apache.maven.plugins</groupId>
143+
<artifactId>maven-jar-plugin</artifactId>
144+
<version>3.5.0</version>
145+
<configuration>
146+
<archive>
147+
<manifest>
148+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
149+
</manifest>
150+
</archive>
151+
</configuration>
152+
</plugin>
153+
</plugins>
154+
</build>
155+
<profiles>
156+
<profile>
157+
<id>format-check</id>
158+
<activation>
159+
<property>
160+
<name>env.CI</name>
161+
</property>
162+
</activation>
163+
<properties>
164+
<spotless.action>check</spotless.action>
165+
</properties>
166+
</profile>
167+
<profile>
168+
<id>format</id>
169+
<activation>
170+
<property>
171+
<name>!env.CI</name>
172+
</property>
173+
</activation>
174+
<properties>
175+
<spotless.action>apply</spotless.action>
176+
</properties>
177+
</profile>
178+
</profiles>
120179
</project>

0 commit comments

Comments
 (0)