57c3da352bb4d7c81f8121c0fc4f615df7f99f5d
[music.git] / pom.xml
1 <!-- 
2  ============LICENSE_START==========================================
3  org.onap.music
4  ===================================================================
5   Copyright (c) 2017 AT&T Intellectual Property
6  ===================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10  
11      http://www.apache.org/licenses/LICENSE-2.0
12  
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18  
19  ============LICENSE_END=============================================
20  ====================================================================
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24     <modelVersion>4.0.0</modelVersion>
25     <groupId>org.onap.music</groupId>
26     <artifactId>MUSIC</artifactId>
27     <packaging>war</packaging>
28     <version>2.4.4</version>
29     <description>
30             This is the MUSIC REST interface, packaged as a war file.
31           </description>
32     <properties>
33         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34         <jersey1.version>1.9</jersey1.version>
35         <jersey2.version>2.26</jersey2.version>
36         <jaxrs.version>2.0.1</jaxrs.version>
37         <cassandra.version>3.0.0</cassandra.version>
38         <zookeeper.version>3.4.6</zookeeper.version>
39
40         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41         <!--maven-->
42         <timestamp>${maven.build.timestamp}</timestamp>
43         <maven.build.timestamp.format>yyyy.MM.dd.HH.mm</maven.build.timestamp.format>
44         <!--docker -->
45         <docker.tag>${project.version}-${timestamp}</docker.tag>
46         <docker.latest.tag>${project.version}-latest</docker.latest.tag>
47     </properties>
48
49     <repositories>
50         <repository>
51             <id>maven2-repository.java.net</id>
52             <name>Java.net Repository for Maven</name>
53             <url>http://download.java.net/maven/2/</url>
54             <layout>default</layout>
55         </repository>
56     </repositories>
57     <build>
58         <finalName>MUSIC</finalName>
59         <sourceDirectory>src/main/java</sourceDirectory>
60         <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
61         <testSourceDirectory>src/test/java</testSourceDirectory>
62         <testOutputDirectory>target/test-classes</testOutputDirectory>
63         <defaultGoal>validate</defaultGoal>
64         <resources>
65             <resource>
66                 <directory>src/main/resources</directory>
67                 <filtering>true</filtering>
68             </resource>
69         </resources>
70         <plugins>
71             <plugin>
72                 <artifactId>maven-eclipse-plugin</artifactId>
73                 <version>2.9</version>
74                 <configuration>
75                     <additionalProjectnatures>
76                         <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
77                     </additionalProjectnatures>
78                     <additionalBuildcommands>
79                         <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
80                     </additionalBuildcommands>
81                     <downloadSources>true</downloadSources>
82                     <downloadJavadocs>true</downloadJavadocs>
83                 </configuration>
84             </plugin>
85             <plugin>
86                 <groupId>org.apache.maven.plugins</groupId>
87                 <artifactId>maven-compiler-plugin</artifactId>
88                 <version>3.5.1</version>
89                 <configuration>
90                     <source>1.7</source>
91                     <target>1.7</target>
92                 </configuration>
93             </plugin>
94             <plugin>
95                 <artifactId>maven-war-plugin</artifactId>
96                 <version>2.4</version>
97                 <configuration>
98                     <warSourceDirectory>WebContent</warSourceDirectory>
99                 </configuration>
100             </plugin>
101             <plugin>
102                 <groupId>org.apache.maven.plugins</groupId>
103                 <artifactId>maven-jar-plugin</artifactId>
104                 <version>2.4</version>
105                 <executions>
106                     <execution>
107                         <id>make-a-jar</id>
108                         <phase>compile</phase>
109                         <goals>
110                             <goal>jar</goal>
111                         </goals>
112                         <configuration>
113                             <excludes>
114                                 <exclude>**/*.xml</exclude>
115                                 <exclude>**/*.properties</exclude>
116                                 <exclude>**/Sample*</exclude>
117                             </excludes>
118                         </configuration>
119                     </execution>
120                 </executions>
121             </plugin>
122             <plugin>
123                 <groupId>org.apache.maven.plugins</groupId>
124                 <artifactId>maven-install-plugin</artifactId>
125                 <version>2.4</version>
126                 <executions>
127                     <execution>
128                         <phase>install</phase>
129                         <goals>
130                             <goal>install-file</goal>
131                         </goals>
132                         <configuration>
133                             <packaging>jar</packaging>
134                             <artifactId>${project.artifactId}</artifactId>
135                             <groupId>${project.groupId}</groupId>
136                             <version>${project.version}</version>
137                             <file>${project.build.directory}/${project.artifactId}.jar</file>
138                         </configuration>
139                     </execution>
140                 </executions>
141             </plugin>
142         </plugins>
143     </build>
144
145     <dependencies>
146
147         <dependency>
148             <groupId>ch.qos.logback</groupId>
149             <artifactId>logback-core</artifactId>
150             <version>1.1.3</version>
151
152             <exclusions>
153                 <exclusion>
154                     <groupId>org.slf4j</groupId>
155                     <artifactId>slf4j-log4j12</artifactId>
156                 </exclusion>
157             </exclusions>
158         </dependency>
159
160         <dependency>
161             <groupId>ch.qos.logback</groupId>
162             <artifactId>logback-classic</artifactId>
163             <version>1.1.3</version>
164             <exclusions>
165                 <exclusion>
166                     <groupId>org.slf4j</groupId>
167                     <artifactId>slf4j-log4j12</artifactId>
168                 </exclusion>
169             </exclusions>
170         </dependency>
171
172         <dependency>
173             <groupId>com.datastax.cassandra</groupId>
174             <artifactId>cassandra-driver-core</artifactId>
175             <version>${cassandra.version}</version>
176         </dependency>
177         <dependency>
178             <groupId>org.cassandraunit</groupId>
179             <artifactId>cassandra-unit</artifactId>
180             <version>3.3.0.1</version>
181         </dependency>
182         <dependency>
183             <groupId>org.apache.zookeeper</groupId>
184             <artifactId>zookeeper</artifactId>
185             <version>${zookeeper.version}</version>
186         </dependency>
187         <dependency>
188             <groupId>com.sun.jersey</groupId>
189             <artifactId>jersey-client</artifactId>
190             <version>${jersey1.version}</version>
191         </dependency>
192         <dependency>
193             <groupId>com.sun.jersey</groupId>
194             <artifactId>jersey-server</artifactId>
195             <version>${jersey1.version}</version>
196         </dependency>
197         <dependency>
198             <groupId>com.sun.jersey</groupId>
199             <artifactId>jersey-json</artifactId>
200             <version>${jersey1.version}</version>
201         </dependency>
202         <dependency>
203             <groupId>javax.servlet</groupId>
204             <artifactId>servlet-api</artifactId>
205             <version>2.4</version>
206             <scope>provided</scope>
207         </dependency>
208         <dependency>
209             <groupId>org.apache.maven</groupId>
210             <artifactId>maven-model</artifactId>
211             <version>3.3.9</version>
212         </dependency>
213         <dependency>
214             <groupId>org.apache.commons</groupId>
215             <artifactId>commons-jcs-core</artifactId>
216             <version>2.2</version>
217         </dependency>
218
219         <dependency>
220             <groupId>javax.servlet</groupId>
221             <artifactId>javax.servlet-api</artifactId>
222             <version>3.0.1</version>
223             <scope>provided</scope>
224         </dependency>
225         <dependency>
226             <groupId>commons-codec</groupId>
227             <artifactId>commons-codec</artifactId>
228             <version>1.11</version>
229         </dependency>
230
231
232         <dependency>
233             <groupId>junit</groupId>
234             <artifactId>junit</artifactId>
235             <version>4.12</version>
236             <scope>test</scope>
237         </dependency>
238
239         <dependency>
240             <groupId>org.mockito</groupId>
241             <artifactId>mockito-all</artifactId>
242             <version>1.9.0</version>
243         </dependency>
244
245
246         <dependency>
247             <groupId>io.swagger</groupId>
248             <artifactId>swagger-jersey-jaxrs</artifactId>
249             <version>1.5.0</version>
250         </dependency>
251
252         <dependency>
253             <groupId>com.google.guava</groupId>
254             <artifactId>guava</artifactId>
255             <version>19.0</version>
256         </dependency>
257
258         <dependency>
259             <groupId>com.att.eelf</groupId>
260             <artifactId>eelf-core</artifactId>
261             <version>1.0.0</version>
262         </dependency>
263     </dependencies>
264
265     <reporting>
266         <plugins>
267             <plugin>
268                 <groupId>org.apache.maven.plugins</groupId>
269                 <artifactId>maven-javadoc-plugin</artifactId>
270                 <version>2.10.3</version>
271                 <configuration>
272                     <author>true</author>
273                     <breakiterator>true</breakiterator>
274                     <version>true</version>
275                     <links>
276                         <link>https://docs.oracle.com/javase/7/docs/api/</link>
277                         <link>https://tomcat.apache.org/tomcat-7.0-doc/jspapi/</link>
278                         <link>http://docs.oracle.com/javaee/7/api/</link>
279                     </links>
280                 </configuration>
281             </plugin>
282         </plugins>
283     </reporting>
284
285         <profiles>
286                 <profile>
287                         <id>docker</id>
288                         <build>
289                                 <plugins>
290                                         <plugin>
291                                                 <groupId>io.fabric8</groupId>
292                                                 <artifactId>docker-maven-plugin</artifactId>
293                                                 <version>0.19.1</version>
294                                                 <configuration>
295                                                         <verbose>true</verbose>
296                                                         <apiVersion>1.23</apiVersion>
297                                                         <registry>nexus3.onap.org:10003</registry>
298                                                         <images>
299                                                                 <!-- MUSIC War -->
300                                                                 <image>
301                                                                         <name>music</name>
302                                                                         <alias>docker_music</alias>
303                                                                         <build>
304                                                                                 <cleanup>true</cleanup>
305                                                                                 <tags>
306                                                                                         <tag>${docker.tag}</tag>
307                                                                                         <tag>${docker.latest.tag}</tag>
308                                                                                 </tags>
309                                                                                 <dockerFileDir>${project.basedir}</dockerFileDir>
310                                                                                 <assembly>
311                                                                                         <descriptorRef>artifact</descriptorRef>
312                                                                                 </assembly>
313                                                                         </build>
314                                                                 </image>
315                                                         </images>
316                                                 </configuration>
317                                                 <executions>
318                                                         <execution>
319                                                                 <id>clean-images</id>
320                                                                 <phase>pre-clean</phase>
321                                                                 <goals>
322                                                                         <goal>remove</goal>
323                                                                 </goals>
324                                                                 <configuration>
325                                                                         <removeAll>true</removeAll>
326                                                                         <image>music</image>
327                                                                 </configuration>
328                                                         </execution>
329                                                         <execution>
330                                                                 <id>generate-images</id>
331                                                                 <phase>package</phase>
332                                                                 <goals>
333                                                                         <goal>build</goal>
334                                                                 </goals>
335                                                         </execution>
336                                                         <execution>
337                                                                 <id>push-images</id>
338                                                                 <phase>deploy</phase>
339                                                                 <goals>
340                                                                         <goal>push</goal>
341                                                                 </goals>
342                                                                 <configuration>
343                                                                         <image>music</image>
344                                                                 </configuration>
345                                                         </execution>
346                                                 </executions>
347                                         </plugin>
348                                 </plugins>
349                         </build>
350                 </profile>
351         </profiles>
352
353
354 </project>