Swagger-UI using Spring framework
[cps.git] / cps / cps-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5     <parent>
6         <groupId>org.onap.oparent</groupId>
7         <artifactId>oparent</artifactId>
8         <version>3.1.0</version>
9         <relativePath/>
10     </parent>
11     <modelVersion>4.0.0</modelVersion>
12
13     <groupId>org.onap.cps</groupId>
14     <artifactId>cps-parent</artifactId>
15     <version>0.0.1-SNAPSHOT</version>
16     <packaging>pom</packaging>
17
18     <properties>
19         <java.version>11</java.version>
20         <oparent.version>3.1.0</oparent.version>
21         <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
22         <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
23     </properties>
24
25     <dependencyManagement>
26         <dependencies>
27             <dependency>
28                 <groupId>org.onap.cps</groupId>
29                 <artifactId>cps-dependencies</artifactId>
30                 <version>${project.version}</version>
31                 <type>pom</type>
32                 <scope>import</scope>
33             </dependency>
34             <dependency>
35                 <groupId>org.onap.cps</groupId>
36                 <artifactId>cps-bom</artifactId>
37                 <version>${project.version}</version>
38                 <type>pom</type>
39                 <scope>import</scope>
40             </dependency>
41         </dependencies>
42     </dependencyManagement>
43
44     <build>
45         <resources>
46             <resource>
47                 <directory>src/main/resources</directory>
48                 <filtering>true</filtering>
49             </resource>
50             <resource>
51                 <directory>target/generated-sources/license</directory>
52                 <includes>
53                     <include>third-party-licenses.txt</include>
54                 </includes>
55             </resource>
56             <resource>
57                 <directory>target/generated-resources/licenses</directory>
58                 <includes>
59                     <include>*.*</include>
60                 </includes>
61                 <targetPath>third-party-licenses</targetPath>
62             </resource>
63         </resources>
64         <pluginManagement>
65             <plugins>
66                 <plugin>
67                     <groupId>org.springframework.boot</groupId>
68                     <artifactId>spring-boot-maven-plugin</artifactId>
69                     <version>${spring-boot-maven-plugin.version}</version>
70                     <executions>
71                         <execution>
72                             <goals>
73                                 <goal>repackage</goal>
74                             </goals>
75                         </execution>
76                     </executions>
77                 </plugin>
78                 <!-- Swagger code generation. -->
79                 <plugin>
80                     <groupId>io.swagger.codegen.v3</groupId>
81                     <artifactId>swagger-codegen-maven-plugin</artifactId>
82                     <version>${swagger-codegen-maven-plugin.version}</version>
83                     <executions>
84                         <execution>
85                             <goals>
86                                 <goal>generate</goal>
87                             </goals>
88                             <configuration>
89                                 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
90                                 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
91                                 <modelPackage>org.onap.cps.rest.model</modelPackage>
92                                 <apiPackage>org.onap.cps.rest.api</apiPackage>
93                                 <language>spring</language>
94                                 <generateSupportingFiles>false</generateSupportingFiles>
95                                 <configOptions>
96                                     <sourceFolder>src/gen/java</sourceFolder>
97                                     <dateLibrary>java11</dateLibrary>
98                                     <interfaceOnly>true</interfaceOnly>
99                                     <useTags>true</useTags>
100                                 </configOptions>
101                             </configuration>
102                         </execution>
103                     </executions>
104                 </plugin>
105             </plugins>
106         </pluginManagement>
107         <plugins>
108             <plugin>
109                 <groupId>org.apache.maven.plugins</groupId>
110                 <artifactId>maven-compiler-plugin</artifactId>
111                 <configuration>
112                     <source>${java.version}</source>
113                     <target>${java.version}</target>
114                 </configuration>
115             </plugin>
116             <plugin>
117                 <groupId>org.apache.maven.plugins</groupId>
118                 <artifactId>maven-checkstyle-plugin</artifactId>
119                 <executions>
120                     <execution>
121                         <id>onap-java-style</id>
122                         <goals>
123                             <goal>check</goal>
124                         </goals>
125                         <phase>process-sources</phase>
126                         <configuration>
127                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
128                             <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
129                             <includeResources>true</includeResources>
130                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
131                             <includeTestResources>true</includeTestResources>
132                             <consoleOutput>false</consoleOutput>
133                             <violationSeverity>warning</violationSeverity>
134                             <failOnViolation>true</failOnViolation>
135                         </configuration>
136                     </execution>
137                 </executions>
138                 <dependencies>
139                     <dependency>
140                         <groupId>org.onap.oparent</groupId>
141                         <artifactId>checkstyle</artifactId>
142                         <version>${oparent.version}</version>
143                     </dependency>
144                 </dependencies>
145             </plugin>
146             <!-- Mandatory plugins for using Spock -->
147             <plugin>
148                 <!-- The gmavenplus plugin is used to compile Groovy code.
149                     To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
150                 <groupId>org.codehaus.gmavenplus</groupId>
151                 <artifactId>gmavenplus-plugin</artifactId>
152                 <version>1.9.0</version>
153                 <executions>
154                     <execution>
155                         <goals>
156                             <goal>compileTests</goal>
157                         </goals>
158                     </execution>
159                 </executions>
160             </plugin>
161             <!-- Required because names of spec classes don't match default
162                 Surefire patterns (`*Test` etc.) -->
163             <plugin>
164                 <groupId>org.apache.maven.plugins</groupId>
165                 <artifactId>maven-surefire-plugin</artifactId>
166                 <version>3.0.0-M5</version>
167                 <configuration>
168                     <useFile>false</useFile>
169                     <includes>
170                         <include>**/*Spec.java</include>
171                         <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
172                     </includes>
173                 </configuration>
174             </plugin>
175         </plugins>
176     </build>
177 </project>