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