Modify for k8s deployment compatibility
[dmaap/buscontroller.git] / pom.xml
1 <?xml version="1.0"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3   <modelVersion>4.0.0</modelVersion>
4   <groupId>org.onap.dmaap.buscontroller</groupId>
5   <artifactId>buscontroller</artifactId>
6   <version>${artifact.version}</version>
7   <name>dmaap-buscontroller</name>
8   <parent>
9     <groupId>org.onap.oparent</groupId>
10     <artifactId>oparent</artifactId>
11     <version>1.1.0</version>
12     <relativePath/>
13   </parent>
14     <build>
15     <finalName>buscontroller</finalName>
16
17     <plugins>
18       <plugin>
19         <groupId>org.apache.maven.plugins</groupId>
20         <artifactId>maven-enforcer-plugin</artifactId>
21         <version>3.0.0-M1</version>
22         <executions>
23           <execution>
24             <id>enforce-no-snapshots</id>
25             <goals>
26               <goal>enforce</goal>
27             </goals>
28             <configuration>
29               <rules>
30                 <requireReleaseDeps>
31                   <message>No Snapshots Allowed!</message>
32                   <excludes>
33                     <exclude>org.onap.dmaap.dbcapi:dbcapi</exclude>
34                   </excludes>
35                 </requireReleaseDeps>
36               </rules>
37               <fail>true</fail>
38             </configuration>
39           </execution>
40         </executions>
41       </plugin>
42
43            <!-- Package an Uber jar -->
44             <plugin>
45                 <groupId>org.apache.maven.plugins</groupId>
46                 <artifactId>maven-shade-plugin</artifactId>
47                 <version>2.4.3</version>
48                 <executions>
49                     <!-- Run shade goal on package phase -->
50                     <execution>
51                         <phase>package</phase>
52                         <goals>
53                             <goal>shade</goal>
54                         </goals>
55                         <configuration>
56                                                         <!-- this filter section is needed to avoid runtime error:
57                                                                 java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
58                                                                 suggestion found at: https://stackoverflow.com/q/999489 
59                                                         -->
60                                                         <filters>
61                                                                 <filter>
62                                                                         <artifact>*:*</artifact>
63                                                                         <excludes>
64                                                                                 <exclude>META-INF/*.SF</exclude>
65                                                                                 <exclude>META-INF/*.DSA</exclude>
66                                                                                 <exclude>META-INF/*.RSA</exclude>
67                                                                         </excludes>
68                                                                 </filter>
69                                                         </filters>
70                             <transformers>
71                                 <!-- NOTE: Need the following transformer else gets "Could not resolve type id 'https' into a subtype" error
72                                 Solution found from here:
73                                 http://stackoverflow.com/questions/27543060/why-does-dropwizard-configuration-is-not-working
74                                 Some more context here:
75                                 https://github.com/dropwizard/dropwizard/issues/455 -->
76                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
77                                 <!-- add Main-Class to manifest file -->
78                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
79                                     <mainClass>org.onap.dmaap.dbcapi.server.Main</mainClass>
80                                 </transformer>
81                             </transformers>
82                         </configuration>
83                     </execution>
84                 </executions>
85             </plugin>
86
87
88
89       <plugin>
90                 <groupId>org.sonatype.plugins</groupId>
91                 <artifactId>nexus-staging-maven-plugin</artifactId>
92                 <version>1.6.7</version>
93                 <extensions>true</extensions>
94                 <configuration>
95                     <serverId>ecomp-staging</serverId>
96                     <nexusUrl>${nexusproxy}</nexusUrl>
97                     <stagingProfileId>176c31dfe190a</stagingProfileId>
98                 </configuration>
99             </plugin>
100
101
102         <!-- for Distribution management -->
103                 <plugin>
104                   <groupId>org.apache.maven.plugins</groupId>
105                   <artifactId>maven-site-plugin</artifactId>
106                   <version>3.6</version>
107                   <dependencies>
108                         <dependency>
109                           <groupId>org.apache.maven.wagon</groupId>
110                           <artifactId>wagon-webdav-jackrabbit</artifactId>
111                           <version>2.10</version>
112                         </dependency>
113                   </dependencies>
114                 </plugin>
115
116     </plugins>
117     <pluginManagement>
118       <plugins>
119         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
120         <plugin>
121           <groupId>org.eclipse.m2e</groupId>
122           <artifactId>lifecycle-mapping</artifactId>
123           <version>1.0.0</version>
124           <configuration>
125             <lifecycleMappingMetadata>
126               <pluginExecutions>
127                 <pluginExecution>
128                   <pluginExecutionFilter>
129                     <groupId>org.apache.maven.plugins</groupId>
130                     <artifactId>maven-dependency-plugin</artifactId>
131                     <versionRange>[2.10,)</versionRange>
132                                             <phase>install</phase>
133                         <goals>
134                           <goal>copy-dependencies</goal>
135                         </goals>
136                   </pluginExecutionFilter>
137                   <action>
138                     <ignore/>
139                   </action>
140                 </pluginExecution>
141               </pluginExecutions>
142             </lifecycleMappingMetadata>
143           </configuration>
144         </plugin>
145       </plugins>
146     </pluginManagement>
147   </build>
148         <profiles>
149         <profile>
150                 <id>docker</id>
151                 <build>
152                         <plugins>
153       <plugin>
154                 <groupId>com.spotify</groupId>
155                  <artifactId>docker-maven-plugin</artifactId>
156                  <version>1.0.0</version>
157                  <configuration>
158                                  <imageName>${onap.nexus.dockerregistry.daily}/${docker.image}</imageName>
159                              <dockerDirectory>${project.basedir}</dockerDirectory>
160                                  <serverId>${onap.nexus.dockerregistry.daily}</serverId>
161                                  <imageTags>
162                                                  <imageTag>${artifact.version}</imageTag>
163                                                  <imageTag>latest</imageTag>
164                                  </imageTags>
165                                  <forceTags>true</forceTags>
166                                  <resources>
167                                                  <resource>
168                                                                  <targetPath>/</targetPath>
169                                                                  <directory>${project.basedir}</directory>
170                                                                  <excludes>
171                                                                         <exclude>target/**/*</exclude>
172                                                                         <exclude>pom.xml</exclude>
173                                                                 </excludes>
174                                                  </resource>
175
176                                                  <resource>
177                                                                  <targetPath>/</targetPath>
178                                                                  <directory>${project.build.directory}</directory>
179                                                                  <include>**/**</include>
180                                                  </resource>
181                                  </resources>
182                  </configuration>
183       </plugin>
184                         </plugins>
185                 </build>
186         </profile>
187         </profiles>
188   <dependencyManagement>
189     <dependencies>
190  
191       <dependency>
192         <groupId>org.glassfish.jersey</groupId>
193         <artifactId>jersey-bom</artifactId>
194         <version>${jersey.version}</version>
195         <type>pom</type>
196         <scope>import</scope>
197       </dependency>
198     </dependencies>
199   </dependencyManagement>
200   <dependencies>
201         <dependency>
202         <groupId>io.swagger</groupId>
203         <artifactId>swagger-core</artifactId>
204         <version>1.5.13</version>
205       </dependency>
206       <dependency>
207         <groupId>io.swagger</groupId>
208         <artifactId>swagger-jersey2-jaxrs</artifactId>
209         <version>1.5.13</version>
210       </dependency>
211        <dependency>
212         <groupId>io.swagger</groupId>
213         <artifactId>swagger-annotations</artifactId>
214         <version>1.5.13</version>
215       </dependency>   
216     <dependency>
217       <groupId>org.glassfish.jersey.containers</groupId>
218       <artifactId>jersey-container-servlet-core</artifactId>
219       <!-- use the following artifactId if you don't need servlet 2.x compatibility -->
220       <!-- artifactId>jersey-container-servlet</artifactId -->
221     </dependency>
222     <dependency>
223       <groupId>org.glassfish.jersey.media</groupId>
224       <artifactId>jersey-media-moxy</artifactId>
225     </dependency>
226     <dependency>
227       <groupId>log4j</groupId>
228       <artifactId>log4j</artifactId>
229       <version>1.2.17</version>
230     </dependency>
231     <dependency>
232       <groupId>org.eclipse.jetty</groupId>
233       <artifactId>jetty-server</artifactId>
234       <version>${jettyVersion}</version>
235     </dependency>
236     <dependency>
237       <groupId>org.eclipse.jetty</groupId>
238       <artifactId>jetty-servlet</artifactId>
239       <version>${jettyVersion}</version>
240       <scope>compile</scope>
241     </dependency>
242     <dependency>
243       <groupId>org.eclipse.jetty</groupId>
244       <artifactId>jetty-servlets</artifactId>
245       <version>${jettyVersion}</version>
246       <scope>compile</scope>
247     </dependency>
248     <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
249     <dependency>
250       <groupId>com.googlecode.json-simple</groupId>
251       <artifactId>json-simple</artifactId>
252       <version>1.1.1</version>
253     </dependency>
254     <dependency>
255       <groupId>commons-codec</groupId>
256       <artifactId>commons-codec</artifactId>
257       <version>1.6</version>
258     </dependency>
259     <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
260     <dependency>
261       <groupId>org.postgresql</groupId>
262       <artifactId>postgresql</artifactId>
263       <version>9.4.1208.jre7</version>
264     </dependency>
265         <dependency>
266                 <groupId>com.att.eelf</groupId> 
267                 <artifactId>eelf-core</artifactId> 
268                 <version>${eelf.version}</version> 
269         </dependency>
270         <dependency>
271                 <groupId>org.onap.dmaap.dbcapi</groupId>
272                 <artifactId>dbcapi</artifactId>
273                 <version>1.0.2-SNAPSHOT</version>
274         </dependency>
275   </dependencies>
276   <reporting>
277     <plugins>
278       <plugin>
279         <groupId>org.apache.maven.plugins</groupId>
280         <artifactId>maven-javadoc-plugin</artifactId>
281         <version>2.10.4</version>
282         <configuration>
283           <failOnError>false</failOnError>
284           <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
285           <docletArtifact>
286             <groupId>org.umlgraph</groupId>
287             <artifactId>umlgraph</artifactId>
288             <version>5.6</version>
289           </docletArtifact>
290           <additionalparam>-views</additionalparam>
291           <useStandardDocletOptions>true</useStandardDocletOptions>
292         </configuration>
293       </plugin>
294     </plugins>
295   </reporting>
296
297   <distributionManagement>
298         <site>
299                 <id>ecomp-site</id>
300                 <url>dav:${nexusproxy}${sitePath}</url>
301         </site>
302   </distributionManagement>
303   <properties>
304     <jersey.version>2.16</jersey.version>
305     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
306     <jettyVersion>9.3.7.v20160115</jettyVersion>
307     <eelf.version>0.0.1</eelf.version>
308     <artifact.version>1.0.2</artifact.version>
309                 <!--  SONAR  -->
310                  <jacoco.version>0.7.7.201606060606</jacoco.version>
311             <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
312             <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
313             <!-- Default Sonar configuration -->
314             <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
315             <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
316             <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
317             <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
318
319         <!-- docker image -->
320                  <docker.image>onap/dmaap/buscontroller</docker.image>
321
322                  <nexusproxy>https://nexus.onap.org</nexusproxy>
323                  <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
324
325         <!-- for Distribution Management -->
326                 <sitePath>/content/sites/site/org/onap/dmaap/buscontroller/${artifact.version}</sitePath>
327   </properties>
328   <description>Packaging Platform (DMaaP) Bus Controller API as a Docker container. </description>
329 </project>