a8e16d582f84f2ff2ae3d2274c1af1f7fb17aebb
[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>1.2.1</version>
20         </parent>
21
22         <groupId>org.onap.dmaap.kafka</groupId>
23         <artifactId>kafka11aaf</artifactId>
24         <version>0.0.4-SNAPSHOT</version>
25         <name>dmaap-kafka11aaf</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                 <plugins>
43                         <plugin>
44                                 <groupId>org.apache.maven.plugins</groupId>
45                                 <artifactId>maven-surefire-plugin</artifactId>
46                                 <version>2.12.4</version>
47                                 <configuration>
48                                         <excludes>
49                                                 <!-- exclude until junits updated <exclude>**/DME2*.java</exclude> -->
50                                         </excludes>
51                                         <!-- <skipTests>true</skipTests> -->
52                                 </configuration>
53                         </plugin>
54                         <plugin>
55                                 <groupId>org.codehaus.mojo</groupId>
56                                 <artifactId>cobertura-maven-plugin</artifactId>
57                                 <version>2.7</version>
58                                 <configuration>
59                                         <formats>
60                                                 <format>html</format>
61                                                 <format>xml</format>
62                                         </formats>
63                                 </configuration>
64                         </plugin>
65                         <plugin>
66                                 <groupId>org.apache.maven.plugins</groupId>
67                                 <artifactId>maven-site-plugin</artifactId>
68                                 <version>3.6</version>
69                                 <dependencies>
70                                         <dependency>
71                                                 <groupId>org.apache.maven.wagon</groupId>
72                                                 <artifactId>wagon-webdav-jackrabbit</artifactId>
73                                                 <version>2.10</version>
74                                         </dependency>
75                                 </dependencies>
76                         </plugin>
77
78                         <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> 
79                                 <version>3.0.2</version> </plugin> -->
80
81                         <plugin>
82                                 <groupId>org.apache.maven.plugins</groupId>
83                                 <artifactId>maven-source-plugin</artifactId>
84                                 <version>3.0.0</version>
85                                 <executions>
86                                         <execution>
87                                                 <id>attach-sources</id>
88                                                 <goals>
89                                                         <goal>jar-no-fork</goal>
90                                                 </goals>
91                                         </execution>
92                                 </executions>
93                         </plugin>
94                         <plugin>
95                                 <groupId>org.apache.maven.plugins</groupId>
96                                 <artifactId>maven-release-plugin</artifactId>
97                                 <version>2.5.3</version>
98                                 <configuration>
99                                         <autoVersionSubmodules>true</autoVersionSubmodules>
100                                         <checkModificationExcludes>
101                                         </checkModificationExcludes>
102                                 </configuration>
103                                 <dependencies>
104                                         <dependency>
105                                                 <groupId>org.apache.maven.scm</groupId>
106                                                 <artifactId>maven-scm-provider-gitexe</artifactId>
107                                                 <version>1.9.4</version>
108                                         </dependency>
109                                 </dependencies>
110                         </plugin>
111
112                         <plugin>
113                                 <groupId>org.sonatype.plugins</groupId>
114                                 <artifactId>nexus-staging-maven-plugin</artifactId>
115                                 <extensions>false</extensions>
116                                 <executions>
117                                         <execution>
118                                                 <id>injected-nexus-deploy</id>
119                                                 <phase>none</phase>
120                                         </execution>
121                                 </executions>
122                         </plugin>
123                         <plugin>
124                                 <artifactId>maven-deploy-plugin</artifactId>
125                                 <version>2.8</version>
126                                 <executions>
127                                         <execution>
128                                                 <id>default-deploy</id>
129                                                 <phase>none</phase>
130                                                 <configuration>
131                                                         <skip />
132                                                 </configuration>
133                                         </execution>
134                                 </executions>
135                                 <configuration>
136                                         <skip />
137                                 </configuration>
138                         </plugin>
139                         <plugin>
140                                 <artifactId>maven-dependency-plugin</artifactId>
141                                 <executions>
142                                         <execution>
143                                                 <id>copy</id>
144                                                 <phase>package</phase>
145                                                 <goals>
146                                                         <goal>copy</goal>
147                                                 </goals>
148                                                 <configuration>
149                                                         <outputDirectory>target</outputDirectory>
150                                                         <encoding>UTF-8</encoding>
151                                                         <artifactItems>
152                                                                 <artifactItem>
153                                                                         <groupId>org.onap.dmaap.messagerouter.mirroragent</groupId>
154                                                                         <artifactId>dmaapMMAgent</artifactId>
155                                                                         <version>1.1.1</version>
156                                                                         <destFileName>dmaapMMAgent.jar</destFileName>
157                                                                 </artifactItem>
158                                                         </artifactItems>
159                                                 </configuration>
160                                         </execution>
161                                 </executions>
162                         </plugin>
163                         <plugin>
164                                 <groupId>com.spotify</groupId>
165                                 <artifactId>docker-maven-plugin</artifactId>
166                                 <version>1.0.0</version>
167                                 <configuration>
168                                         <imageName>onap/dmaap/kafka01101</imageName>
169                                         <dockerDirectory>src/main/docker</dockerDirectory>
170                                         <serverId>docker-hub</serverId>
171                                         <imageTags>
172                                                 <imageTag>${dockertag1}</imageTag>
173                                                 <imageTag>${dockertag2}</imageTag>
174                                         </imageTags>
175                                         <resources>
176                                                 <!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory> 
177                                                         <include>${project.build.finalName}.jar</include> </resource> -->
178                                                 <resource>
179                                                         <targetPath>/</targetPath>
180                                                         <directory>${project.build.directory}</directory>
181                                                         <include>**/**</include>
182                                                 </resource>
183                                                 <resource>
184                                                         <targetPath>/</targetPath>
185                                                         <directory>${project.build.directory}</directory>
186                                                         <include>dmaapMMAgent.jar</include>
187                                                 </resource>
188                                         </resources>
189                                 </configuration>
190                                 <executions>
191                                         <execution>
192                                                 <id>build-image</id>
193                                                 <phase>install</phase>
194                                                 <goals>
195                                                         <goal>build</goal>
196                                                 </goals>
197                                                 <configuration>
198                                                         <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
199                                                 </configuration>
200                                         </execution>
201
202                                         <execution>
203                                                 <id>tag-image-project-version</id>
204                                                 <phase>install</phase>
205                                                 <goals>
206                                                         <goal>tag</goal>
207                                                 </goals>
208                                                 <configuration>
209                                                         <image>onap/dmaap/kafka01101</image>
210                                                         <newName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag2}</newName>
211                                                         <skipDockerTag>${skip.docker.push}</skipDockerTag>
212                                                 </configuration>
213                                         </execution>
214
215                                         <execution>
216                                                 <id>tag-image-latest</id>
217                                                 <phase>install</phase>
218                                                 <goals>
219                                                         <goal>tag</goal>
220                                                 </goals>
221                                                 <configuration>
222                                                         <image>onap/dmaap/kafka01101</image>
223                                                         <newName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag1}</newName>
224                                                         <skipDockerTag>${skip.docker.push}</skipDockerTag>
225                                                 </configuration>
226                                         </execution>
227
228                                         <execution>
229                                                 <id>push-image</id>
230                                                 <phase>deploy</phase>
231                                                 <goals>
232                                                         <goal>push</goal>
233                                                 </goals>
234                                                 <configuration>
235                                                         <imageName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag2}</imageName>
236                                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
237                                                 </configuration>
238                                         </execution>
239
240                                         <execution>
241                                                 <id>push-image-latest</id>
242                                                 <phase>deploy</phase>
243                                                 <goals>
244                                                         <goal>push</goal>
245                                                 </goals>
246                                                 <configuration>
247                                                         <imageName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag1}</imageName>
248                                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
249                                                 </configuration>
250                                         </execution>
251                                 </executions>
252                         </plugin>
253
254                         <plugin>
255                                 <groupId>org.apache.maven.plugins</groupId>
256                                 <artifactId>maven-assembly-plugin</artifactId>
257                                 <version>2.4.1</version>
258                                 <configuration>
259                                         <!-- get all project dependencies -->
260                                         <descriptorRefs>
261                                                 <descriptorRef>jar-with-dependencies</descriptorRef>
262                                         </descriptorRefs>
263                                         <!-- MainClass in mainfest make a executable jar -->
264                                         <finalName>kafka11aaf</finalName>
265                                 </configuration>
266                                 <executions>
267                                         <execution>
268                                                 <id>make-assembly</id>
269                                                 <!-- bind to the packaging phase -->
270                                                 <phase>package</phase>
271                                                 <goals>
272                                                         <goal>single</goal>
273                                                 </goals>
274                                         </execution>
275                                 </executions>
276                         </plugin>
277
278                 </plugins>
279         </build>
280
281         <properties>
282                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
283                 <timestamp>${maven.build.timestamp}</timestamp>
284         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
285                 <sitePath>/content/sites/site/org/onap/dmaap/kafka0111/${project.artifactId}/${project.version}</sitePath>
286                 <skip.docker.build>true</skip.docker.build>
287                 <skip.docker.push>true</skip.docker.push>
288                 <nexusproxy>https://nexus.onap.org</nexusproxy>
289                 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
290                 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
291         </properties>
292
293         <!-- Distribution management -->
294         <distributionManagement>
295                 <site>
296                         <id>ecomp-site</id>
297                         <url>dav:${nexusproxy}${sitePath}</url>
298                 </site>
299         </distributionManagement>
300
301         <dependencies>
302                 <dependency>
303                         <groupId>org.onap.aaf.authz</groupId>
304                         <artifactId>aaf-cadi-aaf</artifactId>
305                         <version>2.1.2</version>
306                 </dependency>
307                 <dependency>
308                         <groupId>org.slf4j</groupId>
309                         <artifactId>slf4j-api</artifactId>
310                         <version>1.7.2</version>
311                 </dependency>
312                 <dependency>
313                         <groupId>org.slf4j</groupId>
314                         <artifactId>slf4j-simple</artifactId>
315                         <version>1.7.2</version>
316                         <scope>runtime</scope>
317                 </dependency>
318                 <dependency>
319                         <groupId>org.apache.kafka</groupId>
320                         <artifactId>kafka_2.11</artifactId>
321                         <version>0.11.0.3</version>
322                 </dependency>
323                 <dependency>
324                         <groupId>org.powermock</groupId>
325                         <artifactId>powermock-api-mockito</artifactId>
326                         <version>1.6.4</version>
327                         <scope>test</scope>
328                 </dependency>
329
330                 <dependency>
331                         <groupId>org.powermock</groupId>
332                         <artifactId>powermock-module-junit4</artifactId>
333                         <version>1.6.4</version>
334                         <scope>test</scope>
335                 </dependency>
336
337                 <dependency>
338                         <groupId>org.powermock</groupId>
339                         <artifactId>powermock-module-junit4-rule</artifactId>
340                         <version>1.6.4</version>
341                         <scope>test</scope>
342                 </dependency>
343                 <dependency>
344                         <groupId>org.mockito</groupId>
345                         <artifactId>mockito-core</artifactId>
346                         <version>1.10.19</version>
347                         <scope>test</scope>
348                 </dependency>
349         </dependencies>
350
351         <profiles>
352                 <profile>
353                         <id>docker</id>
354                         <properties>
355                                 <skip.docker.build>false</skip.docker.build>
356                                 <skip.docker.tag>false</skip.docker.tag>
357                                 <skip.docker.push>false</skip.docker.push>
358                         </properties>
359                         <build>
360                 <plugins>
361                     <plugin>
362                         <groupId>org.codehaus.groovy.maven</groupId>
363                         <artifactId>gmaven-plugin</artifactId>
364                         <executions>
365                             <execution>
366                                 <phase>validate</phase>
367                                 <goals>
368                                     <goal>execute</goal>
369                                 </goals>
370                                 <configuration>
371                                     <properties>
372                                         <ver>${project.version}</ver>
373                                         <timestamp>${maven.build.timestamp}</timestamp>
374                                     </properties>
375                                     <source>
376                                         println project.properties['ver'];
377                                         if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
378                                         project.properties['dockertag1']=project.properties['ver'] + "-latest";
379                                         project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
380                                         } else {
381                                         project.properties['dockertag1']=project.properties['ver'] + "-STAGING-latest";
382                                         project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
383                                         }
384                                         println 'docker tag 1: ' + project.properties['dockertag1'];
385                                         println 'docker tag 2: ' + project.properties['dockertag2'];
386                                     </source>
387                                 </configuration>
388                             </execution>
389                         </executions>
390                     </plugin>
391                     </plugins>
392                     </build>
393                 </profile>
394
395         </profiles>
396
397 </project>