fix doc config files
[ccsdk/cds.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (C) 2019 Bell Canada
4 Modification Copyright © 2018-2019 AT&T Intellectual Property.
5
6 Unless otherwise specified, all software contained herein is licensed
7 under the Apache License, Version 2.0 (the License);
8 you may not use this software except in compliance with the License.
9 You may obtain a copy of the License at
10
11     http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 -->
19
20 <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">
21     <modelVersion>4.0.0</modelVersion>
22
23     <parent>
24         <groupId>org.onap.ccsdk.parent</groupId>
25         <artifactId>spring-boot-26-starter-parent</artifactId>
26         <version>2.5.0-SNAPSHOT</version>
27         <relativePath/>
28     </parent>
29
30     <groupId>org.onap.ccsdk.cds</groupId>
31     <artifactId>cds-aggregator</artifactId>
32     <version>1.5.0-SNAPSHOT</version>
33     <packaging>pom</packaging>
34
35     <name>Aggregator</name>
36     <description>CCSDK Controller Design Studio</description>
37     <url>https://wiki.onap.org</url>
38     <organization>
39         <name>ONAP</name>
40     </organization>
41
42     <modules>
43         <module>ms</module>
44         <module>cds-ui</module>
45         <module>components</module>
46     </modules>
47
48     <properties>
49         <!--Don't set any language to let sonar enable multi-language support-->
50         <sonar.language/>
51         <!--Provide src/main as source path so both src/main/java and src/main/kotlin are scanned-->
52         <sonar.sources>src/main</sonar.sources>
53         <!--Provide src/test as source path for test so both src/test/java and src/test/kotlin are scanned-->
54         <sonar.tests>src/test</sonar.tests>
55         <!--Only include java and kt files to the scan-->
56         <sonar.inclusions>**/*.java,**/*.kt</sonar.inclusions>
57         <!--Specify path to load jacoco XLM report, as Sonar can't load Kotlin coverage from binary report-->
58         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
59         <jacoco.version>0.8.7</jacoco.version>
60
61         <!-- Properties for POM Format -->
62         <format.skipValidate>false</format.skipValidate>
63         <format.skipExecute>true</format.skipExecute>
64
65         <java.version>11</java.version>
66         <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
67         <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
68
69         <!-- docker related properties -->
70         <assembly.id>maven</assembly.id>
71         <docker.verbose>true</docker.verbose>
72         <docker.skip.push>false</docker.skip.push>
73         <name.space>org.onap.ccsdk.cds</name.space>
74         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
75         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
76
77         <ccsdk.sli.version>1.5.2</ccsdk.sli.version>
78         <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
79     </properties>
80
81     <build>
82         <pluginManagement>
83             <plugins>
84                 <!-- Plugin to Format/Validate POM Files -->
85                 <plugin>
86                     <groupId>org.codehaus.mojo</groupId>
87                     <artifactId>tidy-maven-plugin</artifactId>
88                     <version>1.1.0</version>
89                     <configuration>
90                         <lineLength>120</lineLength>
91                     </configuration>
92                     <executions>
93                         <execution>
94                             <id>format-pom</id>
95                             <phase>process-sources</phase>
96                             <goals>
97                                 <goal>pom</goal>
98                             </goals>
99                             <configuration>
100                                 <skip>${format.skipExecute}</skip>
101                             </configuration>
102                         </execution>
103                         <execution>
104                             <id>validate-pom</id>
105                             <phase>validate</phase>
106                             <goals>
107                                 <goal>check</goal>
108                             </goals>
109                             <configuration>
110                                 <skip>${format.skipValidate}</skip>
111                             </configuration>
112                         </execution>
113                     </executions>
114                 </plugin>
115
116                 <!-- Plugin to Format/Validate Kotlin Files -->
117                 <plugin>
118                     <groupId>org.apache.maven.plugins</groupId>
119                     <artifactId>maven-antrun-plugin</artifactId>
120                     <version>${maven-antrun-plugin.version}</version>
121                     <executions>
122                         <execution>
123                             <id>validate-kotlin</id>
124                             <phase>validate</phase>
125                             <configuration>
126                                 <target name="ktlint">
127                                     <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
128                                         <arg value="src/**/*.kt"/>
129                                         <arg value="Scripts/**/*.kt"/>
130                                     </java>
131                                 </target>
132                                 <skip>${format.skipValidate}</skip>
133                             </configuration>
134                             <goals>
135                                 <goal>run</goal>
136                             </goals>
137                         </execution>
138                         <execution>
139                             <id>format-kotlin</id>
140                             <phase>process-sources</phase>
141                             <configuration>
142                                 <target name="ktlint">
143                                     <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
144                                         <arg value="-F"/>
145                                         <arg value="src/**/*.kt"/>
146                                         <arg value="Scripts/**/*.kt"/>
147                                     </java>
148                                 </target>
149                                 <skip>${format.skipExecute}</skip>
150                             </configuration>
151                             <goals>
152                                 <goal>run</goal>
153                             </goals>
154                         </execution>
155                     </executions>
156                     <dependencies>
157                         <dependency>
158                             <groupId>com.pinterest</groupId>
159                             <artifactId>ktlint</artifactId>
160                             <version>0.39.0</version>
161                         </dependency>
162                     </dependencies>
163                 </plugin>
164
165                 <!-- Plugin to identify root path of the project -->
166                 <plugin>
167                     <groupId>org.commonjava.maven.plugins</groupId>
168                     <artifactId>directory-maven-plugin</artifactId>
169                     <version>0.3</version>
170                     <executions>
171                         <execution>
172                             <phase>validate</phase>
173                             <id>directories</id>
174                             <goals>
175                                 <goal>highest-basedir</goal>
176                             </goals>
177                             <configuration>
178                                 <property>baseDirPath</property>
179                             </configuration>
180                         </execution>
181                     </executions>
182                 </plugin>
183
184                 <!-- Plugin to Format/Validate Java Classes -->
185                 <plugin>
186                     <groupId>net.revelc.code.formatter</groupId>
187                     <artifactId>formatter-maven-plugin</artifactId>
188                     <version>2.17.1</version>
189                     <executions>
190                         <execution>
191                             <id>format-java</id>
192                             <goals>
193                                 <goal>format</goal>
194                             </goals>
195                             <phase>process-sources</phase>
196                             <configuration>
197                                 <lineEnding>LF</lineEnding>
198                                 <skip>${format.skipExecute}</skip>
199                                 <sourceDirectory>${project.basedir}</sourceDirectory>
200                                 <configFile>${baseDirPath}/ONAP-Java-Code-Style.xml</configFile>
201                                 <includes>
202                                     <include>src/**/*.java</include>
203                                 </includes>
204                             </configuration>
205                         </execution>
206                         <execution>
207                             <id>validate-java</id>
208                             <goals>
209                                 <goal>validate</goal>
210                             </goals>
211                             <phase>validate</phase>
212                             <configuration>
213                                 <lineEnding>LF</lineEnding>
214                                 <skip>${format.skipValidate}</skip>
215                                 <sourceDirectory>${project.basedir}</sourceDirectory>
216                                 <configFile>${baseDirPath}/ONAP-Java-Code-Style.xml</configFile>
217                                 <includes>
218                                     <include>src/**/*.java</include>
219                                 </includes>
220                             </configuration>
221                         </execution>
222                     </executions>
223                     <dependencies>
224                         <dependency>
225                             <groupId>com.fasterxml.jackson.core</groupId>
226                             <artifactId>jackson-annotations</artifactId>
227                             <version>${jackson-bom.version}</version>
228                         </dependency>
229                     </dependencies>
230                 </plugin>
231
232                 <plugin>
233                     <groupId>org.apache.maven.plugins</groupId>
234                     <artifactId>maven-surefire-plugin</artifactId>
235                     <version>${maven-surefire-plugin.version}</version>
236                     <configuration>
237                         <!-- Sets the VM argument line used when unit tests are run. -->
238                         <argLine>${surefireArgLine}</argLine>
239                         <!-- Excludes integration tests when unit tests are run. -->
240                         <excludes>
241                             <exclude>**/IT*.java</exclude>
242                         </excludes>
243                     </configuration>
244                 </plugin>
245                 <plugin>
246                     <groupId>org.apache.maven.plugins</groupId>
247                     <artifactId>maven-failsafe-plugin</artifactId>
248                     <version>${maven-failsafe-plugin.version}</version>
249                     <executions>
250                         <!-- Ensures that both integration-test and verify goals of the Failsafe Maven plugin are executed. -->
251                         <execution>
252                             <id>integration-tests</id>
253                             <goals>
254                                 <goal>integration-test</goal>
255                                 <goal>verify</goal>
256                             </goals>
257                             <configuration>
258                                 <!-- Sets the VM argument line used when integration tests are run. -->
259                                 <argLine>${failsafeArgLine}</argLine>
260                             </configuration>
261                         </execution>
262                     </executions>
263                 </plugin>
264                 <plugin>
265                     <groupId>org.jetbrains.kotlin</groupId>
266                     <artifactId>kotlin-maven-plugin</artifactId>
267                     <version>${kotlin.maven.version}</version>
268                     <configuration>
269                         <jvmTarget>${java.version}</jvmTarget>
270                     </configuration>
271                 </plugin>
272                 <plugin>
273                     <groupId>org.apache.maven.plugins</groupId>
274                     <artifactId>maven-compiler-plugin</artifactId>
275                     <version>${maven-compiler-plugin.version}</version>
276                     <configuration>
277                         <release>${java.version}</release>
278                         <!--explicitly remove source and target-->
279                         <source combine.self="override"/>
280                         <target combine.self="override"/>
281                     </configuration>
282                 </plugin>
283             </plugins>
284         </pluginManagement>
285         <plugins>
286             <plugin>
287                 <groupId>org.jacoco</groupId>
288                 <artifactId>jacoco-maven-plugin</artifactId>
289                 <version>${jacoco.version}</version>
290             </plugin>
291             <plugin>
292                 <groupId>org.codehaus.mojo</groupId>
293                 <artifactId>tidy-maven-plugin</artifactId>
294             </plugin>
295             <plugin>
296                 <groupId>org.apache.maven.plugins</groupId>
297                 <artifactId>maven-antrun-plugin</artifactId>
298             </plugin>
299             <plugin>
300                 <groupId>org.commonjava.maven.plugins</groupId>
301                 <artifactId>directory-maven-plugin</artifactId>
302             </plugin>
303             <plugin>
304                 <groupId>net.revelc.code.formatter</groupId>
305                 <artifactId>formatter-maven-plugin</artifactId>
306             </plugin>
307             <plugin>
308                 <groupId>org.apache.maven.plugins</groupId>
309                 <artifactId>maven-surefire-plugin</artifactId>
310             </plugin>
311             <plugin>
312                 <groupId>org.apache.maven.plugins</groupId>
313                 <artifactId>maven-failsafe-plugin</artifactId>
314             </plugin>
315             <plugin>
316                 <groupId>org.apache.maven.plugins</groupId>
317                 <artifactId>maven-compiler-plugin</artifactId>
318             </plugin>
319         </plugins>
320     </build>
321
322     <profiles>
323         <profile>
324             <id>blackduck</id>
325             <activation>
326                 <property>
327                     <name>blackduck-scan</name>
328                 </property>
329             </activation>
330             <build>
331                 <plugins>
332                     <plugin>
333                         <groupId>com.blackducksoftware.integration</groupId>
334                         <artifactId>hub-maven-plugin</artifactId>
335                         <version>1.4.0</version>
336                         <inherited>false</inherited>
337                         <configuration>
338                             <hubProjectName>${project.name}</hubProjectName>
339                             <outputDirectory>${project.basedir}</outputDirectory>
340                         </configuration>
341                         <executions>
342                             <execution>
343                                 <id>create-bdio-file</id>
344                                 <phase>package</phase>
345                                 <goals>
346                                     <goal>createHubOutput</goal>
347                                 </goals>
348                             </execution>
349                         </executions>
350                     </plugin>
351                 </plugins>
352             </build>
353         </profile>
354
355         <!-- Profile to format skip validate or execute -->
356         <profile>
357             <id>format</id>
358             <properties>
359                 <format.skipValidate>true</format.skipValidate>
360                 <format.skipExecute>false</format.skipExecute>
361             </properties>
362         </profile>
363         <profile>
364             <id>dependency-list</id>
365             <build>
366                 <plugins>
367                     <plugin>
368                         <groupId>com.github.ferstl</groupId>
369                         <artifactId>depgraph-maven-plugin</artifactId>
370                         <executions>
371                             <execution>
372                                 <phase>validate</phase>
373                                 <inherited>false</inherited>
374                                 <goals>
375                                     <goal>aggregate</goal>
376                                 </goals>
377                             </execution>
378                         </executions>
379                     </plugin>
380                     <plugin>
381                         <groupId>org.codehaus.mojo</groupId>
382                         <artifactId>build-helper-maven-plugin</artifactId>
383                         <executions>
384                             <execution>
385                                 <id>attach-artifacts</id>
386                                 <phase>package</phase>
387                                 <inherited>false</inherited>
388                                 <goals>
389                                     <goal>attach-artifact</goal>
390                                 </goals>
391                                 <configuration>
392                                     <artifacts>
393                                         <artifact>
394                                             <file>${dependency-list.file}</file>
395                                             <type>txt</type>
396                                             <classifier>dependencies</classifier>
397                                         </artifact>
398                                     </artifacts>
399                                 </configuration>
400                             </execution>
401                         </executions>
402                     </plugin>
403                 </plugins>
404             </build>
405         </profile>
406     </profiles>
407 </project>