Merge "Improving CMD-exec err msgs/handling."
[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.0.0-SNAPSHOT</version>
27         <relativePath/>
28     </parent>
29
30     <groupId>org.onap.ccsdk.cds</groupId>
31     <artifactId>parent</artifactId>
32     <version>1.0.0-SNAPSHOT</version>
33     <packaging>pom</packaging>
34
35     <name>CDS Parent</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     </properties>
66
67     <build>
68         <plugins>
69             <plugin>
70                 <groupId>org.jacoco</groupId>
71                 <artifactId>jacoco-maven-plugin</artifactId>
72                 <version>${jacoco.version}</version>
73             </plugin>
74
75             <!-- Plugin to Format/Validate POM Files -->
76             <plugin>
77                 <groupId>org.codehaus.mojo</groupId>
78                 <artifactId>tidy-maven-plugin</artifactId>
79                 <version>1.1.0</version>
80                 <executions>
81                     <execution>
82                         <id>format-pom</id>
83                         <phase>process-sources</phase>
84                         <goals>
85                             <goal>pom</goal>
86                         </goals>
87                         <configuration>
88                             <skip>${format.skipExecute}</skip>
89                         </configuration>
90                     </execution>
91                     <execution>
92                         <id>validate-pom</id>
93                         <phase>validate</phase>
94                         <goals>
95                             <goal>check</goal>
96                         </goals>
97                         <configuration>
98                             <skip>${format.skipValidate}</skip>
99                         </configuration>
100                     </execution>
101                 </executions>
102             </plugin>
103
104             <!-- Plugin to Format/Validate Kotlin Files -->
105             <plugin>
106                 <groupId>org.apache.maven.plugins</groupId>
107                 <artifactId>maven-antrun-plugin</artifactId>
108                 <version>1.7</version>
109                 <executions>
110                     <execution>
111                         <id>validate-kotlin</id>
112                         <phase>validate</phase>
113                         <configuration>
114                             <target name="ktlint">
115                                 <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
116                                     <arg value="src/**/*.kt"/>
117                                 </java>
118                             </target>
119                             <skip>${format.skipValidate}</skip>
120                         </configuration>
121                         <goals>
122                             <goal>run</goal>
123                         </goals>
124                     </execution>
125                     <execution>
126                         <!-- Built-in formatter So that you wouldn't have to fix all style violations by hand.-->
127                         <id>format-kotlin</id>
128                         <phase>process-sources</phase>
129                         <configuration>
130                             <target name="ktlint">
131                                 <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
132                                     <arg value="-F"/>
133                                     <arg value="src/**/*.kt"/>
134                                 </java>
135                             </target>
136                             <skip>${format.skipExecute}</skip>
137                         </configuration>
138                         <goals>
139                             <goal>run</goal>
140                         </goals>
141                     </execution>
142                 </executions>
143                 <dependencies>
144                     <dependency>
145                         <groupId>com.pinterest</groupId>
146                         <artifactId>ktlint</artifactId>
147                         <version>0.35.0</version>
148                     </dependency>
149                 </dependencies>
150             </plugin>
151         </plugins>
152     </build>
153
154     <profiles>
155         <profile>
156             <id>blackduck</id>
157             <activation>
158                 <property>
159                     <name>blackduck-scan</name>
160                 </property>
161             </activation>
162             <build>
163                 <plugins>
164                     <plugin>
165                         <groupId>com.blackducksoftware.integration</groupId>
166                         <artifactId>hub-maven-plugin</artifactId>
167                         <version>1.4.0</version>
168                         <inherited>false</inherited>
169                         <configuration>
170                             <hubProjectName>${project.name}</hubProjectName>
171                             <outputDirectory>${project.basedir}</outputDirectory>
172                         </configuration>
173                         <executions>
174                             <execution>
175                                 <id>create-bdio-file</id>
176                                 <phase>package</phase>
177                                 <goals>
178                                     <goal>createHubOutput</goal>
179                                 </goals>
180                             </execution>
181                         </executions>
182                     </plugin>
183                 </plugins>
184             </build>
185         </profile>
186
187         <!-- Profile to format skip validate or execute -->
188         <profile>
189             <id>format</id>
190             <properties>
191                 <format.skipValidate>true</format.skipValidate>
192                 <format.skipExecute>false</format.skipExecute>
193             </properties>
194         </profile>
195         <profile>
196             <id>dependency-list</id>
197             <build>
198                 <plugins>
199                     <plugin>
200                         <groupId>com.github.ferstl</groupId>
201                         <artifactId>depgraph-maven-plugin</artifactId>
202                         <executions>
203                             <execution>
204                                 <phase>validate</phase>
205                                 <inherited>false</inherited>
206                                 <goals>
207                                     <goal>aggregate</goal>
208                                 </goals>
209                             </execution>
210                         </executions>
211                     </plugin>
212                     <plugin>
213                         <groupId>org.codehaus.mojo</groupId>
214                         <artifactId>build-helper-maven-plugin</artifactId>
215                         <executions>
216                             <execution>
217                                 <id>attach-artifacts</id>
218                                 <phase>package</phase>
219                                 <inherited>false</inherited>
220                                 <goals>
221                                     <goal>attach-artifact</goal>
222                                 </goals>
223                                 <configuration>
224                                     <artifacts>
225                                         <artifact>
226                                             <file>${dependency-list.file}</file>
227                                             <type>txt</type>
228                                             <classifier>dependencies</classifier>
229                                         </artifact>
230                                     </artifacts>
231                                 </configuration>
232                             </execution>
233                         </executions>
234                     </plugin>
235                 </plugins>
236             </build>
237         </profile>
238     </profiles>
239 </project>