Implement support for v10 model entities.
[aai/model-loader.git] / pom.xml
1 <!--
2      ============LICENSE_START=======================================================
3      MODEL LOADER SERVICE
4      ================================================================================
5      Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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      ============LICENSE_END=========================================================
19    -->
20
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23         <modelVersion>4.0.0</modelVersion>
24         
25         <parent>
26                 <artifactId>ajsc-archetype-parent</artifactId>
27                 <groupId>com.att.ajsc</groupId>
28                 <version>2.0.0</version>
29         </parent>
30         
31         <groupId>org.openecomp.aai.model-loader</groupId>
32         <artifactId>model-loader</artifactId>
33         <version>1.1.0-SNAPSHOT</version>
34         
35         <properties>
36                 <docker.location>${basedir}/target</docker.location>
37                 <module.ajsc.namespace.name>model-loader</module.ajsc.namespace.name>
38                 <module.ajsc.namespace.version>v1</module.ajsc.namespace.version>
39                 <ajscRuntimeVersion>2.0.0</ajscRuntimeVersion>
40                 <absoluteDistFilesRoot>/appl/${project.artifactId}</absoluteDistFilesRoot>
41                 <distFilesRoot>/appl/${project.artifactId}/${project.version}</distFilesRoot>
42                 <runAjscHome>${basedir}/target/swm/package/nix/dist_files${distFilesRoot}</runAjscHome>
43
44                 <!-- Port Selection. A value of 0 will allow for dynamic port selection. 
45                         For local testing, you may choose to hardcode this value to something like 
46                         8080 -->
47                 <serverPort>0</serverPort>
48                 <sslport>0</sslport>
49
50
51                 <!-- For SOA Cloud Installation -->
52                 <installOwnerUser>aaiadmin</installOwnerUser>
53                 <installOwnerGroup>aaiadmin</installOwnerGroup>
54                 <ownerManagementGroup>org.openecomp.aai.dev</ownerManagementGroup>
55
56                 <testRouteOffer>workstation</testRouteOffer>
57                 <testEnv>DEV</testEnv>
58
59                 <!-- Ecomp Version -->
60                 <ecomp.version>1.0.0</ecomp.version>
61
62                 <dependency.scope>provided</dependency.scope>
63                 <checkstyle.config.location>google_checks.xml</checkstyle.config.location>
64                 <maven.compiler.source>1.8</maven.compiler.source>
65                 <maven.compiler.target>1.8</maven.compiler.target>
66                <sonar.language>java</sonar.language>
67                <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
68                <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
69                <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
70                <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
71                <sonar.projectVersion>${project.version}</sonar.projectVersion>
72                <nexusproxy>https://nexus.onap.org</nexusproxy>
73         </properties>
74
75         <distributionManagement>
76                 <repository>
77                         <id>ecomp-releases</id>
78                         <name>ECOMP Release Repository</name>
79                         <url>${nexusproxy}/content/repositories/releases/</url>
80                 </repository>
81                 <snapshotRepository>
82                         <id>ecomp-snapshots</id>
83                         <name>ECOMP Snapshot Repository</name>
84                         <url>${nexusproxy}/content/repositories/snapshots/</url>
85                 </snapshotRepository>
86         </distributionManagement>
87         <dependencies>
88                 <dependency>
89                         <groupId>org.mockito</groupId>
90                         <artifactId>mockito-all</artifactId>
91                         <version>1.10.19</version>
92                         <scope>test</scope>
93                 </dependency>
94                 <dependency>
95                         <groupId>org.powermock</groupId>
96                         <artifactId>powermock-module-junit4</artifactId>
97                         <version>1.6.2</version>
98                         <scope>test</scope>
99                 </dependency>
100                 <dependency>
101                         <groupId>org.powermock</groupId>
102                         <artifactId>powermock-api-mockito</artifactId>
103                         <version>1.6.2</version>
104                         <scope>test</scope>
105                 </dependency>
106                 <dependency>
107                         <groupId>org.powermock</groupId>
108                         <artifactId>powermock-module-javaagent</artifactId>
109                         <version>1.6.2</version>
110                         <scope>test</scope>
111                 </dependency>
112                 <dependency>
113                         <groupId>org.powermock</groupId>
114                         <artifactId>powermock-module-junit4-rule-agent</artifactId>
115                         <version>1.6.2</version>
116                         <scope>test</scope>
117                 </dependency>
118                 <!-- xjc dependencies -->
119                 <dependency>
120                         <groupId>javax.xml.bind</groupId>
121                         <artifactId>jaxb-api</artifactId>
122                         <version>2.2.11</version>
123                 </dependency>
124                 <dependency>
125                         <groupId>com.sun.xml.bind</groupId>
126                         <artifactId>jaxb-impl</artifactId>
127                         <version>2.2.11</version>
128                 </dependency>
129                 <dependency>
130                         <groupId>com.sun.xml.bind</groupId>
131                         <artifactId>jaxb-core</artifactId>
132                         <version>2.2.11</version>
133                 </dependency>
134                 <dependency>
135                         <groupId>com.sun.xml.bind</groupId>
136                         <artifactId>jaxb-xjc</artifactId>
137                         <version>2.2.11</version>
138                 </dependency>
139                 <dependency>
140                         <groupId>org.eclipse.persistence</groupId>
141                         <artifactId>org.eclipse.persistence.moxy</artifactId>
142                         <version>2.6.2</version>
143                         <scope>compile</scope>
144                 </dependency>
145                 <dependency>
146                         <groupId>com.sun.jersey</groupId>
147                         <artifactId>jersey-client</artifactId>
148                         <version>1.18</version>
149                 </dependency>
150                 <!-- Common logging framework -->
151                 <dependency>
152                         <groupId>org.openecomp.aai.logging-service</groupId>
153                         <artifactId>common-logging</artifactId>
154                         <version>${ecomp.version}</version>
155                 </dependency>
156                 <dependency>
157                         <groupId>ch.qos.logback</groupId>
158                         <artifactId>logback-core</artifactId>
159                         <version>1.1.7</version>
160                 </dependency>
161
162                 <dependency>
163                         <groupId>org.openecomp.sdc</groupId>
164                     <artifactId>sdc-distribution-client</artifactId>
165                     <version>${ecomp.version}</version>
166                 </dependency>
167                 <dependency>
168                         <groupId>org.json</groupId>
169                         <artifactId>json</artifactId>
170                         <version>20131018</version>
171                 </dependency>
172                 
173                 <dependency>
174                     <groupId>org.eclipse.jetty</groupId>
175                     <artifactId>jetty-security</artifactId>
176                     <version>9.3.8.RC0</version>
177                 </dependency>
178                 
179         <dependency>
180             <groupId>org.springframework</groupId>
181             <artifactId>spring-webmvc</artifactId>
182             <version>4.0.0.RELEASE</version>
183         </dependency>
184         <dependency>
185             <groupId>jline</groupId>
186             <artifactId>jline</artifactId>
187             <version>2.12.1</version>
188         </dependency>
189         
190         </dependencies>
191         
192         <!-- Plugins and repositories -->
193           <pluginRepositories>
194                 <pluginRepository>
195                            <id>central</id>
196                           <url>http://repo1.maven.org/maven2</url>
197                    </pluginRepository>
198                   <pluginRepository>
199                           <id>EvoSuite</id>
200                         <name>EvoSuite Repository</name>
201                          <url>http://www.evosuite.org/m2</url>
202                   </pluginRepository>
203           </pluginRepositories>
204            <repositories>
205                    <repository>
206                           <id>central</id>
207                           <name>Maven 2 repository 2</name>
208                           <url>http://repo2.maven.org/maven2/</url>
209                   </repository>
210               <repository>
211                          <id>ecomp-releases</id>
212                           <name>ECOMP Release Repository</name>
213                           <url>${nexusproxy}/content/repositories/releases/</url>
214                   </repository>
215                   <repository>
216                          <id>ecomp-snapshots</id>
217                           <name>ECOMP Snapshot Repository</name>
218                           <url>${nexusproxy}/content/repositories/snapshots/</url>
219                   </repository>
220                   <repository>
221                          <id>ecomp-staging</id>
222                           <name>ECOMP Staging Repository</name>
223                           <url>${nexusproxy}/content/repositories/staging/</url>
224                   </repository>
225
226           </repositories>
227         
228         <profiles>
229                 <profile>
230                         <id>runAjsc</id>
231                         <build>
232                                 <defaultGoal>initialize</defaultGoal>
233                                 <plugins>
234                                         <plugin>
235                                                 <groupId>org.codehaus.mojo</groupId>
236                                                 <artifactId>exec-maven-plugin</artifactId>
237                                                 <version>1.3.2</version>
238                                                 <executions>
239                                                         <execution>
240                                                                 <phase>initialize</phase>
241                                                                 <goals>
242                                                                         <goal>java</goal>
243                                                                 </goals>
244                                                                 <configuration>
245                                                                         <includeProjectDependencies>false</includeProjectDependencies>
246                                                                         <includePluginDependencies>true</includePluginDependencies>
247                                                                         <executable>java</executable>
248                                                                         <mainClass>com.att.ajsc.runner.Runner</mainClass>
249                                                                         <executableDependency>
250                                                                                 <groupId>com.att.ajsc</groupId>
251                                                                                 <artifactId>ajsc-runner</artifactId>
252                                                                         </executableDependency>
253                                                                         <additionalClasspathElements>
254                                                                                 <additionalClasspathElement>${basedir}/ajsc-shared-config/etc</additionalClasspathElement>
255                                                                         </additionalClasspathElements>
256
257                                                                         <environmentVariables>
258                                                                                 <AJSC_HOME>${runAjscHome}</AJSC_HOME>
259                                                                         </environmentVariables>
260
261                                                                         <!-- Main AJSC System Properties below (necessary for proper startup) -->
262                                                                         <systemProperties>
263                                                                                 <systemProperty>
264                                                                                         <key>AJSC_HOME</key>
265                                                                                         <value>${runAjscHome}</value>
266                                                                                 </systemProperty>
267                                                                                 <systemProperty>
268                                                                                         <key>CONFIG_HOME</key>
269                                                                                         <value>${basedir}/appconfig-local/</value>
270                                                                                 </systemProperty>
271                                                                                 <systemProperty>
272                                                                                         <key>AJSC_CONF_HOME</key>
273                                                                                         <value>${basedir}/bundleconfig-local</value>
274                                                                                 </systemProperty>
275                                                                                 <systemProperty>
276                                                                                         <key>logback.configurationFile</key>
277                                                                                         <value>${basedir}/ajsc-shared-config/etc/logback.xml</value>
278                                                                                 </systemProperty>
279                                                                                 <systemProperty>
280                                                                                         <key>AJSC_SHARED_CONFIG</key>
281                                                                                         <value>${basedir}/ajsc-shared-config</value>
282                                                                                 </systemProperty>
283
284                                                                                 <sysproperty>
285                                                                                         <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
286                                                                                         <value>${basedir}/target/commonLibs</value>
287                                                                                 </sysproperty>
288                                                                                 <sysproperty>
289                                                                                         <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
290                                                                                         <value>${basedir}/ajsc-shared-config/etc</value>
291                                                                                 </sysproperty>
292                                                                                 <systemProperty>
293                                                                                         <key>AJSC_SERVICE_NAMESPACE</key>
294                                                                                         <value>${module.ajsc.namespace.name}</value>
295                                                                                 </systemProperty>
296                                                                                 <systemProperty>
297                                                                                         <key>AJSC_SERVICE_VERSION</key>
298                                                                                         <value>${module.ajsc.namespace.version}</value>
299                                                                                 </systemProperty>
300                                                                                 <systemProperty>
301                                                                                         <key>SOACLOUD_SERVICE_VERSION</key>
302                                                                                         <value>${project.version}</value>
303                                                                                 </systemProperty>
304                                                                                 <systemProperty>
305                                                                                         <key>server.port</key>
306                                                                                         <value>${serverPort}</value>
307                                                                                 </systemProperty>
308                                                                         </systemProperties>
309
310                                                                         <!-- Command Line Arguments to add to the java command. Here, you 
311                                                                                 can specify the port as well as the Context you want your service to run 
312                                                                                 in. Use context=/ to run in an unnamed Context (Root Context). The default 
313                                                                                 configuration of the AJSC is to run under the / Context. Setting the port 
314                                                                                 here can aid during the development phase of your service. However, you can 
315                                                                                 leave this argument out entirely, and the AJSC will default to using an Ephemeral 
316                                                                                 port. -->
317                                                                         <arguments>
318                                                                                 <argument>context=//</argument>
319                                                                                 <argument>port=${serverPort}</argument>
320                                                                                 <argument>sslport=${sslport}</argument>
321                                                                         </arguments>
322                                                                 </configuration>
323                                                         </execution>
324                                                 </executions>
325                                                 <configuration>
326                                                         <executable>java</executable>
327                                                 </configuration>
328                                                 <dependencies>
329                                                         <dependency>
330                                                                 <groupId>com.att.ajsc</groupId>
331                                                                 <artifactId>ajsc-runner</artifactId>
332                                                                 <version>${ajscRuntimeVersion}</version>
333                                                         </dependency>
334                                                 </dependencies>
335                                         </plugin>
336                                 </plugins>
337                         </build>
338                 </profile>
339         </profiles>
340         
341         <build>
342                 <plugins>
343                         <plugin>
344                                 <groupId>org.apache.maven.plugins</groupId>
345                                 <artifactId>maven-resources-plugin</artifactId>
346                                 <version>2.7</version>
347                                 <executions>
348                                         <execution>
349                                                 <id>copy-docker-file</id>
350                                                 <phase>package</phase>
351                                                 <goals>
352                                                         <goal>copy-resources</goal>
353                                                 </goals>
354                                                 <configuration>
355                                                         <outputDirectory>target</outputDirectory>
356                                                         <overwrite>true</overwrite>
357                                                         <resources>
358                                                                 <resource>
359                                                                         <directory>${basedir}/src/main/docker</directory>
360                                                                         <filtering>true</filtering>
361                                                                         <includes>
362                                                                                 <include>**/*</include>
363                                                                         </includes>
364                                                                 </resource>
365                                                                 <resource>
366                                                                         <directory>${basedir}/src/main/bin/</directory>
367                                                                 </resource>
368                                                         </resources>
369                                                 </configuration>
370                                         </execution>
371                                 </executions>
372                         </plugin>
373                         <plugin>
374                                 <groupId>com.spotify</groupId>
375                                 <artifactId>docker-maven-plugin</artifactId>
376                                 <version>0.4.11</version>
377                                 <configuration>         
378                                         <verbose>true</verbose>
379                                         <serverId>docker-hub</serverId>
380                                         <imageName>${docker.push.registry}/openecomp/${project.artifactId}</imageName>                                  
381                                         <dockerDirectory>${docker.location}</dockerDirectory>
382                                         <imageTags>
383                                                 <imageTag>latest</imageTag>
384                                         </imageTags>
385                                         <forceTags>true</forceTags>
386                                 </configuration>
387                         </plugin>
388                         <plugin>
389                                 <groupId>org.apache.maven.plugins</groupId>
390                                 <artifactId>maven-dependency-plugin</artifactId>
391                                 <version>2.5.1</version>
392                                 <executions>
393                                         <execution>
394                                                 <id>copy-agent</id>
395                                                 <phase>process-test-classes</phase>
396                                                 <goals>
397                                                         <goal>copy</goal>
398                                                 </goals>
399                                                 <configuration>
400                                                         <artifactItems>
401                                                                 <artifactItem>
402                                                                         <groupId>org.powermock</groupId>
403                                                                         <artifactId>powermock-module-javaagent</artifactId>
404                                                                         <version>1.6.2</version>
405                                                                         <outputDirectory>${project.build.directory}/agents</outputDirectory>
406                                                                         <destFileName>powermock-javaagent.jar</destFileName>
407                                                                 </artifactItem>
408                                                         </artifactItems>
409                                                 </configuration>
410                                         </execution>
411                                 </executions>
412                         </plugin>
413                         <plugin>
414                                 <groupId>org.apache.maven.plugins</groupId>
415                                 <artifactId>maven-surefire-plugin</artifactId>
416                                 <version>2.12.4</version>
417                                 <configuration>
418                                    <argLine>-noverify ${argLine}</argLine>
419                                 </configuration>
420                         </plugin>
421                         <plugin>
422                                 <groupId>org.codehaus.mojo</groupId>
423                                 <artifactId>jaxb2-maven-plugin</artifactId>
424                                 <version>2.2</version>
425                                 <executions>
426                                         <execution>
427                                                 <id>xjc</id>
428                                                 <goals>
429                                                         <goal>xjc</goal>
430                                                 </goals>
431                                         </execution>
432                                 </executions>
433                                 <configuration>
434                                         <clearOutputDir>false</clearOutputDir>
435                                         <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
436                                         <sources>
437                                                 <source>${project.basedir}/src/main/resources/schema</source>
438                                         </sources>
439                                         <addGeneratedAnnotation>true</addGeneratedAnnotation>
440                                 </configuration>
441                         </plugin>
442                         <plugin>
443                                 <groupId>org.apache.maven.plugins</groupId>
444                                 <artifactId>maven-compiler-plugin</artifactId>
445                                 <version>3.1</version>
446                         </plugin>
447                 
448                         <!-- Checkstyle plugin - used to report on compliance with -->
449                         <!-- the Google style guide. -->
450                         <plugin>
451                                 <groupId>org.apache.maven.plugins</groupId>
452                                 <artifactId>maven-site-plugin</artifactId>
453                                 <version>3.3</version>
454                                 <configuration>
455                                         <reportPlugins>
456                                                 <plugin>
457                                                         <groupId>org.apache.maven.plugins</groupId>
458                                                         <artifactId>maven-checkstyle-plugin</artifactId>
459                                                         <version>2.17</version>
460                                                         <reportSets>
461                                                                 <reportSet>
462                                                                         <reports>
463                                                                                 <report>checkstyle</report>
464                                                                         </reports>
465                                                                 </reportSet>
466                                                         </reportSets>
467                                                 </plugin>
468                                         </reportPlugins>
469                                 </configuration>
470                         </plugin>
471                         
472             <!-- license plugin -->
473             <plugin>
474                                 <groupId>com.mycila</groupId>
475                                 <artifactId>license-maven-plugin</artifactId>
476                                 <version>3.0</version>
477                                 <configuration>
478                                         <header>License.txt</header>
479                                         <includes>
480                                                 <include>src/main/java/**</include>
481                                                 <include>src/test/java/**</include>
482                                         </includes>
483                                 </configuration>
484                                 <executions>
485                                         <execution>
486                                                 <goals>
487                                                         <goal>format</goal>
488                                                 </goals>
489                                                 <phase>process-sources</phase>
490                                         </execution>
491                                 </executions>
492                         </plugin>
493
494              <plugin>
495                 <groupId>org.apache.maven.plugins</groupId>
496                 <artifactId>maven-deploy-plugin</artifactId>                    
497                 <configuration>
498                 <skip>true</skip>
499                 </configuration>
500              </plugin>
501              <plugin>
502               <groupId>org.codehaus.mojo</groupId>
503               <artifactId>sonar-maven-plugin</artifactId>
504               <version>3.2</version>
505             </plugin>
506             <plugin>
507               <groupId>org.jacoco</groupId>
508               <artifactId>jacoco-maven-plugin</artifactId>
509               <version>0.7.7.201606060606</version>
510               <configuration>
511                    <dumpOnExit>true</dumpOnExit>
512               </configuration>
513               <executions>
514                    <execution>
515                      <id>jacoco-initialize-unit-tests</id>
516                      <goals>
517                            <goal>prepare-agent</goal>
518                      </goals>
519                      <configuration>
520                            <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
521                            <!-- <append>true</append> -->
522                      </configuration>
523                    </execution>
524               </executions>
525             </plugin>
526             <plugin>
527                 <groupId>org.sonatype.plugins</groupId>
528                 <artifactId>nexus-staging-maven-plugin</artifactId>
529                 <version>1.6.7</version>
530                 <extensions>true</extensions>
531                 <configuration>
532                         <nexusUrl>${nexusproxy}</nexusUrl>
533                         <stagingProfileId>176c31dfe190a</stagingProfileId>
534                         <serverId>ecomp-staging</serverId>
535                 </configuration>
536             </plugin>
537
538                 </plugins>              
539         </build>
540         
541         
542 </project>