Skip to content

Commit 75b6d16

Browse files
authored
style: improved pom file and code style (#84)
2 parents ca2ac56 + 10ea0be commit 75b6d16

File tree

14 files changed

+107
-3094
lines changed

14 files changed

+107
-3094
lines changed

api/pom.xml

Lines changed: 89 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
5-
65
<parent>
76
<artifactId>base</artifactId>
87
<groupId>org.cardanofoundation.rosetta-java</groupId>
@@ -121,12 +120,12 @@
121120
<version>4.10.0</version>
122121
</dependency>
123122
<dependency>
124-
<groupId>com.fasterxml.jackson.dataformat</groupId>
125-
<artifactId>jackson-dataformat-yaml</artifactId>
123+
<groupId>com.fasterxml.jackson.dataformat</groupId>
124+
<artifactId>jackson-dataformat-yaml</artifactId>
126125
</dependency>
127126
<dependency>
128-
<groupId>com.fasterxml.jackson.datatype</groupId>
129-
<artifactId>jackson-datatype-jsr310</artifactId>
127+
<groupId>com.fasterxml.jackson.datatype</groupId>
128+
<artifactId>jackson-datatype-jsr310</artifactId>
130129
</dependency>
131130

132131
<!-- https://mvnrepository.com/artifact/org.openapitools/jackson-databind-nullable -->
@@ -136,9 +135,9 @@
136135
<version>0.2.2</version>
137136
</dependency>
138137
<dependency>
139-
<groupId>com.google.code.findbugs</groupId>
140-
<artifactId>jsr305</artifactId>
141-
<version>3.0.2</version>
138+
<groupId>com.github.spotbugs</groupId>
139+
<artifactId>spotbugs-annotations</artifactId>
140+
<version>4.8.3</version>
142141
</dependency>
143142
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
144143
<dependency>
@@ -148,7 +147,6 @@
148147
</dependency>
149148

150149
<dependency>
151-
152150
<groupId>org.springframework.boot</groupId>
153151
<artifactId>spring-boot-configuration-processor</artifactId>
154152
<optional>true</optional>
@@ -216,24 +214,24 @@
216214
</dependency>
217215

218216
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/org.testcontainers/testcontainers &ndash;&gt;-->
219-
<!-- <dependency>-->
220-
<!-- <groupId>org.testcontainers</groupId>-->
221-
<!-- <artifactId>testcontainers</artifactId>-->
222-
<!-- <version>1.17.6</version>-->
223-
<!-- <scope>test</scope>-->
224-
<!-- </dependency>-->
225-
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/org.purejava/tweetnacl-java &ndash;&gt;-->
226-
<!-- <dependency>-->
227-
<!-- <groupId>org.purejava</groupId>-->
228-
<!-- <artifactId>tweetnacl-java</artifactId>-->
229-
<!-- <version>1.1.2</version>-->
230-
<!-- </dependency>-->
231-
<!-- <dependency>-->
232-
<!-- <groupId>org.mockito</groupId>-->
233-
<!-- <artifactId>mockito-inline</artifactId>-->
234-
<!-- <version>3.8.0</version>-->
235-
<!-- <scope>test</scope>-->
236-
<!-- </dependency>-->
217+
<!-- <dependency>-->
218+
<!-- <groupId>org.testcontainers</groupId>-->
219+
<!-- <artifactId>testcontainers</artifactId>-->
220+
<!-- <version>1.17.6</version>-->
221+
<!-- <scope>test</scope>-->
222+
<!-- </dependency>-->
223+
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/org.purejava/tweetnacl-java &ndash;&gt;-->
224+
<!-- <dependency>-->
225+
<!-- <groupId>org.purejava</groupId>-->
226+
<!-- <artifactId>tweetnacl-java</artifactId>-->
227+
<!-- <version>1.1.2</version>-->
228+
<!-- </dependency>-->
229+
<!-- <dependency>-->
230+
<!-- <groupId>org.mockito</groupId>-->
231+
<!-- <artifactId>mockito-inline</artifactId>-->
232+
<!-- <version>3.8.0</version>-->
233+
<!-- <scope>test</scope>-->
234+
<!-- </dependency>-->
237235
<!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api -->
238236
<dependency>
239237
<groupId>javax.servlet</groupId>
@@ -302,19 +300,22 @@
302300
<goal>generate</goal>
303301
</goals>
304302
<configuration>
305-
<inputSpec>${project.basedir}/src/main/resources/rosetta-specifications-1.4.15/api.yaml</inputSpec>
303+
<inputSpec>${project.basedir}/src/main/resources/rosetta-specifications-1.4.15/api.yaml
304+
</inputSpec>
306305
<generatorName>spring</generatorName>
307306
<library>spring-boot</library>
308307
<apiPackage>org.openapitools.client.api</apiPackage>
309308
<modelPackage>org.openapitools.client.model</modelPackage>
310-
<configOptions>
311-
<sourceFolder>src/gen/java/main</sourceFolder>
312-
<useJakartaEe>true</useJakartaEe>
313-
<skipValidateSpec>true</skipValidateSpec>
314-
<interfaceOnly>true</interfaceOnly>
315-
<!--suppress UnresolvedMavenProperty -->
316-
<additionalModelTypeAnnotations>@lombok.Builder @lombok.NoArgsConstructor @lombok.AllArgsConstructor</additionalModelTypeAnnotations>
317-
</configOptions>
309+
<configOptions>
310+
<sourceFolder>src/gen/java/main</sourceFolder>
311+
<useJakartaEe>true</useJakartaEe>
312+
<skipValidateSpec>true</skipValidateSpec>
313+
<interfaceOnly>true</interfaceOnly>
314+
<!--suppress UnresolvedMavenProperty -->
315+
<additionalModelTypeAnnotations>@lombok.Builder @lombok.NoArgsConstructor
316+
@lombok.AllArgsConstructor
317+
</additionalModelTypeAnnotations>
318+
</configOptions>
318319
</configuration>
319320
</execution>
320321
</executions>
@@ -339,7 +340,9 @@
339340
<configuration>
340341
<excludes>
341342
<exclude>**/dto/*</exclude>
342-
<exclude>**/model/**</exclude>
343+
<exclude>**/entity/*</exclude>
344+
<exclude>**/model/rest/**</exclude>
345+
<exclude>**/model/rosetta/**</exclude>
343346
<exclude>**/mapper/*</exclude>
344347
<exclude>**/cli/*</exclude>
345348
<exclude>**/exception/*</exclude>
@@ -367,7 +370,54 @@
367370
</execution>
368371
</executions>
369372
</plugin>
373+
<plugin>
374+
<groupId>com.diffplug.spotless</groupId>
375+
<artifactId>spotless-maven-plugin</artifactId>
376+
<version>${version.spotless-maven-plugin}</version>
377+
<configuration>
378+
<java>
379+
<excludes>
380+
<exclude>target/**/*.java</exclude>
381+
</excludes>
382+
<removeUnusedImports/>
383+
<replaceRegex>
384+
<name>Remove wildcard imports</name>
385+
<searchRegex>import\\s+[^\\*\\s]+\\*;(\\r\\n|\\r|\\n)</searchRegex>
386+
<replacement>$1</replacement>
387+
</replaceRegex>
388+
<googleJavaFormat>
389+
<version>${version.google-java-format}</version>
390+
<style>GOOGLE</style>
391+
</googleJavaFormat>
392+
<importOrder>
393+
<order>
394+
java,jakarta,javax,lombok,org.springframework,,\\#,org.junit,\\#org.junit,org.cardanofoundation,\\#org.cardanofoundation
395+
</order>
396+
</importOrder>
397+
<indent>
398+
<spaces>true</spaces>
399+
<spacesPerTab>2</spacesPerTab>
400+
</indent>
401+
<trimTrailingWhitespace/>
402+
<endWithNewline/>
403+
</java>
404+
</configuration>
405+
</plugin>
406+
<plugin>
407+
<groupId>com.github.spotbugs</groupId>
408+
<artifactId>spotbugs-maven-plugin</artifactId>
409+
<version>${version.spotbugs-maven-plugin}</version>
410+
<configuration>
411+
<plugins>
412+
<plugin>
413+
<groupId>com.h3xstream.findsecbugs</groupId>
414+
<artifactId>findsecbugs-plugin</artifactId>
415+
<version>${version.findsecbugs-plugin}</version>
416+
</plugin>
417+
</plugins>
418+
</configuration>
419+
</plugin>
370420
</plugins>
371421
</build>
372422

373-
</project>
423+
</project>

api/src/main/resources/rosetta-specifications-1.4.15/.github/ISSUE_TEMPLATE/bug_report.md

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

api/src/main/resources/rosetta-specifications-1.4.15/.github/ISSUE_TEMPLATE/feature_request.md

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

api/src/main/resources/rosetta-specifications-1.4.15/.github/PULL_REQUEST_TEMPLATE.md

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

api/src/main/resources/rosetta-specifications-1.4.15/.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)