Upgraded grpc-netty for vulnerabilities and removed boilerplate code
[cli.git] / grpc / pom.xml
1 <!--
2     Copyright 2018 Huawei Technologies Co., Ltd.
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8         http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15  -->
16 <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">
17   <modelVersion>4.0.0</modelVersion>
18     <parent>
19         <groupId>org.onap.cli</groupId>
20         <artifactId>cli</artifactId>
21         <version>5.0.3-SNAPSHOT</version>
22     </parent>
23   <version>5.0.3-SNAPSHOT</version>
24   <artifactId>oclip-grpc</artifactId>
25   <packaging>pom</packaging>
26   <name>oclip/grpc</name>
27   <modules>
28     <module>grpc-stub</module>
29     <module>grpc-server</module>
30     <module>grpc-client</module>
31   </modules>
32   <properties>
33     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34     <grpc.version>1.29.0</grpc.version>
35   </properties>
36   <dependencies>
37 <!-- netty-codec-http2 excluded due to Security Issues:- CVE-2019-9512,CVE-2019-9514,CVE-2019-9515,CVE-2019-9518,CVE-2019-16869
38  and added invulnerable netty-codec-http2 4.1.46.Final -->
39     <dependency>
40       <groupId>io.grpc</groupId>
41       <artifactId>grpc-netty</artifactId>
42       <version>${grpc.version}</version>
43     </dependency>
44       <dependency>
45       <groupId>io.grpc</groupId>
46       <artifactId>grpc-protobuf</artifactId>
47       <version>${grpc.version}</version>
48     </dependency>
49     <dependency>
50       <groupId>io.grpc</groupId>
51       <artifactId>grpc-stub</artifactId>
52       <version>${grpc.version}</version>
53     </dependency>
54     <dependency>
55       <groupId>io.grpc</groupId>
56       <artifactId>grpc-testing</artifactId>
57       <version>${grpc.version}</version>
58       <scope>test</scope>
59     </dependency>
60     <dependency>
61       <groupId>com.google.api.grpc</groupId>
62       <artifactId>proto-google-common-protos</artifactId>
63       <version>0.1.9</version>
64     </dependency>
65   </dependencies>
66   <build>
67     <extensions>
68       <extension>
69         <groupId>kr.motd.maven</groupId>
70         <artifactId>os-maven-plugin</artifactId>
71         <version>1.5.0.Final</version>
72       </extension>
73     </extensions>
74     <plugins>
75       <plugin>
76         <groupId>org.xolstice.maven.plugins</groupId>
77         <artifactId>protobuf-maven-plugin</artifactId>
78         <version>0.5.0</version>
79         <configuration>
80           <protocArtifact>com.google.protobuf:protoc:3.4.0:exe:${os.detected.classifier}</protocArtifact>
81           <pluginId>grpc-java</pluginId>
82           <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
83         </configuration>
84         <executions>
85           <execution>
86             <goals>
87               <goal>compile</goal>
88               <goal>compile-custom</goal>
89             </goals>
90           </execution>
91         </executions>
92       </plugin>
93     </plugins>
94      <pluginManagement>
95             <plugins>
96                 <plugin>
97                   <groupId>org.apache.maven.plugins</groupId>
98                   <artifactId>maven-dependency-plugin</artifactId>
99                   <executions>
100                     <execution>
101                       <id>copy-artifact</id>
102                       <phase>package</phase>
103                       <goals>
104                         <goal>copy</goal>
105                         <goal>copy-dependencies</goal>
106                       </goals>
107                       <configuration>
108                         <artifactItems>
109                             <artifactItem>
110                               <groupId>${project.groupId}</groupId>
111                               <artifactId>${project.artifactId}</artifactId>
112                               <version>${project.version}</version>
113                               <type>${project.packaging}</type>
114                             </artifactItem>
115                         </artifactItems>
116                         <outputDirectory>${project.build.directory}/lib</outputDirectory>
117                           <overWriteReleases>false</overWriteReleases>
118                           <overWriteSnapshots>false</overWriteSnapshots>
119                           <overWriteIfNewer>true</overWriteIfNewer>
120                           <excludeArtifactIds>junit,jmockit</excludeArtifactIds>
121                       </configuration>
122                     </execution>
123                   </executions>
124                 </plugin>
125                 <plugin>
126                   <groupId>org.apache.maven.plugins</groupId>
127                   <artifactId>maven-dependency-plugin</artifactId>
128                   <executions>
129                     <execution>
130                       <id>copy-artifact</id>
131                       <phase>package</phase>
132                       <goals>
133                         <goal>copy</goal>
134                       </goals>
135                       <configuration>
136                         <artifactItems>
137                             <artifactItem>
138                               <groupId>${project.groupId}</groupId>
139                               <artifactId>${project.artifactId}</artifactId>
140                               <version>${project.version}</version>
141                               <type>${project.packaging}</type>
142                             </artifactItem>
143                         </artifactItems>
144                         <outputDirectory>../../grpc/target/lib</outputDirectory>
145                       </configuration>
146                     </execution>
147                   </executions>
148                 </plugin>
149             </plugins>
150         </pluginManagement>
151   </build>
152 </project>