Add distribution management to pom for deploy
[aai/aai-service.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
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/xsd/maven-4.0.0.xsd">
3         <modelVersion>4.0.0</modelVersion>
4
5         <parent>
6                 <artifactId>ajsc-archetype-parent</artifactId>
7                 <groupId>com.att.ajsc</groupId>
8                 <version>2.0.0</version>
9         </parent>
10         <groupId>org.openecomp.aai.aai-service</groupId>
11         <artifactId>aai-service</artifactId>
12         <version>1.0.0-SNAPSHOT</version>
13         <name>aai</name>
14         <packaging>pom</packaging>
15         <modules>
16                 <module>aai-schema</module>
17                 <module>annotations</module>
18                 <module>ajsc-aai</module>
19         </modules>
20         <properties>
21                 <maven.compiler.target>1.8</maven.compiler.target>
22                 <maven.compiler.source>1.8</maven.compiler.source>
23                 <module.ajsc.namespace.name>ActiveAndAvailableInventory-CloudNetwork</module.ajsc.namespace.name>
24                 <module.ajsc.namespace.version>v1</module.ajsc.namespace.version>
25                 <nexusproxy>https://nexus.openecomp.org</nexusproxy>
26         <ajscRuntimeVersion>2.0.0</ajscRuntimeVersion>
27
28                 <!-- This will be the Absolute Root of the Project and should contain NO 
29                         Versioning -->
30                 <absoluteDistFilesRoot>/opt/app/ajsc-aai</absoluteDistFilesRoot>
31
32                 <!-- For Versioning upon installation, add /${openecomp.release} to distFilesRoot. 
33                         For NO Versioning, leave as is -->
34                 <!-- example: /appl/${project.artifactId}/${openecomp.release}. Also, add 
35                         ${openecomp.release} to ${runAjscHome} for running locally. -->
36                 <distFilesRoot>/opt/app/ajsc-aai/${project.version}</distFilesRoot>
37                 <aaiAppHome>${basedir}/ajsc-aai</aaiAppHome>
38                 <runAjscHome>${aaiAppHome}/target/swm/package/nix/dist_files${distFilesRoot}</runAjscHome>
39
40                 <!-- For SOA Cloud Installation -->
41                 <installOwnerUser>aaiadmin</installOwnerUser>
42                 <installOwnerGroup>aaiadmin</installOwnerGroup>
43                 <ownerManagementGroup>org.openecomp.aai.dev</ownerManagementGroup>
44
45                 <!-- Port Selection. A value of 0 will allow for dynamic port selection. 
46                         For local testing, you may choose to hardcode this value to something like 
47                         8080 -->
48                 <serverPort>8080</serverPort>
49                 <sslport>8443</sslport>
50
51                 <testRouteOffer>workstation</testRouteOffer>
52                 <testEnv>DEV</testEnv>
53
54                 <!-- For using CXF with Maven -->
55                 <cxf.version>3.0.4</cxf.version>
56         </properties>
57         <distributionManagement>
58                 <repository>
59                         <id>ecomp-releases</id>
60                         <name>ECOMP Release Repository</name>
61                         <url>${nexusproxy}/content/repositories/releases/</url>
62                 </repository>
63                 <snapshotRepository>
64                         <id>ecomp-snapshots</id>
65                         <name>ECOMP Snapshot Repository</name>
66                         <url>${nexusproxy}/content/repositories/snapshots/</url>
67                 </snapshotRepository>
68         </distributionManagement>
69         
70                 <!-- Plugins and repositories -->
71           <pluginRepositories>
72                 <pluginRepository>
73                            <id>central</id>
74                           <url>http://repo1.maven.org/maven2</url>
75                    </pluginRepository>
76                   <pluginRepository>
77                           <id>EvoSuite</id>
78                         <name>EvoSuite Repository</name>
79                          <url>http://www.evosuite.org/m2</url>
80                   </pluginRepository>
81           </pluginRepositories>
82            <repositories>
83                  <repository>
84                           <id>AJSC</id>
85                           <name>AJSC repository</name>
86                           <url>https://mvnrepository.com/artifact/com.att.ajsc</url>
87                   </repository>
88                    <repository>
89                           <id>restlet</id>
90                           <name>maven reslet</name>
91                           <url>https://maven.restlet.com/</url>
92                   </repository>
93                   
94                    <repository>
95                           <id>central</id>
96                           <name>Maven 2 repository 2</name>
97                           <url>http://repo2.maven.org/maven2/</url>
98                   </repository>
99               <repository>
100                          <id>ecomp-releases</id>
101                           <name>ECOMP Release Repository</name>
102                          <url>${nexusproxy}/content/repositories/releases/</url>
103                   </repository>
104                 <repository>
105                     <id>ecomp-staging</id>
106                     <name>ECOMP Staging Repository</name>
107                     <url>${nexusproxy}/content/repositories/staging/</url>
108                 </repository>
109                   <repository>
110                          <id>ecomp-snapshots</id>
111                           <name>ECOMP Snapshot Repository</name>
112                          <url>https://nexus.openecomp.org/content/repositories/snapshots/</url>
113                   </repository>
114
115           </repositories>
116         
117
118         <!-- The standard build tasks for this project are inherited from the parent. 
119                 Please do not override the build tasks. However tasks and/or profiles can 
120                 be included here as well as additional dependencies for your service. Any 
121                 runtime or compile scope dependencies will be copied to the INSTALLATION_PATH/extJars 
122                 folder and will be made available on the AJSC classpath for your service. 
123                 Please, NOTE: DME2 and CSM related dependencies are EXTERNALIZED within the 
124                 CSI environment. Therefore, they are provided within this project as "provided" 
125                 dependencies. In order for the AJSC to run properly, locally, the CSM and 
126                 DME2 dependencies will be copied into the target/commonLibs folder and will 
127                 be made available to the classpath of the AJSC through the use of the system 
128                 property, "AJSC_EXTERNAL_LIB_FOLDERS". This system property needs to be set 
129                 in the "runAjsc" maven profile within the pom.xml (and, is defaulted to do 
130                 so).   -->
131         <dependencies>  
132                 <dependency>    
133                         <groupId>dom4j</groupId>
134                                   <artifactId>dom4j</artifactId>
135                                   <version>1.6.1</version>
136                                   <scope>provided</scope>
137                   </dependency>
138                   <dependency>
139                                   <groupId>com.att.aft</groupId>
140                                   <artifactId>dme2</artifactId>
141                                   <version>3.1.200</version>
142                                   <scope>provided</scope>
143                 </dependency>
144                 <dependency>
145                         <groupId>com.att.ajsc</groupId>
146                         <artifactId>ajsc-runner</artifactId>
147                         <version>${ajscRuntimeVersion}</version>
148                         <scope>runtime</scope>
149                 </dependency>
150                 <dependency>
151                         <groupId>com.att.ajsc</groupId>
152                         <artifactId>ajsc-core</artifactId>
153                         <version>${ajscRuntimeVersion}</version>
154                         <scope>provided</scope>
155                 </dependency>
156         </dependencies>
157         <profiles>
158                 <profile>
159                         <id>jenkins-properties</id>
160                         <activation>
161                                 <os>
162                                         <family>unix</family>
163                                 </os>
164                         </activation>
165                 </profile>
166                 <profile>
167                         <id>runAjsc</id>
168                         <build>
169                                 <defaultGoal>initialize</defaultGoal>
170                                 <plugins>
171
172                                         <plugin>
173                                                 <groupId>org.codehaus.mojo</groupId>
174                                                 <artifactId>exec-maven-plugin</artifactId>
175                                                 <version>1.3.2</version>
176                                                 <executions>
177                                                         <execution>
178                                                                 <id>run ajsc</id>
179                                                                 <phase>initialize</phase>
180                                                                 <goals>
181                                                                         <goal>java</goal>
182                                                                 </goals>
183                                                                 <configuration>
184                                                                         <!-- In order to better mimic a SOA cloud installation of AJSC (and 
185                                                                                 to help eliminate Maven/Eclipse/AJSC classpath issues that may be difficult 
186                                                                                 to diagnose), within this profile used to run locally, we are NOT including 
187                                                                                 project dependencies. These will be loaded by AJSC from $AJSC_HOME/extJars. 
188                                                                                 The only jar needed to run AJSC is the ajsc-runner.jar, and therefore is 
189                                                                                 the only dependency required by this profile to run locally. -->
190                                                                         <includeProjectDependencies>false</includeProjectDependencies>
191                                                                         <includePluginDependencies>true</includePluginDependencies>
192                                                                         <executable>java</executable>
193                                                                         <mainClass>com.att.ajsc.runner.Runner</mainClass>
194                                                                         <executableDependency>
195                                                                                 <groupId>com.att.ajsc</groupId>
196                                                                                 <artifactId>ajsc-runner</artifactId>
197                                                                         </executableDependency>
198
199                                                                         <environmentVariables>
200                                                                                 <AJSC_HOME>${runAjscHome}</AJSC_HOME>
201                                                                         </environmentVariables>
202                                                                         <additionalClasspathElements>
203                                                                                 <additionalClasspathElement>${runAjscHome}/extJars/logback-access-1.1.7.jar</additionalClasspathElement>
204                                                                                 <additionalClasspathElement>${runAjscHome}/extJars/logback-core-1.1.7.jar</additionalClasspathElement>
205                                                                                 <additionalClasspathElement>${runAjscHome}/extJars/aai-custom.jar</additionalClasspathElement>
206                                                                         </additionalClasspathElements>
207
208                                                                         <!-- Main AJSC System Properties below (necessary for proper startup) -->
209                                                                         <systemProperties>
210                                                                                 <systemProperty>
211                                                                                         <key>AJSC_HOME</key>
212                                                                                         <value>${runAjscHome}</value>
213                                                                                 </systemProperty>
214                                                                                 <systemProperty>
215                                                                                         <key>AFT_HOME</key>
216                                                                                         <value>${runAjscHome}/bundleconfig/</value>
217                                                                                 </systemProperty>
218                                                                                 <systemProperty>
219                                                                                         <key>AJSC_CONF_HOME</key>
220                                                                                         <value>${aaiAppHome}/bundleconfig-local</value>
221                                                                                 </systemProperty>
222                                                                                 <systemProperty>
223                                                                                         <key>logback.configurationFile</key>
224                                                                                         <value>${aaiAppHome}/ajsc-shared-config/etc/logback.xml</value>
225                                                                                 </systemProperty>
226                                                                                 <systemProperty>
227                                                                                         <key>AJSC_SHARED_CONFIG</key>
228                                                                                         <value>${aaiAppHome}/ajsc-shared-config</value>
229                                                                                 </systemProperty>
230                                                                                 <systemProperty>
231                                                                                         <key>file.separator</key>
232                                                                                         <value>/</value>
233                                                                                 </systemProperty>
234
235                                                                                 <!-- Please, NOTE: The following 2 system properties will normally 
236                                                                                         be set within the sys-props.properties file once deployed to a node. We are 
237                                                                                         setting them HERE to run locally to make more efficient use of maven variable 
238                                                                                         replacement for ${basedir} -->
239                                                                                 <!-- AJSC_EXTERNAL_LIB_FOLDERS represents the particular jars that 
240                                                                                         will be externalized on a CSI node. This includes dme2 and csm related artifact. -->
241                                                                                 <sysproperty>
242                                                                                         <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
243                                                                                         <value>${aaiAppHome}/target/commonLibs</value>
244                                                                                 </sysproperty>
245                                                                                 <!-- AJSC_EXTERNAL_PROPERTIES_FOLDERS represents the particular 
246                                                                                         files that may need to be added to the classpath. These files will be externalized 
247                                                                                         on a CSI node. This includes dme2 and csm related artifact (such as csm-config-app.properties). 
248                                                                                         Failure to have these files on the classpath may result in errors thrown 
249                                                                                         by csm framework. -->
250                                                                                 <sysproperty>
251                                                                                         <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
252                                                                                         <value>${aaiAppHome}/ajsc-shared-config/etc</value>
253                                                                                 </sysproperty>
254
255                                                                                 <systemProperty>
256                                                                                         <key>AJSC_SERVICE_NAMESPACE</key>
257                                                                                         <value>${module.ajsc.namespace.name}</value>
258                                                                                 </systemProperty>
259                                                                                 <systemProperty>
260                                                                                         <key>AJSC_SERVICE_VERSION</key>
261                                                                                         <value>${module.ajsc.namespace.version}</value>
262                                                                                 </systemProperty>
263                                                                                 <systemProperty>
264                                                                                         <key>SOACLOUD_SERVICE_VERSION</key>
265                                                                                         <value>${project.version}</value>
266                                                                                 </systemProperty>
267                                                                                 <systemProperty>
268                                                                                         <key>server.port</key>
269                                                                                         <value>${serverPort}</value>
270                                                                                 </systemProperty>
271                                                                         </systemProperties>
272
273                                                                         <!-- Command Line Arguments to add to the java command. Here, you 
274                                                                                 can specify the port as well as the Context you want your service to run 
275                                                                                 in. Use context=/ to run in an unnamed Context (Root Context). The default 
276                                                                                 configuration of the AJSC is to run under the / Context. Setting the port 
277                                                                                 here can aid during the development phase of your service. However, you can 
278                                                                                 leave this argument out entirely, and the AJSC will default to using an Ephemeral 
279                                                                                 port. -->
280                                                                         <arguments>
281                                                                                 <argument>context=/</argument>
282                                                                                 <argument>port=${serverPort}</argument>
283                                                                                 <argument>sslport=${sslport}</argument>
284                                                                         </arguments>
285                                                                 </configuration>
286                                                         </execution>
287                                                 </executions>
288                                                 <configuration>
289                                                         <executable>java</executable>
290                                                 </configuration>
291                                                 <dependencies>
292                                                         <dependency>
293                                                                 <groupId>com.att.ajsc</groupId>
294                                                                 <artifactId>ajsc-runner</artifactId>
295                                                                 <version>${ajscRuntimeVersion}</version>
296                                                         </dependency>
297                                                 </dependencies>
298                                         </plugin>
299                                 </plugins>
300                         </build>
301                 </profile>
302         </profiles>
303         <build>
304         <plugins>
305                 <!-- license plugin -->         
306             <plugin>
307             <groupId>org.codehaus.mojo</groupId>
308             <artifactId>license-maven-plugin</artifactId>
309             <version>1.12</version>
310             <configuration>
311                 <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
312                 <licenseName>apache_v2</licenseName>
313                 <inceptionYear>2017</inceptionYear>
314                 <organizationName>AT&amp;T Intellectual Property. All rights reserved.</organizationName>
315                 <projectName>org.openecomp.aai</projectName>
316                 <canUpdateCopyright>true</canUpdateCopyright>
317                 <canUpdateDescription>true</canUpdateDescription>
318                 <canUpdateLicense>true</canUpdateLicense>
319                 <emptyLineAfterHeader>true</emptyLineAfterHeader>
320                 <processStartTag>============LICENSE_START=======================================================</processStartTag>
321                 <processEndTag>============LICENSE_END=========================================================</processEndTag>
322                 <sectionDelimiter>================================================================================</sectionDelimiter>
323                 <includes>
324                         <include>**/*.java</include>
325                         <include>**/*.ksh</include>
326                         <include>**/*.sh</include>
327                         <include>**/*.ftl</include>
328                         <include>**/*.xsd</include>
329                         <include>**/*.xjb</include>
330                         <include>**/aai*.xml</include>
331                         <include>**/*logback*.xml</include>
332                         <include>**/*aaiconfig*.properties</include>
333                         <include>**/*titan*.properties</include>
334                 </includes>          
335                 </configuration>
336             <executions>
337                 <execution>
338                      <id>first</id>
339                       <goals>
340                           <goal>update-file-header</goal>
341                       </goals>
342                           <phase>process-sources</phase>
343                  </execution>
344               </executions>
345            </plugin>
346         <plugin>
347                         <groupId>org.codehaus.mojo</groupId>
348                         <artifactId>sonar-maven-plugin</artifactId>
349                         <version>3.2</version>
350                 </plugin>
351         <plugin>
352             <groupId>org.apache.maven.plugins</groupId>
353             <artifactId>maven-site-plugin</artifactId>
354             <version>3.6</version>
355             <dependencies>
356               <dependency>
357                 <groupId>org.apache.maven.wagon</groupId>
358                 <artifactId>wagon-webdav-jackrabbit</artifactId>
359                 <version>2.10</version>
360               </dependency>
361             </dependencies>
362         </plugin>
363         <plugin>
364                 <groupId>org.apache.maven.plugins</groupId>
365                 <artifactId>maven-deploy-plugin</artifactId>
366                 <executions>
367                         <execution>
368                         <id>default-deploy</id>
369                         <phase>none</phase>
370                         </execution>
371                         </executions>
372                 </plugin>        
373                 <plugin>
374                     <groupId>org.sonatype.plugins</groupId>
375                     <artifactId>nexus-staging-maven-plugin</artifactId>
376                     <version>1.6.7</version>
377                     <extensions>true</extensions>
378                     <configuration>
379                         <nexusUrl>${nexusproxy}</nexusUrl>
380                         <stagingProfileId>176c31dfe190a</stagingProfileId>
381                         <serverId>ecomp-staging</serverId>
382                     </configuration>
383                 </plugin>
384         </plugins>
385 </build>
386
387     <reporting>
388       <plugins>
389         <plugin>
390           <groupId>org.apache.maven.plugins</groupId>
391           <artifactId>maven-javadoc-plugin</artifactId>
392           <version>2.10.4</version>
393           <configuration>
394             <failOnError>false</failOnError>
395             <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
396             <docletArtifact>
397               <groupId>org.umlgraph</groupId>
398               <artifactId>umlgraph</artifactId>
399               <version>5.6</version>
400             </docletArtifact>
401             <additionalparam>-views</additionalparam>
402             <useStandardDocletOptions>true</useStandardDocletOptions>
403           </configuration>
404         </plugin>
405       </plugins>
406     </reporting>
407
408
409 </project>