3c0a3d4ac7dd7a5718c1b72477f7df2ebbc29987
[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.0.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                 <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                                 <artifactId>maven-deploy-plugin</artifactId>
114                                 <version>2.8</version>
115                                 <executions>
116                                         <execution>
117                                                 <id>default-deploy</id>
118                                                 <phase>none</phase>
119                                                 <configuration>
120                                                         <skip />
121                                                 </configuration>
122                                         </execution>
123                                 </executions>
124                                 <configuration>
125                                         <skip />
126                                 </configuration>
127                         </plugin>
128                         <plugin>
129                                 <artifactId>maven-dependency-plugin</artifactId>
130                                 <executions>
131                                         <execution>
132                                                 <id>copy</id>
133                                                 <phase>package</phase>
134                                                 <goals>
135                                                         <goal>copy</goal>
136                                                 </goals>
137                                                 <configuration>
138                                                         <outputDirectory>target</outputDirectory>
139                                                         <encoding>UTF-8</encoding>
140                                                         <artifactItems>
141                                                                 <artifactItem>
142                                                                         <groupId>org.onap.dmaap.messagerouter.mirroragent</groupId>
143                                                                         <artifactId>dmaapMMAgent</artifactId>
144                                                                         <version>1.1.2</version>
145                                                                         <destFileName>dmaapMMAgent.jar</destFileName>
146                                                                 </artifactItem>
147                                                         </artifactItems>
148                                                 </configuration>
149                                         </execution>
150                                 </executions>
151                         </plugin>
152                         <plugin>
153                                 <groupId>com.spotify</groupId>
154                                 <artifactId>docker-maven-plugin</artifactId>
155                                 <version>1.0.0</version>
156                                 <configuration>
157                                         <imageName>onap/dmaap/kafka111</imageName>
158                                         <dockerDirectory>src/main/docker</dockerDirectory>
159                                         <serverId>docker-hub</serverId>
160                                         <imageTags>
161                                                 <imageTag>${dockertag1}</imageTag>
162                                                 <imageTag>${dockertag2}</imageTag>
163                                         </imageTags>
164                                         <resources>
165                                                 <!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory> 
166                                                         <include>${project.build.finalName}.jar</include> </resource> -->
167                                                 <resource>
168                                                         <targetPath>/</targetPath>
169                                                         <directory>${project.build.directory}</directory>
170                                                         <include>**/**</include>
171                                                 </resource>
172                                                 <resource>
173                                                         <targetPath>/</targetPath>
174                                                         <directory>${project.build.directory}</directory>
175                                                         <include>dmaapMMAgent.jar</include>
176                                                 </resource>
177                                         </resources>
178                                 </configuration>
179                                 <executions>
180                                         <execution>
181                                                 <id>build-image</id>
182                                                 <phase>install</phase>
183                                                 <goals>
184                                                         <goal>build</goal>
185                                                 </goals>
186                                                 <configuration>
187                                                         <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
188                                                 </configuration>
189                                         </execution>
190
191                                         <execution>
192                                                 <id>tag-image-project-version</id>
193                                                 <phase>install</phase>
194                                                 <goals>
195                                                         <goal>tag</goal>
196                                                 </goals>
197                                                 <configuration>
198                                                         <image>onap/dmaap/kafka111</image>
199                                                         <newName>${docker.push.registry}/onap/dmaap/kafka111:${dockertag2}</newName>
200                                                         <skipDockerTag>${skip.docker.push}</skipDockerTag>
201                                                 </configuration>
202                                         </execution>
203
204                                         <execution>
205                                                 <id>tag-image-latest</id>
206                                                 <phase>install</phase>
207                                                 <goals>
208                                                         <goal>tag</goal>
209                                                 </goals>
210                                                 <configuration>
211                                                         <image>onap/dmaap/kafka111</image>
212                                                         <newName>${docker.push.registry}/onap/dmaap/kafka111:${dockertag1}</newName>
213                                                         <skipDockerTag>${skip.docker.push}</skipDockerTag>
214                                                 </configuration>
215                                         </execution>
216
217                                         <execution>
218                                                 <id>push-image</id>
219                                                 <phase>deploy</phase>
220                                                 <goals>
221                                                         <goal>push</goal>
222                                                 </goals>
223                                                 <configuration>
224                                                         <imageName>${docker.push.registry}/onap/dmaap/kafka111:${dockertag2}</imageName>
225                                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
226                                                 </configuration>
227                                         </execution>
228
229                                         <execution>
230                                                 <id>push-image-latest</id>
231                                                 <phase>deploy</phase>
232                                                 <goals>
233                                                         <goal>push</goal>
234                                                 </goals>
235                                                 <configuration>
236                                                         <imageName>${docker.push.registry}/onap/dmaap/kafka111:${dockertag1}</imageName>
237                                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
238                                                 </configuration>
239                                         </execution>
240                                 </executions>
241                         </plugin>
242
243                         <plugin>
244                                 <groupId>org.apache.maven.plugins</groupId>
245                                 <artifactId>maven-assembly-plugin</artifactId>
246                                 <version>2.4.1</version>
247                                 <configuration>
248                                         <!-- get all project dependencies -->
249                                         <descriptorRefs>
250                                                 <descriptorRef>jar-with-dependencies</descriptorRef>
251                                         </descriptorRefs>
252                                         <!-- MainClass in mainfest make a executable jar -->
253                                         <finalName>kafka11aaf</finalName>
254                                 </configuration>
255                                 <executions>
256                                         <execution>
257                                                 <id>make-assembly</id>
258                                                 <!-- bind to the packaging phase -->
259                                                 <phase>package</phase>
260                                                 <goals>
261                                                         <goal>single</goal>
262                                                 </goals>
263                                         </execution>
264                                 </executions>
265                         </plugin>
266
267                 </plugins>
268         </build>
269
270         <properties>
271                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
272                 <timestamp>${maven.build.timestamp}</timestamp>
273                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
274                 <sitePath>/content/sites/site/org/onap/dmaap/kafka0111/${project.artifactId}/${project.version}</sitePath>
275                 <skip.docker.build>true</skip.docker.build>
276                 <skip.docker.push>true</skip.docker.push>
277                 <nexusproxy>https://nexus.onap.org</nexusproxy>
278                 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
279                 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
280         </properties>
281
282         <!-- Distribution management -->
283         <distributionManagement>
284                 <site>
285                         <id>ecomp-site</id>
286                         <url>dav:${nexusproxy}${sitePath}</url>
287                 </site>
288         </distributionManagement>
289
290         <dependencies>
291                 <dependency>
292                         <groupId>org.onap.aaf.authz</groupId>
293                         <artifactId>aaf-cadi-aaf</artifactId>
294                         <version>2.1.2</version>
295                 </dependency>
296                 <dependency>
297                         <groupId>org.slf4j</groupId>
298                         <artifactId>slf4j-api</artifactId>
299                         <version>1.7.2</version>
300                 </dependency>
301                 <dependency>
302                         <groupId>org.slf4j</groupId>
303                         <artifactId>slf4j-simple</artifactId>
304                         <version>1.7.2</version>
305                         <scope>runtime</scope>
306                 </dependency>
307                 <dependency>
308                         <groupId>org.apache.kafka</groupId>
309                         <artifactId>kafka_2.12</artifactId>
310                         <version>1.1.1</version>
311                 </dependency>
312                 <dependency>
313                         <groupId>org.powermock</groupId>
314                         <artifactId>powermock-api-mockito</artifactId>
315                         <version>1.6.4</version>
316                         <scope>test</scope>
317                 </dependency>
318
319                 <dependency>
320                         <groupId>org.powermock</groupId>
321                         <artifactId>powermock-module-junit4</artifactId>
322                         <version>1.6.4</version>
323                         <scope>test</scope>
324                 </dependency>
325
326                 <dependency>
327                         <groupId>org.powermock</groupId>
328                         <artifactId>powermock-module-junit4-rule</artifactId>
329                         <version>1.6.4</version>
330                         <scope>test</scope>
331                 </dependency>
332                 <dependency>
333                         <groupId>org.mockito</groupId>
334                         <artifactId>mockito-core</artifactId>
335                         <version>1.10.19</version>
336                         <scope>test</scope>
337                 </dependency>
338         </dependencies>
339
340         <profiles>
341                 <profile>
342                         <id>docker</id>
343                         <properties>
344                                 <skip.docker.build>false</skip.docker.build>
345                                 <skip.docker.tag>false</skip.docker.tag>
346                                 <skip.docker.push>false</skip.docker.push>
347                         </properties>
348                         <build>
349                                 <plugins>
350                                         <plugin>
351                                                 <groupId>org.codehaus.groovy.maven</groupId>
352                                                 <artifactId>gmaven-plugin</artifactId>
353                                                 <executions>
354                                                         <execution>
355                                                                 <phase>validate</phase>
356                                                                 <goals>
357                                                                         <goal>execute</goal>
358                                                                 </goals>
359                                                                 <configuration>
360                                                                         <properties>
361                                                                                 <ver>${project.version}</ver>
362                                                                                 <timestamp>${maven.build.timestamp}</timestamp>
363                                                                         </properties>
364                                                                         <source>
365                                                                                 println project.properties['ver'];
366                                                                                 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
367                                                                                 project.properties['dockertag1']=project.properties['ver'] +
368                                                                                 "-latest";
369                                                                                 project.properties['dockertag2']=project.properties['ver'] +
370                                                                                 "-" + project.properties['timestamp'];
371                                                                                 } else {
372                                                                                 project.properties['dockertag1']=project.properties['ver'] +
373                                                                                 "-STAGING-latest";
374                                                                                 project.properties['dockertag2']=project.properties['ver'] +
375                                                                                 "-STAGING-" + project.properties['timestamp'];
376                                                                                 }
377                                                                                 println 'docker tag 1: ' + project.properties['dockertag1'];
378                                                                                 println 'docker tag 2: ' + project.properties['dockertag2'];
379                                                                         </source>
380                                                                 </configuration>
381                                                         </execution>
382                                                 </executions>
383                                         </plugin>
384                                 </plugins>
385                         </build>
386                 </profile>
387
388         </profiles>
389
390 </project>