Fixed Sonar Bug and Code Smell Blockers
[cli.git] / main / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright 2017 Huawei Technologies Co., Ltd.
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16  -->
17
18 <project xmlns="http://maven.apache.org/POM/4.0.0"
19          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
21          http://maven.apache.org/xsd/maven-4.0.0.xsd">
22     <modelVersion>4.0.0</modelVersion>
23
24     <parent>
25         <groupId>org.onap.cli</groupId>
26         <artifactId>cli</artifactId>
27         <version>6.0.1-SNAPSHOT</version>
28     </parent>
29
30     <artifactId>cli-main</artifactId>
31     <name>cli/main</name>
32     <packaging>jar</packaging>
33     <!--Step-1:- SonarCloud migration from SonarQube -->
34     <properties>
35         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36         <sonar.language>java</sonar.language>
37         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
38         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
39         <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
40         <sonar.projectVersion>${project.version}</sonar.projectVersion>
41         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
42     </properties>
43     <dependencies>
44         <dependency>
45             <groupId>org.onap.cli</groupId>
46             <artifactId>cli-sample-yaml-generator</artifactId>
47             <version>${project.version}</version>
48         </dependency>
49         <dependency>
50             <groupId>org.onap.cli</groupId>
51             <artifactId>cli-framework</artifactId>
52             <version>${project.parent.version}</version>
53         </dependency>
54         <dependency>
55             <groupId>jline</groupId>
56             <artifactId>jline</artifactId>
57             <version>2.14.3</version>
58         </dependency>
59             <dependency>
60             <groupId>junit</groupId>
61             <artifactId>junit</artifactId>
62             <version>4.11</version>
63             <scope>test</scope>
64         </dependency>
65         <dependency>
66             <groupId>org.junit.jupiter</groupId>
67             <artifactId>junit-jupiter-api</artifactId>
68             <version>5.8.2</version>
69             <scope>test</scope>
70         </dependency>
71         <dependency>
72             <groupId>org.jmockit</groupId>
73             <artifactId>jmockit</artifactId>
74             <version>${jmockit.version}</version>
75             <scope>test</scope>
76         </dependency>
77         <dependency>
78             <groupId>org.jmockit</groupId>
79             <artifactId>jmockit-coverage</artifactId>
80             <version>1.19</version>
81             <scope>test</scope>
82         </dependency>
83     </dependencies>
84     <build>
85         <plugins>
86             <!--Step-2:- SonarCloud migration from SonarQube -->
87             <plugin>
88                 <groupId>org.jacoco</groupId>
89                 <artifactId>jacoco-maven-plugin</artifactId>
90                 <executions>
91                     <execution>
92                         <id>prepare-agent</id>
93                         <goals>
94                             <goal>prepare-agent</goal>
95                         </goals>
96                     </execution>
97                     <execution>
98                         <id>report</id>
99                         <goals>
100                             <goal>report</goal>
101                         </goals>
102                         <configuration>
103                             <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
104                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
105                         </configuration>
106                     </execution>
107                 </executions>
108             </plugin>
109           <plugin>
110                 <groupId>org.apache.maven.plugins</groupId>
111                 <artifactId>maven-jar-plugin</artifactId>
112                 <configuration>
113                     <archive>
114                         <manifest>
115                             <addClasspath>true</addClasspath>
116                             <mainClass>org.onap.cli.main.OnapCli</mainClass>
117                         </manifest>
118                     </archive>
119                 </configuration>
120             </plugin>
121
122           <plugin>
123             <groupId>org.apache.maven.plugins</groupId>
124             <artifactId>maven-dependency-plugin</artifactId>
125             <version>3.0.0</version>
126             <executions>
127               <execution>
128                 <id>copy-dependencies</id>
129                 <phase>package</phase>
130                 <goals>
131                   <goal>copy-dependencies</goal>
132                 </goals>
133                 <configuration>
134                   <outputDirectory>${project.build.directory}/lib</outputDirectory>
135                   <overWriteReleases>false</overWriteReleases>
136                   <overWriteSnapshots>false</overWriteSnapshots>
137                   <overWriteIfNewer>true</overWriteIfNewer>
138                   <excludeArtifactIds>junit,jmockit</excludeArtifactIds>
139                 </configuration>
140               </execution>
141             </executions>
142           </plugin>
143             <plugin>
144                 <groupId>org.apache.maven.plugins</groupId>
145                 <artifactId>maven-surefire-plugin</artifactId>
146                 <version>2.22.0</version>
147                 <configuration>
148                     <argLine>
149                         -javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar
150                         ${surefireArgLine}
151                     </argLine>
152                 </configuration>
153             </plugin>
154         </plugins>
155   </build>
156
157 </project>