added enforcer plugin
[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.0</version>
20         </parent>
21
22         <groupId>org.onap.dmaap.kafka</groupId>
23         <artifactId>kafka11aaf</artifactId>
24         <version>0.0.2-SNAPSHOT</version>
25         <name>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                                 <groupId>com.spotify</groupId>
141                                 <artifactId>docker-maven-plugin</artifactId>
142                                 <version>1.0.0</version>
143                                 <configuration>
144                                         <imageName>onap/dmaap/kafka01101</imageName>
145                                         <dockerDirectory>src/main/docker</dockerDirectory>
146                                         <serverId>docker-hub</serverId>
147                                         <imageTags>
148                                                 <imageTag>${KafkaImg}</imageTag>
149                                                 <imageTag>latest</imageTag>
150                                         </imageTags>
151                                         <forceTags>true</forceTags>
152                                         <resources>
153                                                 <!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory> 
154                                                         <include>${project.build.finalName}.jar</include> </resource> -->
155                                                 <resource>
156                                                         <targetPath>/</targetPath>
157                                                         <directory>${project.build.directory}</directory>
158                                                         <include>**/**</include>
159                                                 </resource>
160                                         </resources>
161                                 </configuration>
162                                 <executions>
163                                         <execution>
164                                                 <id>build-image</id>
165                                                 <phase>install</phase>
166                                                 <goals>
167                                                         <goal>build</goal>
168                                                 </goals>
169                                                 <configuration>
170                                                         <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
171                                                 </configuration>
172                                         </execution>
173
174                                         <execution>
175                                                 <id>tag-image-project-version</id>
176                                                 <phase>install</phase>
177                                                 <goals>
178                                                         <goal>tag</goal>
179                                                 </goals>
180                                                 <configuration>
181                                                         <image>onap/dmaap/kafka01101</image>
182                                                         <newName>${docker.push.registry}/onap/dmaap/kafka01101:${KafkaImg}</newName>
183                                                         <skipDockerTag>${skip.docker.push}</skipDockerTag>
184                                                 </configuration>
185                                         </execution>
186
187                                         <execution>
188                                                 <id>tag-image-latest</id>
189                                                 <phase>install</phase>
190                                                 <goals>
191                                                         <goal>tag</goal>
192                                                 </goals>
193                                                 <configuration>
194                                                         <image>onap/dmaap/kafka01101</image>
195                                                         <newName>${docker.push.registry}/onap/dmaap/kafka01101:latest</newName>
196                                                         <skipDockerTag>${skip.docker.push}</skipDockerTag>
197                                                 </configuration>
198                                         </execution>
199
200                                         <execution>
201                                                 <id>push-image</id>
202                                                 <phase>deploy</phase>
203                                                 <goals>
204                                                         <goal>push</goal>
205                                                 </goals>
206                                                 <configuration>
207                                                         <imageName>${docker.push.registry}/onap/dmaap/kafka01101:${KafkaImg}</imageName>
208                                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
209                                                 </configuration>
210                                         </execution>
211
212                                         <execution>
213                                                 <id>push-image-latest</id>
214                                                 <phase>deploy</phase>
215                                                 <goals>
216                                                         <goal>push</goal>
217                                                 </goals>
218                                                 <configuration>
219                                                         <imageName>${docker.push.registry}/onap/dmaap/kafka01101:latest</imageName>
220                                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
221                                                 </configuration>
222                                         </execution>
223                                 </executions>
224                         </plugin>
225
226                         <plugin>
227                                 <groupId>org.apache.maven.plugins</groupId>
228                                 <artifactId>maven-assembly-plugin</artifactId>
229                                 <version>2.4.1</version>
230                                 <configuration>
231                                         <!-- get all project dependencies -->
232                                         <descriptorRefs>
233                                                 <descriptorRef>jar-with-dependencies</descriptorRef>
234                                         </descriptorRefs>
235                                         <!-- MainClass in mainfest make a executable jar -->
236                  <finalName>kafka11aaf</finalName>
237                                 </configuration>
238                                 <executions>
239                                         <execution>
240                                                 <id>make-assembly</id>
241                                                 <!-- bind to the packaging phase -->
242                                                 <phase>package</phase>
243                                                 <goals>
244                                                         <goal>single</goal>
245                                                 </goals>
246                                         </execution>
247                                 </executions>
248                         </plugin>
249                         
250                 <plugin>
251                         <groupId>org.apache.maven.plugins</groupId>
252                         <artifactId>maven-enforcer-plugin</artifactId>
253                         <executions>
254                                 <execution>
255                                         <id>enforce-no-snapshots</id>
256                                         <goals>
257                                                 <goal>enforce</goal>
258                                         </goals>
259                                         <configuration>
260                                                 <rules>
261                                                         <requireReleaseDeps>
262                                                                 <message>No Snapshots Allowed!</message>
263                                                                 <excludes>
264                                                                         <exclude>org.onap.aaf.authz:aaf-cadi-client</exclude>
265                                                                         <exclude>org.onap.aaf.authz:aaf-misc-env</exclude>
266                                                                         <exclude>org.onap.aaf.authz:aaf-cadi-aaf</exclude>
267                                                                         <exclude>org.onap.aaf.authz:aaf-auth-client</exclude>
268                                                                         <exclude>org.onap.aaf.authz:aaf-cadi-core</exclude>
269                                                                         <exclude>org.onap.aaf.authz:aaf-misc-rosetta</exclude>
270                                                                 </excludes>
271                                                         </requireReleaseDeps>
272                                                 </rules>
273                                                 <fail>true</fail>
274                                         </configuration>
275                                 </execution>
276                         </executions>
277                 </plugin>
278
279                 </plugins>
280         </build>
281
282         <properties>
283                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
284                 <KafkaImg>0.0.2</KafkaImg>
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         </properties>
291
292         <!-- Distribution management -->
293         <distributionManagement>
294                 <site>
295                         <id>ecomp-site</id>
296                         <url>dav:${nexusproxy}${sitePath}</url>
297                 </site>
298         </distributionManagement>
299
300         <dependencies>
301                 <dependency>
302                         <groupId>org.onap.aaf.authz</groupId>
303                         <artifactId>aaf-cadi-aaf</artifactId>
304                         <version>2.1.2-SNAPSHOT</version>
305                 </dependency>
306                 <dependency>
307                         <groupId>org.slf4j</groupId>
308                         <artifactId>slf4j-api</artifactId>
309                         <version>1.7.2</version>
310                 </dependency>
311                 <dependency>
312                         <groupId>org.slf4j</groupId>
313                         <artifactId>slf4j-simple</artifactId>
314                         <version>1.7.2</version>
315                         <scope>runtime</scope>
316                 </dependency>
317                 <dependency>
318                         <groupId>org.apache.kafka</groupId>
319                         <artifactId>kafka_2.11</artifactId>
320                         <version>0.11.0.3</version>
321                 </dependency>
322                 <dependency>
323                         <groupId>org.powermock</groupId>
324                         <artifactId>powermock-api-mockito</artifactId>
325                         <version>1.6.4</version>
326                         <scope>test</scope>
327                 </dependency>
328
329                 <dependency>
330                         <groupId>org.powermock</groupId>
331                         <artifactId>powermock-module-junit4</artifactId>
332                         <version>1.6.4</version>
333                         <scope>test</scope>
334                 </dependency>
335
336                 <dependency>
337                         <groupId>org.powermock</groupId>
338                         <artifactId>powermock-module-junit4-rule</artifactId>
339                         <version>1.6.4</version>
340                         <scope>test</scope>
341                 </dependency>
342                 <dependency>
343                         <groupId>org.mockito</groupId>
344                         <artifactId>mockito-core</artifactId>
345                         <version>1.10.19</version>
346                         <scope>test</scope>
347                 </dependency>
348         </dependencies>
349
350         <profiles>
351                 <profile>
352                         <id>docker</id>
353                         <properties>
354                                 <skip.docker.build>false</skip.docker.build>
355                                 <skip.docker.tag>false</skip.docker.tag>
356                                 <skip.docker.push>false</skip.docker.push>
357                         </properties>
358                 </profile>
359
360         </profiles>
361
362 </project>