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