Remove SDNR seed code
[ccsdk/apps.git] / ms / vlantag-api / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5         <modelVersion>4.0.0</modelVersion>
6
7         <groupId>org.onap.ccsdk.apps.ms.vlantagapi</groupId>
8         <artifactId>vlantag-api</artifactId>
9         <version>0.4.0-SNAPSHOT</version>
10         <packaging>jar</packaging>
11
12         <name>vlantag-api</name>
13         <description>Vlantag Api Service for Vlantag management of VNFs</description>
14
15         <properties>
16                 <swagger.directory>${basedir}/target/main/resources/META-INF/resources/swagger-ui/dist</swagger.directory>
17                 <swagger.annotations.version>1.5.8</swagger.annotations.version>
18                 <java.version>1.8</java.version>
19                 <springboot.version>2.0.4.RELEASE</springboot.version>
20                 <mariadb.connector.version>2.1.1</mariadb.connector.version>
21                 <docker.registry>TBD:5100</docker.registry>
22                 <serviceArtifactName>vlantagapi</serviceArtifactName>
23
24                 <!-- Sonar -->
25                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
26                 <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
27                 <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
28                 <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
29                 <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
30                 <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
31                 <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
32                 <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
33                 <sonar.language>java</sonar.language>
34                 <ilib.version>2.0.7</ilib.version>
35                 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
36                 <docker.push.phase>deploy</docker.push.phase>
37                 <docker.verbose>true</docker.verbose>
38                 <ccsdk.project.version>${project.version}</ccsdk.project.version>
39         </properties>
40
41         <parent>
42                 <groupId>org.onap.ccsdk.parent</groupId>
43                 <artifactId>spring-boot-starter-parent</artifactId>
44                 <version>1.2.0-SNAPSHOT</version>
45                 <relativePath />
46         </parent>
47
48
49         <dependencies>
50                 <dependency>
51                         <groupId>org.springframework.boot</groupId>
52                         <artifactId>spring-boot-starter-jersey</artifactId>
53                 </dependency>
54                 <dependency>
55                         <groupId>org.springframework.boot</groupId>
56                         <artifactId>spring-boot-starter-web</artifactId>
57                 </dependency>
58                 <dependency>
59                         <groupId>org.springframework.boot</groupId>
60                         <artifactId>spring-boot-starter-test</artifactId>
61                         <scope>test</scope>
62                 </dependency>
63
64                 <dependency>
65                         <groupId>org.springframework.boot</groupId>
66                         <artifactId>spring-boot-starter-actuator</artifactId>
67                 </dependency>
68
69                 <dependency>
70                         <groupId>org.springframework.boot</groupId>
71                         <artifactId>spring-boot-starter-security</artifactId>
72                         <version>2.0.1.RELEASE</version>
73                 </dependency>
74
75                 <dependency>
76                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
77                         <artifactId>resource-assignment-provider</artifactId>
78                         <version>${ccsdk.sli.adaptors.version}</version>
79                         <exclusions>
80                                 <exclusion>
81                                         <groupId>org.slf4j</groupId>
82                                         <artifactId>slf4j-simple</artifactId>
83                                 </exclusion>
84                         </exclusions>
85                 </dependency>
86
87                 <dependency>
88                         <groupId>org.mariadb.jdbc</groupId>
89                         <artifactId>mariadb-java-client</artifactId>
90                         <version>${mariadb.connector.version}</version>
91                 </dependency>
92
93                 <dependency>
94                         <groupId>io.swagger</groupId>
95                         <artifactId>swagger-annotations</artifactId>
96                         <version>1.5.8</version>
97                 </dependency>
98         </dependencies>
99
100
101
102         <build>
103                 <plugins>
104             <plugin>
105                 <groupId>org.codehaus.groovy.maven</groupId>
106                 <artifactId>gmaven-plugin</artifactId>
107                 <version>1.0</version>
108                 <executions>
109                     <execution>
110                         <phase>validate</phase>
111                         <goals>
112                             <goal>execute</goal>
113                         </goals>
114                         <configuration>
115                             <source>
116                                 println project.properties['ccsdk.project.version'];
117                                 def versionArray;
118                                 if (project.properties['ccsdk.project.version'] != null ) {
119                                     versionArray = project.properties['ccsdk.project.version'].split('\\.');
120                                 }
121
122                                 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
123                                 {
124                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
125                                 } else {
126                                     project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
127                                 }
128
129                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
130                             </source>
131                         </configuration>
132                     </execution>
133                 </executions>
134             </plugin>
135                     <plugin>
136                 <groupId>org.apache.maven.plugins</groupId>
137                 <artifactId>maven-surefire-plugin</artifactId>
138                 <configuration>
139                     <argLine>${surefireArgLine}</argLine>
140                     <skipTests>${skip.unit.tests}</skipTests>
141                     <excludes>
142                         <exclude>**/IT*.java</exclude>
143                     </excludes>
144                 </configuration>
145             </plugin>
146                         <plugin>
147                                 <groupId>org.jacoco</groupId>
148                                 <artifactId>jacoco-maven-plugin</artifactId>
149                                 <version>0.7.5.201505241946</version>
150                                 <executions>
151                                         <!-- Prepares the property pointing to the JaCoCo runtime agent which 
152                                                 is passed as VM argument when Maven the Surefire plugin is executed. -->
153                                         <execution>
154                                                 <id>pre-unit-test</id>
155                                                 <goals>
156                                                         <goal>prepare-agent</goal>
157                                                 </goals>
158                                                 <configuration>
159                                                         <!-- Sets the path to the file which contains the execution data. -->
160                                                         <destFile>${sonar.jacoco.reportPath}</destFile>
161                                                         <propertyName>surefireArgLine</propertyName>
162                                                 </configuration>
163                                         </execution>
164                                         <!-- Ensures that the code coverage report for unit tests is created 
165                                                 after unit tests have been run. -->
166                                         <execution>
167                                                 <id>post-unit-test</id>
168                                                 <phase>test</phase>
169                                                 <goals>
170                                                         <goal>report</goal>
171                                                 </goals>
172                                                 <configuration>
173                                                         <!-- Sets the path to the file which contains the execution data. -->
174                                                         <dataFile>${sonar.jacoco.reportPath}</dataFile>
175                                                         <!-- Sets the output directory for the code coverage report. -->
176                                                         <outputDirectory>${jacoco.path}</outputDirectory>
177                                                 </configuration>
178                                         </execution>
179                                 </executions>
180                         </plugin>
181                         <plugin>
182                                 <groupId>com.github.kongchen</groupId>
183                                 <artifactId>swagger-maven-plugin</artifactId>
184                                 <version>3.1.7</version>
185                                 <configuration>
186                                         <apiSources>
187                                                 <apiSource>
188                                                         <schemes>
189                                                                 <scheme>http</scheme>
190                                                                 <scheme>https</scheme>
191                                                         </schemes>
192                                                         <host>localhost:9091</host>
193                                                         <locations>
194                                                                 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
195                                                                 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
196                                                         </locations>
197                                                         <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
198                                                         <basePath>/vlantagapi</basePath>
199                                                         <info>
200                                                                 <title>${project.artifactId} Service</title>
201                                                                 <version>${project.version}</version>
202                                                         </info>
203                                                         <securityDefinitions>
204                                                                 <securityDefinition>
205                                                                         <name>basicAuth</name>
206                                                                         <type>basic</type>
207                                                                 </securityDefinition>
208                                                         </securityDefinitions>
209                                                         <swaggerDirectory>${swagger.directory}</swaggerDirectory>
210                                                 </apiSource>
211                                         </apiSources>
212                                 </configuration>
213                                 <executions>
214                                         <execution>
215                                                 <!-- <phase>compile</phase> -->
216                                                 <phase>package</phase>
217                                                 <goals>
218                                                         <goal>generate</goal>
219                                                 </goals>
220                                         </execution>
221                                 </executions>
222                         </plugin>
223                         <plugin>
224                                 <groupId>com.spotify</groupId>
225                                 <artifactId>docker-maven-plugin</artifactId>
226                                 <version>0.4.11</version>
227                                 <configuration>
228                                         <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
229                                         <dockerDirectory>src/main/docker</dockerDirectory>
230                                         <serverId>docker-hub</serverId>
231                                         <registryUrl>https://${docker.registry}</registryUrl>
232                                         <imageTags>
233                                                 <imageTag>${project.version}</imageTag>
234                                                 <imageTag>latest</imageTag>
235                                         </imageTags>
236                                         <forceTags>true</forceTags>
237                                         <resources>
238                                                 <resource>
239                                                         <targetPath>/</targetPath>
240                                                         <directory>${project.build.directory}</directory>
241                                                         <include>${project.build.finalName}.jar</include>
242                                                 </resource>
243                                         </resources>
244                                 </configuration>
245                         </plugin>
246                         <plugin>
247                                 <groupId>org.springframework.boot</groupId>
248                                 <artifactId>spring-boot-maven-plugin</artifactId>
249                                 <version>${springboot.version}</version>
250                                 <executions>
251                                         <execution>
252                                                 <goals>
253                                                         <goal>repackage</goal>
254                                                 </goals>
255                                         </execution>
256                                 </executions>
257                         </plugin>
258                 </plugins>
259         </build>
260
261         <profiles>
262                 <profile>
263                         <id>docker</id>
264                         <build>
265                                 <plugins>
266                                         <plugin>
267                                                 <groupId>com.spotify</groupId>
268                                                 <artifactId>docker-maven-plugin</artifactId>
269                                                 <version>0.4.11</version>
270                                                 <configuration>
271                                                         <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
272                                                         <dockerDirectory>src/main/docker</dockerDirectory>
273                                                         <serverId>docker-hub</serverId>
274                                                         <registryUrl>https://${docker.registry}</registryUrl>
275                                                         <imageTags>
276                                                                 <imageTag>${project.version}</imageTag>
277                                                                 <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
278                                                             <imageTag>${project.docker.latesttag.version}</imageTag>
279                                                         </imageTags>
280                                                         <forceTags>true</forceTags>
281                                                         <resources>
282                                                                 <resource>
283                                                                         <targetPath>/</targetPath>
284                                                                         <directory>${project.build.directory}</directory>
285                                                                         <include>${project.build.finalName}.jar</include>
286                                                                 </resource>
287                                                         </resources>
288                                                 </configuration>
289                                         </plugin>
290                                 </plugins>
291                         </build>
292                 </profile>
293         </profiles>
294
295
296 </project>