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