Skip to content

Commit e3b1dc3

Browse files
committed
Fix tracking III
1 parent 8ec98cc commit e3b1dc3

File tree

1 file changed

+186
-6
lines changed

1 file changed

+186
-6
lines changed

sessionize-java-client/pom.xml

Lines changed: 186 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>com.xdev-software</groupId>
8-
<artifactId>standard-maven-template</artifactId>
8+
<artifactId>sessionize-java-client</artifactId>
99
<version>1.0.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

12-
<name>standard-maven-template</name>
13-
<description>standard-maven-template</description>
14-
<url>https://github.com/xdev-software/standard-maven-template</url>
12+
<name>sessionize-java-client</name>
13+
<description>sessionize-java-client</description>
14+
<url>https://github.com/xdev-software/sessionize-java-client</url>
1515

1616
<scm>
17-
<url>https://github.com/xdev-software/standard-maven-template</url>
18-
<connection>https://github.com/xdev-software/standard-maven-template.git</connection>
17+
<url>https://github.com/xdev-software/sessionize-java-client</url>
18+
<connection>https://github.com/xdev-software/sessionize-java-client.git</connection>
1919
</scm>
2020

2121
<inceptionYear>2023</inceptionYear>
@@ -47,6 +47,11 @@
4747

4848
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4949
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
50+
51+
<!-- Ignore generated code -->
52+
<sonar.exclusions>
53+
src/generated/**
54+
</sonar.exclusions>
5055
</properties>
5156

5257
<repositories>
@@ -84,6 +89,60 @@
8489
</repository>
8590
</distributionManagement>
8691

92+
<dependencyManagement>
93+
<dependencies>
94+
<dependency>
95+
<groupId>com.fasterxml.jackson</groupId>
96+
<artifactId>jackson-bom</artifactId>
97+
<version>2.15.0</version>
98+
<type>pom</type>
99+
<scope>import</scope>
100+
</dependency>
101+
</dependencies>
102+
</dependencyManagement>
103+
104+
<dependencies>
105+
<!-- HTTP client: apache client -->
106+
<dependency>
107+
<groupId>org.apache.httpcomponents.client5</groupId>
108+
<artifactId>httpclient5</artifactId>
109+
<version>5.2.1</version>
110+
</dependency>
111+
112+
<!-- JSON processing: jackson -->
113+
<dependency>
114+
<groupId>com.fasterxml.jackson.core</groupId>
115+
<artifactId>jackson-core</artifactId>
116+
</dependency>
117+
<dependency>
118+
<groupId>com.fasterxml.jackson.core</groupId>
119+
<artifactId>jackson-annotations</artifactId>
120+
</dependency>
121+
<dependency>
122+
<groupId>com.fasterxml.jackson.core</groupId>
123+
<artifactId>jackson-databind</artifactId>
124+
</dependency>
125+
<dependency>
126+
<groupId>com.fasterxml.jackson.jaxrs</groupId>
127+
<artifactId>jackson-jaxrs-json-provider</artifactId>
128+
</dependency>
129+
<dependency>
130+
<groupId>com.fasterxml.jackson.datatype</groupId>
131+
<artifactId>jackson-datatype-jsr310</artifactId>
132+
</dependency>
133+
<dependency>
134+
<groupId>org.openapitools</groupId>
135+
<artifactId>jackson-databind-nullable</artifactId>
136+
<version>0.2.6</version>
137+
</dependency>
138+
139+
<dependency>
140+
<groupId>jakarta.annotation</groupId>
141+
<artifactId>jakarta.annotation-api</artifactId>
142+
<version>2.1.1</version>
143+
</dependency>
144+
</dependencies>
145+
87146
<build>
88147
<plugins>
89148
<plugin>
@@ -158,6 +217,25 @@
158217
</execution>
159218
</executions>
160219
</plugin>
220+
221+
<plugin>
222+
<groupId>org.codehaus.mojo</groupId>
223+
<artifactId>build-helper-maven-plugin</artifactId>
224+
<version>3.3.0</version>
225+
<executions>
226+
<execution>
227+
<phase>generate-sources</phase>
228+
<goals>
229+
<goal>add-source</goal>
230+
</goals>
231+
<configuration>
232+
<sources>
233+
<source>src/generated/java</source>
234+
</sources>
235+
</configuration>
236+
</execution>
237+
</executions>
238+
</plugin>
161239
</plugins>
162240
</build>
163241
<profiles>
@@ -204,5 +282,107 @@
204282
</plugins>
205283
</build>
206284
</profile>
285+
<profile>
286+
<id>openapi-generator</id>
287+
<properties>
288+
<basePackage>software.xdev.sessionize</basePackage>
289+
290+
<generatedDir>${project.basedir}/src/generated/java</generatedDir>
291+
<openApiRelativeGeneratorDir>src/gen</openApiRelativeGeneratorDir>
292+
<openApiGeneratorDir>
293+
${project.basedir}/target/generated-sources/openapi/${openApiRelativeGeneratorDir}
294+
</openApiGeneratorDir>
295+
</properties>
296+
<build>
297+
<plugins>
298+
<plugin>
299+
<groupId>org.openapitools</groupId>
300+
<artifactId>openapi-generator-maven-plugin</artifactId>
301+
<version>6.5.0</version>
302+
<executions>
303+
<execution>
304+
<goals>
305+
<goal>generate</goal>
306+
</goals>
307+
<configuration>
308+
<inputSpec>${project.basedir}/../openapi/openapi.yml</inputSpec>
309+
<generatorName>java</generatorName>
310+
<configOptions>
311+
<sourceFolder>${openApiRelativeGeneratorDir}</sourceFolder>
312+
<library>apache-httpclient</library>
313+
<apiPackage>${basePackage}.api</apiPackage>
314+
<modelPackage>${basePackage}.model</modelPackage>
315+
<invokerPackage>${basePackage}.client</invokerPackage>
316+
<!-- Otherwise throw and catch everywhere -->
317+
<useRuntimeException>true</useRuntimeException>
318+
<!-- Some fields of API have been ignored because they are unused -->
319+
<disallowAdditionalPropertiesIfNotPresent>false
320+
</disallowAdditionalPropertiesIfNotPresent>
321+
<!-- Use newer Jakarta EE instead of Javax -->
322+
<useJakartaEe>true</useJakartaEe>
323+
<!-- No tests and documentation because we don't use that -->
324+
<generateModelTests>false</generateModelTests>
325+
<generateApiTests>false</generateApiTests>
326+
<generateModelDocumentation>false</generateModelDocumentation>
327+
<generateApiDocumentation>false</generateApiDocumentation>
328+
</configOptions>
329+
</configuration>
330+
</execution>
331+
</executions>
332+
</plugin>
333+
<plugin>
334+
<groupId>org.apache.maven.plugins</groupId>
335+
<artifactId>maven-resources-plugin</artifactId>
336+
<version>3.3.1</version>
337+
<executions>
338+
<execution>
339+
<id>copy-generated-resources</id>
340+
<phase>process-resources</phase>
341+
<goals>
342+
<goal>copy-resources</goal>
343+
</goals>
344+
<configuration>
345+
<outputDirectory>${generatedDir}</outputDirectory>
346+
<resources>
347+
<resource>
348+
<directory>${openApiGeneratorDir}</directory>
349+
</resource>
350+
</resources>
351+
</configuration>
352+
</execution>
353+
</executions>
354+
</plugin>
355+
<plugin>
356+
<groupId>org.apache.maven.plugins</groupId>
357+
<artifactId>maven-clean-plugin</artifactId>
358+
<version>3.2.0</version>
359+
<executions>
360+
<execution>
361+
<id>pre-generation-clean</id>
362+
<phase>initialize</phase>
363+
<goals>
364+
<goal>clean</goal>
365+
</goals>
366+
<configuration>
367+
<excludeDefaultDirectories>true</excludeDefaultDirectories>
368+
<filesets>
369+
<fileset>
370+
<directory>${generatedDir}</directory>
371+
</fileset>
372+
</filesets>
373+
</configuration>
374+
</execution>
375+
<execution>
376+
<id>post-generation-clean</id>
377+
<phase>process-resources</phase>
378+
<goals>
379+
<goal>clean</goal>
380+
</goals>
381+
</execution>
382+
</executions>
383+
</plugin>
384+
</plugins>
385+
</build>
386+
</profile>
207387
</profiles>
208388
</project>

0 commit comments

Comments
 (0)