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