84a508f8235a1a6fe1451a1cbf42e9e930599b63
[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.8.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        <exclusions>
44         <exclusion>
45            <groupId>io.netty</groupId>
46             <artifactId>netty-codec-http2</artifactId>
47             </exclusion>
48       </exclusions>
49     </dependency>
50
51     <dependency>
52         <groupId>io.netty</groupId>
53         <artifactId>netty-codec-http2</artifactId>
54         <version>4.1.46.Final</version>
55         <exclusions>
56             <exclusion>
57                 <groupId>io.netty</groupId>
58                 <artifactId>netty-codec-http</artifactId>
59             </exclusion>
60             <exclusion>
61                 <groupId>io.netty</groupId>
62                 <artifactId>netty-handler</artifactId>
63             </exclusion>
64         </exclusions>
65     </dependency>
66       <dependency>
67           <groupId>io.netty</groupId>
68           <artifactId>netty-codec-http</artifactId>
69           <version>4.1.48.Final</version>
70       </dependency>
71       <dependency>
72           <groupId>io.netty</groupId>
73           <artifactId>netty-handler</artifactId>
74           <version>4.1.19.Final</version>
75       </dependency>
76
77       <dependency>
78       <groupId>io.grpc</groupId>
79       <artifactId>grpc-protobuf</artifactId>
80       <version>${grpc.version}</version>
81     </dependency>
82     <dependency>
83       <groupId>io.grpc</groupId>
84       <artifactId>grpc-stub</artifactId>
85       <version>${grpc.version}</version>
86     </dependency>
87     <dependency>
88       <groupId>io.grpc</groupId>
89       <artifactId>grpc-testing</artifactId>
90       <version>${grpc.version}</version>
91       <scope>test</scope>
92     </dependency>
93     <dependency>
94       <groupId>com.google.api.grpc</groupId>
95       <artifactId>proto-google-common-protos</artifactId>
96       <version>0.1.9</version>
97     </dependency>
98   </dependencies>
99   <build>
100     <extensions>
101       <extension>
102         <groupId>kr.motd.maven</groupId>
103         <artifactId>os-maven-plugin</artifactId>
104         <version>1.5.0.Final</version>
105       </extension>
106     </extensions>
107     <plugins>
108       <plugin>
109         <groupId>org.xolstice.maven.plugins</groupId>
110         <artifactId>protobuf-maven-plugin</artifactId>
111         <version>0.5.0</version>
112         <configuration>
113           <protocArtifact>com.google.protobuf:protoc:3.4.0:exe:${os.detected.classifier}</protocArtifact>
114           <pluginId>grpc-java</pluginId>
115           <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
116         </configuration>
117         <executions>
118           <execution>
119             <goals>
120               <goal>compile</goal>
121               <goal>compile-custom</goal>
122             </goals>
123           </execution>
124         </executions>
125       </plugin>
126     </plugins>
127      <pluginManagement>
128             <plugins>
129                 <plugin>
130                   <groupId>org.apache.maven.plugins</groupId>
131                   <artifactId>maven-dependency-plugin</artifactId>
132                   <executions>
133                     <execution>
134                       <id>copy-artifact</id>
135                       <phase>package</phase>
136                       <goals>
137                         <goal>copy</goal>
138                         <goal>copy-dependencies</goal>
139                       </goals>
140                       <configuration>
141                         <artifactItems>
142                             <artifactItem>
143                               <groupId>${project.groupId}</groupId>
144                               <artifactId>${project.artifactId}</artifactId>
145                               <version>${project.version}</version>
146                               <type>${project.packaging}</type>
147                             </artifactItem>
148                         </artifactItems>
149                         <outputDirectory>${project.build.directory}/lib</outputDirectory>
150                           <overWriteReleases>false</overWriteReleases>
151                           <overWriteSnapshots>false</overWriteSnapshots>
152                           <overWriteIfNewer>true</overWriteIfNewer>
153                           <excludeArtifactIds>junit,jmockit</excludeArtifactIds>
154                       </configuration>
155                     </execution>
156                   </executions>
157                 </plugin>
158                 <plugin>
159                   <groupId>org.apache.maven.plugins</groupId>
160                   <artifactId>maven-dependency-plugin</artifactId>
161                   <executions>
162                     <execution>
163                       <id>copy-artifact</id>
164                       <phase>package</phase>
165                       <goals>
166                         <goal>copy</goal>
167                       </goals>
168                       <configuration>
169                         <artifactItems>
170                             <artifactItem>
171                               <groupId>${project.groupId}</groupId>
172                               <artifactId>${project.artifactId}</artifactId>
173                               <version>${project.version}</version>
174                               <type>${project.packaging}</type>
175                             </artifactItem>
176                         </artifactItems>
177                         <outputDirectory>../../grpc/target/lib</outputDirectory>
178                       </configuration>
179                     </execution>
180                   </executions>
181                 </plugin>
182             </plugins>
183         </pluginManagement>
184   </build>
185 </project>