Merge "Replace the existing mapping table with MatTable"
[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-starter-parent</artifactId>
26         <version>2.1.0-SNAPSHOT</version>
27         <relativePath/>
28     </parent>
29
30     <groupId>org.onap.ccsdk.cds</groupId>
31     <artifactId>cds-aggregator</artifactId>
32     <version>1.1.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
59         </sonar.coverage.jacoco.xmlReportPaths>
60         <jacoco.version>0.8.3</jacoco.version>
61
62         <!-- Properties for POM Format -->
63         <format.skipValidate>false</format.skipValidate>
64         <format.skipExecute>true</format.skipExecute>
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         <docker.verbose>true</docker.verbose>
71         <docker.skip.push>false</docker.skip.push>
72         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
73         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
74
75         <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
76     </properties>
77
78     <build>
79         <pluginManagement>
80             <plugins>
81                 <!-- Plugin to Format/Validate POM Files -->
82                 <plugin>
83                     <groupId>org.codehaus.mojo</groupId>
84                     <artifactId>tidy-maven-plugin</artifactId>
85                     <version>1.1.0</version>
86                     <executions>
87                         <execution>
88                             <id>format-pom</id>
89                             <phase>process-sources</phase>
90                             <goals>
91                                 <goal>pom</goal>
92                             </goals>
93                             <configuration>
94                                 <skip>${format.skipExecute}</skip>
95                             </configuration>
96                         </execution>
97                         <execution>
98                             <id>validate-pom</id>
99                             <phase>validate</phase>
100                             <goals>
101                                 <goal>check</goal>
102                             </goals>
103                             <configuration>
104                                 <skip>${format.skipValidate}</skip>
105                             </configuration>
106                         </execution>
107                     </executions>
108                 </plugin>
109
110                 <!-- Plugin to Format/Validate Kotlin Files -->
111                 <plugin>
112                     <groupId>org.apache.maven.plugins</groupId>
113                     <artifactId>maven-antrun-plugin</artifactId>
114                     <version>${maven-antrun-plugin.version}</version>
115                     <executions>
116                         <execution>
117                             <id>validate-kotlin</id>
118                             <phase>validate</phase>
119                             <configuration>
120                                 <target name="ktlint">
121                                     <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
122                                         <arg value="src/**/*.kt"/>
123                                         <arg value="Scripts/**/*.kt"/>
124                                     </java>
125                                 </target>
126                                 <skip>${format.skipValidate}</skip>
127                             </configuration>
128                             <goals>
129                                 <goal>run</goal>
130                             </goals>
131                         </execution>
132                         <execution>
133                             <id>format-kotlin</id>
134                             <phase>process-sources</phase>
135                             <configuration>
136                                 <target name="ktlint">
137                                     <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
138                                         <arg value="-F"/>
139                                         <arg value="src/**/*.kt"/>
140                                         <arg value="Scripts/**/*.kt"/>
141                                     </java>
142                                 </target>
143                                 <skip>${format.skipExecute}</skip>
144                             </configuration>
145                             <goals>
146                                 <goal>run</goal>
147                             </goals>
148                         </execution>
149                     </executions>
150                     <dependencies>
151                         <dependency>
152                             <groupId>com.pinterest</groupId>
153                             <artifactId>ktlint</artifactId>
154                             <version>0.39.0</version>
155                         </dependency>
156                     </dependencies>
157                 </plugin>
158
159                 <!-- Plugin to identify root path of the project -->
160                 <plugin>
161                     <groupId>org.commonjava.maven.plugins</groupId>
162                     <artifactId>directory-maven-plugin</artifactId>
163                     <version>0.3</version>
164                     <executions>
165                         <execution>
166                             <phase>validate</phase>
167                             <id>directories</id>
168                             <goals>
169                                 <goal>highest-basedir</goal>
170                             </goals>
171                             <configuration>
172                                 <property>baseDirPath</property>
173                             </configuration>
174                         </execution>
175                     </executions>
176                 </plugin>
177
178                 <!-- Plugin to Format/Validate Java Classes -->
179                 <plugin>
180                     <groupId>net.revelc.code.formatter</groupId>
181                     <artifactId>formatter-maven-plugin</artifactId>
182                     <version>2.12.0</version>
183                     <executions>
184                         <execution>
185                             <id>format-java</id>
186                             <goals>
187                                 <goal>format</goal>
188                             </goals>
189                             <phase>process-sources</phase>
190                             <configuration>
191                                 <lineEnding>LF</lineEnding>
192                                 <skip>${format.skipExecute}</skip>
193                                 <sourceDirectory>${project.basedir}</sourceDirectory>
194                                 <configFile>${baseDirPath}/ONAP-Java-Code-Style.xml</configFile>
195                                 <includes>
196                                     <include>src/**/*.java</include>
197                                 </includes>
198                             </configuration>
199                         </execution>
200                         <execution>
201                             <id>validate-java</id>
202                             <goals>
203                                 <goal>validate</goal>
204                             </goals>
205                             <phase>validate</phase>
206                             <configuration>
207                                 <lineEnding>LF</lineEnding>
208                                 <skip>${format.skipValidate}</skip>
209                                 <sourceDirectory>${project.basedir}</sourceDirectory>
210                                 <configFile>${baseDirPath}/ONAP-Java-Code-Style.xml</configFile>
211                                 <includes>
212                                     <include>src/**/*.java</include>
213                                 </includes>
214                             </configuration>
215                         </execution>
216                     </executions>
217                     <dependencies>
218                         <dependency>
219                             <groupId>com.fasterxml.jackson.core</groupId>
220                             <artifactId>jackson-annotations</artifactId>
221                             <version>${jackson-bom.version}</version>
222                         </dependency>
223                     </dependencies>
224                 </plugin>
225
226                 <plugin>
227                     <groupId>org.apache.maven.plugins</groupId>
228                     <artifactId>maven-surefire-plugin</artifactId>
229                     <version>${maven-surefire-plugin.version}</version>
230                     <configuration>
231                         <!-- Sets the VM argument line used when unit tests are run. -->
232                         <argLine>${surefireArgLine}</argLine>
233                         <!-- Excludes integration tests when unit tests are run. -->
234                         <excludes>
235                             <exclude>**/IT*.java</exclude>
236                         </excludes>
237                     </configuration>
238                 </plugin>
239                 <plugin>
240                     <groupId>org.apache.maven.plugins</groupId>
241                     <artifactId>maven-failsafe-plugin</artifactId>
242                     <version>${maven-failsafe-plugin.version}</version>
243                     <executions>
244                         <!-- Ensures that both integration-test and verify goals of the Failsafe Maven plugin are executed. -->
245                         <execution>
246                             <id>integration-tests</id>
247                             <goals>
248                                 <goal>integration-test</goal>
249                                 <goal>verify</goal>
250                             </goals>
251                             <configuration>
252                                 <!-- Sets the VM argument line used when integration tests are run. -->
253                                 <argLine>${failsafeArgLine}</argLine>
254                             </configuration>
255                         </execution>
256                     </executions>
257                 </plugin>
258                 <plugin>
259                     <groupId>org.jetbrains.kotlin</groupId>
260                     <artifactId>kotlin-maven-plugin</artifactId>
261                     <version>${kotlin.maven.version}</version>
262                     <configuration>
263                         <jvmTarget>${java.version}</jvmTarget>
264                     </configuration>
265                 </plugin>
266                 <plugin>
267                     <groupId>org.apache.maven.plugins</groupId>
268                     <artifactId>maven-compiler-plugin</artifactId>
269                     <version>${maven-compiler-plugin.version}</version>
270                     <configuration>
271                         <release>${java.version}</release>
272                         <!--explicitly remove source and target-->
273                         <source combine.self="override"/>
274                         <target combine.self="override"/>
275                     </configuration>
276                 </plugin>
277             </plugins>
278         </pluginManagement>
279         <plugins>
280             <plugin>
281                 <groupId>org.jacoco</groupId>
282                 <artifactId>jacoco-maven-plugin</artifactId>
283                 <version>${jacoco.version}</version>
284             </plugin>
285             <plugin>
286                 <groupId>org.codehaus.mojo</groupId>
287                 <artifactId>tidy-maven-plugin</artifactId>
288             </plugin>
289             <plugin>
290                 <groupId>org.apache.maven.plugins</groupId>
291                 <artifactId>maven-antrun-plugin</artifactId>
292             </plugin>
293             <plugin>
294                 <groupId>org.commonjava.maven.plugins</groupId>
295                 <artifactId>directory-maven-plugin</artifactId>
296             </plugin>
297             <plugin>
298                 <groupId>net.revelc.code.formatter</groupId>
299                 <artifactId>formatter-maven-plugin</artifactId>
300             </plugin>
301             <plugin>
302                 <groupId>org.apache.maven.plugins</groupId>
303                 <artifactId>maven-surefire-plugin</artifactId>
304             </plugin>
305             <plugin>
306                 <groupId>org.apache.maven.plugins</groupId>
307                 <artifactId>maven-failsafe-plugin</artifactId>
308             </plugin>
309             <plugin>
310                 <groupId>org.apache.maven.plugins</groupId>
311                 <artifactId>maven-compiler-plugin</artifactId>
312             </plugin>
313         </plugins>
314     </build>
315
316     <profiles>
317         <profile>
318             <id>blackduck</id>
319             <activation>
320                 <property>
321                     <name>blackduck-scan</name>
322                 </property>
323             </activation>
324             <build>
325                 <plugins>
326                     <plugin>
327                         <groupId>com.blackducksoftware.integration</groupId>
328                         <artifactId>hub-maven-plugin</artifactId>
329                         <version>1.4.0</version>
330                         <inherited>false</inherited>
331                         <configuration>
332                             <hubProjectName>${project.name}</hubProjectName>
333                             <outputDirectory>${project.basedir}</outputDirectory>
334                         </configuration>
335                         <executions>
336                             <execution>
337                                 <id>create-bdio-file</id>
338                                 <phase>package</phase>
339                                 <goals>
340                                     <goal>createHubOutput</goal>
341                                 </goals>
342                             </execution>
343                         </executions>
344                     </plugin>
345                 </plugins>
346             </build>
347         </profile>
348
349         <!-- Profile to format skip validate or execute -->
350         <profile>
351             <id>format</id>
352             <properties>
353                 <format.skipValidate>true</format.skipValidate>
354                 <format.skipExecute>false</format.skipExecute>
355             </properties>
356         </profile>
357         <profile>
358             <id>dependency-list</id>
359             <build>
360                 <plugins>
361                     <plugin>
362                         <groupId>com.github.ferstl</groupId>
363                         <artifactId>depgraph-maven-plugin</artifactId>
364                         <executions>
365                             <execution>
366                                 <phase>validate</phase>
367                                 <inherited>false</inherited>
368                                 <goals>
369                                     <goal>aggregate</goal>
370                                 </goals>
371                             </execution>
372                         </executions>
373                     </plugin>
374                     <plugin>
375                         <groupId>org.codehaus.mojo</groupId>
376                         <artifactId>build-helper-maven-plugin</artifactId>
377                         <executions>
378                             <execution>
379                                 <id>attach-artifacts</id>
380                                 <phase>package</phase>
381                                 <inherited>false</inherited>
382                                 <goals>
383                                     <goal>attach-artifact</goal>
384                                 </goals>
385                                 <configuration>
386                                     <artifacts>
387                                         <artifact>
388                                             <file>${dependency-list.file}</file>
389                                             <type>txt</type>
390                                             <classifier>dependencies</classifier>
391                                         </artifact>
392                                     </artifacts>
393                                 </configuration>
394                             </execution>
395                         </executions>
396                     </plugin>
397                 </plugins>
398             </build>
399         </profile>
400     </profiles>
401 </project>