Merge "authorization check for more Kafka operations"
[dmaap/kafka11aaf.git] / pom.xml
1 <!-- ============LICENSE_START======================================================= 
2         org.onap.dmaap ================================================================================ 
3         Copyright Â© 2017 AT&T Intellectual Property. All rights reserved. ================================================================================ 
4         Licensed under the Apache License, Version 2.0 (the "License"); you may not 
5         use this file except in compliance with the License. You may obtain a copy 
6         of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
7         by applicable law or agreed to in writing, software distributed under the 
8         License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
9         OF ANY KIND, either express or implied. See the License for the specific 
10         language governing permissions and limitations under the License. ============LICENSE_END========================================================= 
11         ECOMP is a trademark and service mark of AT&T Intellectual Property. -->
12 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
13         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
14         <modelVersion>4.0.0</modelVersion>
15
16         <parent>
17                 <groupId>org.onap.oparent</groupId>
18                 <artifactId>oparent</artifactId>
19                 <version>2.1.0</version>
20         </parent>
21
22         <groupId>org.onap.dmaap.kafka</groupId>
23         <artifactId>kafka11aaf</artifactId>
24         <version>1.0.3-SNAPSHOT</version>
25         <name>dmaap-kafka</name>
26         <licenses>
27                 <license>
28                         <name>Apache License Version 2.0</name>
29                 </license>
30         </licenses>
31
32         <developers>
33                 <developer>
34                         <name>Sunil Unnava</name>
35                         <email></email>
36                         <organization>ATT</organization>
37                         <organizationUrl>www.att.com</organizationUrl>
38                 </developer>
39         </developers>
40
41         <build>
42                 <!-- Copy files to docker-stage to be included in image -->
43                 <resources>
44                         <resource>
45                                 <targetPath>${basedir}/target/docker-stage</targetPath>
46                                 <directory>${basedir}/src/main/docker</directory>
47                                         <includes>
48                                                 <include>*</include>
49                                         </includes>
50                         </resource>
51                 </resources>
52                 <plugins>
53                         <plugin>
54                                 <groupId>org.apache.maven.plugins</groupId>
55                                 <artifactId>maven-surefire-plugin</artifactId>
56                                 <version>2.12.4</version>
57                                 <configuration>
58                                         <excludes>
59                                                 <!-- exclude until junits updated <exclude>**/DME2*.java</exclude> -->
60                                         </excludes>
61                                         <!-- <skipTests>true</skipTests> -->
62                                 </configuration>
63                         </plugin>
64                         <plugin>
65                                 <groupId>org.codehaus.mojo</groupId>
66                                 <artifactId>cobertura-maven-plugin</artifactId>
67                                 <version>2.7</version>
68                                 <configuration>
69                                         <formats>
70                                                 <format>html</format>
71                                                 <format>xml</format>
72                                         </formats>
73                                 </configuration>
74                         </plugin>
75                         <plugin>
76                                 <groupId>org.apache.maven.plugins</groupId>
77                                 <artifactId>maven-site-plugin</artifactId>
78                                 <version>3.6</version>
79                                 <dependencies>
80                                         <dependency>
81                                                 <groupId>org.apache.maven.wagon</groupId>
82                                                 <artifactId>wagon-webdav-jackrabbit</artifactId>
83                                                 <version>2.10</version>
84                                         </dependency>
85                                 </dependencies>
86                         </plugin>
87
88                         <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> 
89                                 <version>3.0.2</version> </plugin> -->
90
91                         <plugin>
92                                 <groupId>org.apache.maven.plugins</groupId>
93                                 <artifactId>maven-source-plugin</artifactId>
94                                 <version>3.0.0</version>
95                                 <executions>
96                                         <execution>
97                                                 <id>attach-sources</id>
98                                                 <goals>
99                                                         <goal>jar-no-fork</goal>
100                                                 </goals>
101                                         </execution>
102                                 </executions>
103                         </plugin>
104                         <plugin>
105                                 <groupId>org.apache.maven.plugins</groupId>
106                                 <artifactId>maven-release-plugin</artifactId>
107                                 <version>2.5.3</version>
108                                 <configuration>
109                                         <autoVersionSubmodules>true</autoVersionSubmodules>
110                                         <checkModificationExcludes>
111                                         </checkModificationExcludes>
112                                 </configuration>
113                                 <dependencies>
114                                         <dependency>
115                                                 <groupId>org.apache.maven.scm</groupId>
116                                                 <artifactId>maven-scm-provider-gitexe</artifactId>
117                                                 <version>1.9.4</version>
118                                         </dependency>
119                                 </dependencies>
120                         </plugin>
121
122                         <plugin>
123                                 <artifactId>maven-deploy-plugin</artifactId>
124                                 <version>2.8</version>
125                                 <executions>
126                                         <execution>
127                                                 <id>default-deploy</id>
128                                                 <phase>none</phase>
129                                                 <configuration>
130                                                         <skip />
131                                                 </configuration>
132                                         </execution>
133                                 </executions>
134                                 <configuration>
135                                         <skip />
136                                 </configuration>
137                         </plugin>
138                         <plugin>
139                                 <artifactId>maven-dependency-plugin</artifactId>
140                                 <executions>
141                                         <execution>
142                                                 <id>copy</id>
143                                                 <phase>package</phase>
144                                                 <goals>
145                                                         <goal>copy</goal>
146                                                 </goals>
147                                                 <configuration>
148                                                         <outputDirectory>target</outputDirectory>
149                                                         <encoding>UTF-8</encoding>
150                                                         <artifactItems>
151                                                                 <artifactItem>
152                                                                         <groupId>org.onap.dmaap.messagerouter.mirroragent</groupId>
153                                                                         <artifactId>dmaapMMAgent</artifactId>
154                                                                         <version>1.1.2</version>
155                                                                         <destFileName>dmaapMMAgent.jar</destFileName>
156                                                                 </artifactItem>
157                                                         </artifactItems>
158                                                 </configuration>
159                                         </execution>
160                                 </executions>
161                         </plugin>
162                         <plugin>
163                                 <artifactId>maven-resources-plugin</artifactId>
164                                         <version>2.7</version>
165                                         <executions>
166                                                 <execution>
167                                                         <id>copy-jar</id>
168                                                         <phase>install</phase>
169                                                         <goals>
170                                                                 <goal>copy-resources</goal>
171                                                         </goals>
172                                                         <configuration>
173                                                                 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
174                                                                 <resources>
175                                                                         <resource>
176                                                                                 <directory>${basedir}/target</directory>
177                                                                                 <includes>
178                                                                                         <include>dmaapMMAgent.jar</include>
179                                                                                         <include>kafka11aaf-jar-with-dependencies.jar</include>
180                                                                                 </includes>
181                                                                         </resource>
182                                                                 </resources>
183                                                         </configuration>
184                                                 </execution>
185                                   </executions>
186                         </plugin>
187                         <plugin>
188                                 <groupId>org.apache.maven.plugins</groupId>
189                                 <artifactId>maven-assembly-plugin</artifactId>
190                                 <version>2.4.1</version>
191                                 <configuration>
192                                         <!-- get all project dependencies -->
193                                         <descriptorRefs>
194                                                 <descriptorRef>jar-with-dependencies</descriptorRef>
195                                         </descriptorRefs>
196                                         <!-- MainClass in mainfest make a executable jar -->
197                                         <finalName>kafka11aaf</finalName>
198                                 </configuration>
199                                 <executions>
200                                         <execution>
201                                                 <id>make-assembly</id>
202                                                 <!-- bind to the packaging phase -->
203                                                 <phase>package</phase>
204                                                 <goals>
205                                                         <goal>single</goal>
206                                                 </goals>
207                                         </execution>
208                                 </executions>
209                         </plugin>
210
211                 </plugins>
212         </build>
213
214         <properties>
215                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
216                 <timestamp>${maven.build.timestamp}</timestamp>
217                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
218                 <sitePath>/content/sites/site/org/onap/dmaap/kafka0111/${project.artifactId}/${project.version}</sitePath>
219                 <skip.docker.build>true</skip.docker.build>
220                 <skip.docker.push>true</skip.docker.push>
221                 <nexusproxy>https://nexus.onap.org</nexusproxy>
222                 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
223                 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
224         </properties>
225
226         <!-- Distribution management -->
227         <distributionManagement>
228                 <site>
229                         <id>ecomp-site</id>
230                         <url>dav:${nexusproxy}${sitePath}</url>
231                 </site>
232         </distributionManagement>
233
234         <dependencies>
235                 <dependency>
236                         <groupId>org.onap.aaf.authz</groupId>
237                         <artifactId>aaf-cadi-aaf</artifactId>
238                         <version>2.1.2</version>
239                 </dependency>
240                 <dependency>
241                         <groupId>org.slf4j</groupId>
242                         <artifactId>slf4j-api</artifactId>
243                         <version>1.7.2</version>
244                 </dependency>
245                 <dependency>
246                         <groupId>org.slf4j</groupId>
247                         <artifactId>slf4j-simple</artifactId>
248                         <version>1.7.2</version>
249                         <scope>runtime</scope>
250                 </dependency>
251                 <dependency>
252                         <groupId>org.apache.kafka</groupId>
253                         <artifactId>kafka_2.11</artifactId>
254                         <version>2.3.0</version>
255                         <scope>provided</scope>
256                 </dependency>
257
258                 <dependency>
259                         <groupId>org.powermock</groupId>
260                         <artifactId>powermock-api-mockito</artifactId>
261                         <version>1.6.4</version>
262                         <scope>test</scope>
263                 </dependency>
264
265                 <dependency>
266                         <groupId>org.powermock</groupId>
267                         <artifactId>powermock-module-junit4</artifactId>
268                         <version>1.6.4</version>
269                         <scope>test</scope>
270                 </dependency>
271
272                 <dependency>
273                         <groupId>org.powermock</groupId>
274                         <artifactId>powermock-module-junit4-rule</artifactId>
275                         <version>1.6.4</version>
276                         <scope>test</scope>
277                 </dependency>
278                 <dependency>
279                         <groupId>org.mockito</groupId>
280                         <artifactId>mockito-core</artifactId>
281                         <version>1.10.19</version>
282                         <scope>test</scope>
283                 </dependency>
284         </dependencies>
285
286         <profiles>
287                 <profile>
288                         <id>docker</id>
289                         <properties>
290                                 <skip.docker.build>false</skip.docker.build>
291                                 <skip.docker.tag>false</skip.docker.tag>
292                                 <skip.docker.push>false</skip.docker.push>
293                         </properties>
294                         <build>
295                                 <plugins>
296                                         <plugin>
297                                                 <groupId>org.codehaus.groovy.maven</groupId>
298                                                 <artifactId>gmaven-plugin</artifactId>
299                                                 <executions>
300                                                         <execution>
301                                                                 <phase>validate</phase>
302                                                                 <goals>
303                                                                         <goal>execute</goal>
304                                                                 </goals>
305                                                                 <configuration>
306                                                                         <properties>
307                                                                                 <ver>${project.version}</ver>
308                                                                                 <timestamp>${maven.build.timestamp}</timestamp>
309                                                                         </properties>
310                                                                         <source>
311                                                                                 println project.properties['ver'];
312                                                                                 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
313                                                                                 project.properties['dockertag1']=project.properties['ver'] +
314                                                                                 "-latest";
315                                                                                 project.properties['dockertag2']=project.properties['ver'] +
316                                                                                 "-" + project.properties['timestamp'];
317                                                                                 } else {
318                                                                                 project.properties['dockertag1']=project.properties['ver'] +
319                                                                                 "-STAGING-latest";
320                                                                                 project.properties['dockertag2']=project.properties['ver'] +
321                                                                                 "-STAGING-" + project.properties['timestamp'];
322                                                                                 }
323                                                                                 println 'docker tag 1: ' + project.properties['dockertag1'];
324                                                                                 println 'docker tag 2: ' + project.properties['dockertag2'];
325                                                                         </source>
326                                                                 </configuration>
327                                                         </execution>
328                                                 </executions>
329                                         </plugin>
330                                         <!-- build docker image -->
331                                         <plugin>
332                                                 <groupId>io.fabric8</groupId>
333                                                 <artifactId>docker-maven-plugin</artifactId>
334                                                 <version>0.28.0</version>
335                                                 <configuration>
336                                                         <verbose>${docker.verbose}</verbose>
337                                                         <apiVersion>${docker.apiVersion}</apiVersion>
338                                                         <pullRegistry>${docker.pull.registry}</pullRegistry>
339                                                         <pushRegistry>${docker.push.registry}</pushRegistry>
340                                                         <images>
341                                                                 <image>
342                                                                         <name>onap/dmaap/kafka111</name>
343                                                                         <build>
344                                                                                 <cleanup>try</cleanup>
345                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
346                                                                                 <dockerFile>Dockerfile</dockerFile>
347                                                                                 <tags>
348                                                                                         <tag>${dockertag1}</tag>
349                                                                                         <tag>${dockertag2}</tag>
350                                                                                 </tags>
351                                                                         </build>
352                                                                 </image>
353                                                         </images>
354                                                 </configuration>
355                                                 <executions>
356                                                         <execution>
357                                                                 <id>generate-images</id>
358                                                                 <phase>install</phase>
359                                                                 <goals>
360                                                                         <goal>build</goal>
361                                                                 </goals>
362                                                         </execution>
363                                                         <execution>
364                                                                 <id>push-images</id>
365                                                                 <phase>deploy</phase>
366                                                                 <goals>
367                                                                         <goal>push</goal>
368                                                                 </goals>
369                                                         </execution>
370                                               </executions>
371                                         </plugin>
372                                 </plugins>
373                         </build>
374                 </profile>
375
376         </profiles>
377
378 </project>