Refactoring multiple plugins
[ccsdk/features.git] / sdnr / wt / data-provider / database / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4  * ============LICENSE_START=======================================================
5  * ONAP : CCSDK.sdnr.wt.data-provider.model
6  * ================================================================================
7  * Copyright (C) 2018 highstreet technologies GmbH Intellectual Property.
8  * All rights reserved.
9  * ================================================================================
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *      http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  * ============LICENSE_END=========================================================
22
23 -->
24 <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/xsd/maven-4.0.0.xsd">
25     <modelVersion>4.0.0</modelVersion>
26
27     <parent>
28         <groupId>org.onap.ccsdk.parent</groupId>
29         <artifactId>binding-parent</artifactId>
30         <version>1.5.1-SNAPSHOT</version>
31         <relativePath/>
32     </parent>
33
34     <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
35     <artifactId>sdnr-wt-data-provider-database</artifactId>
36     <version>0.7.0-SNAPSHOT</version>
37     <packaging>bundle</packaging>
38
39     <name>ccsdk-features :: ${project.artifactId}</name>
40     <licenses>
41         <license>
42             <name>Apache License, Version 2.0</name>
43             <url>http://www.apache.org/licenses/LICENSE-2.0</url>
44         </license>
45     </licenses>
46
47     <properties>
48         <maven.javadoc.skip>true</maven.javadoc.skip>
49         <databaseport>49401</databaseport>
50     </properties>
51
52     <dependencies>
53         <dependency>
54             <groupId>org.mockito</groupId>
55             <artifactId>mockito-core</artifactId>
56             <scope>test</scope>
57         </dependency>
58         <dependency>
59             <groupId>org.opendaylight.netconf</groupId>
60             <artifactId>sal-netconf-connector</artifactId>
61             <scope>provided</scope>
62         </dependency>
63         <!--            <dependency> -->
64         <!--                    <groupId>org.json</groupId> -->
65         <!--                    <artifactId>json</artifactId> -->
66         <!--                    <scope>provided</scope> -->
67         <!--            </dependency> -->
68         <dependency>
69             <groupId>org.osgi</groupId>
70             <artifactId>org.osgi.core</artifactId>
71             <scope>provided</scope>
72         </dependency>
73         <dependency>
74             <groupId>${project.groupId}</groupId>
75             <artifactId>sdnr-wt-common</artifactId>
76             <version>${project.version}</version>
77         </dependency>
78         <dependency>
79             <groupId>${project.groupId}</groupId>
80             <artifactId>sdnr-wt-data-provider-model</artifactId>
81             <version>${project.version}</version>
82         </dependency>
83         <!--            <dependency> -->
84         <!--                    <groupId>org.elasticsearch.client</groupId> -->
85         <!--                    <artifactId>elasticsearch-rest-client</artifactId> -->
86         <!--                    <version>6.4.3</version> -->
87         <!--            </dependency> -->
88     </dependencies>
89
90     <build>
91         <plugins>
92             <plugin>
93                 <groupId>org.jacoco</groupId>
94                 <artifactId>jacoco-maven-plugin</artifactId>
95                 <configuration>
96                     <excludes>
97                         <exclude>**/gen/**</exclude>
98                         <exclude>**/generated-sources/**</exclude>
99                         <exclude>**/yang-gen-sal/**</exclude>
100                         <exclude>**/pax/**</exclude>
101                     </excludes>
102                 </configuration>
103             </plugin>
104             <plugin>
105                 <groupId>org.codehaus.mojo</groupId>
106                 <artifactId>exec-maven-plugin</artifactId>
107                 <executions>
108                     <execution>
109                         <id>generateDTOs</id>
110                         <phase>generate-sources</phase>
111                         <goals>
112                             <goal>exec</goal>
113                         </goals>
114                         <configuration>
115                             <executable>bash</executable>
116                             <arguments>
117                                 <argument>${basedir}/src/main/resources/es-init.sh</argument>
118                                 <argument>initfile</argument>
119                                 <argument>-f</argument>
120                                 <argument>${project.build.directory}/EsInit.script</argument>
121                             </arguments>
122                         </configuration>
123                     </execution>
124                 </executions>
125             </plugin>
126             <plugin>
127                 <groupId>com.github.alexcojocaru</groupId>
128                 <artifactId>elasticsearch-maven-plugin</artifactId>
129                 <version>6.16</version>
130                 <configuration>
131                     <clusterName>testCluster</clusterName>
132                     <transportPort>9500</transportPort>
133                     <httpPort>${databaseport}</httpPort>
134                     <version>6.5.0</version>
135                     <timeout>120</timeout>
136                     <pathInitScript>${project.build.directory}/EsInit.script</pathInitScript>
137                     <skip>${skipTests}</skip>
138                 </configuration>
139                 <executions>
140                     <execution>
141                         <id>start-elasticsearch</id>
142                         <phase>process-test-classes</phase>
143                         <goals>
144                             <goal>runforked</goal>
145                         </goals>
146                     </execution>
147                     <execution>
148                         <id>stop-elasticsearch</id>
149                         <phase>prepare-package</phase>
150                         <goals>
151                             <goal>stop</goal>
152                         </goals>
153                     </execution>
154                 </executions>
155             </plugin>
156             <plugin>
157                 <groupId>org.apache.maven.plugins</groupId>
158                 <artifactId>maven-surefire-plugin</artifactId>
159                 <configuration>
160                     <systemProperties>
161                         <property>
162                             <name>databaseport</name>
163                             <value>${databaseport}</value>
164                         </property>
165                     </systemProperties>
166                 </configuration>
167             </plugin>
168         </plugins>
169     </build>
170 </project>