update link to upper-constraints.txt
[aai/sparky-be.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"
3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4     <modelVersion>4.0.0</modelVersion>
5         
6     <parent>
7         <groupId>org.onap.oparent</groupId>
8         <artifactId>oparent</artifactId>
9         <version>2.0.0</version>
10     </parent>
11     
12     <groupId>org.onap.aai</groupId>
13     <artifactId>sparky-be</artifactId>
14     <version>2.0.4-SNAPSHOT</version>
15     <packaging>pom</packaging>
16     <name>aai-sparky-be</name>
17
18         <modules>
19                 <module>sparkybe-onap-service/pom.xml</module>
20                 <module>sparkybe-onap-application/pom.xml</module>
21         </modules>
22
23     <properties>
24         <sitePath>/content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version}</sitePath>
25         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
26          <portal.sdk.version>2.6.0</portal.sdk.version>
27
28         <sonar.jacoco.reportPath />
29         <sonar.jacoco.itReportPath />
30         <sonar.jacoco.reportMissing.force.zero />
31
32         <jacoco.line.coverage.limit>0.90</jacoco.line.coverage.limit>
33         <jacoco.version>0.8.5</jacoco.version>
34         <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
35         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
36         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
37         <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
38
39         <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
40
41         <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
42         <maven-compiler-plugin.source>11</maven-compiler-plugin.source>
43         <maven-compiler-plugin.target>11</maven-compiler-plugin.target>
44         <maven-compiler-plugin.test.source>11</maven-compiler-plugin.test.source>
45         <maven-compiler-plugin.test.target>11</maven-compiler-plugin.test.target>
46     </properties>
47
48         <dependencyManagement>
49         <dependencies>
50             <dependency>
51                 <groupId>org.onap.portal.sdk</groupId>
52                 <artifactId>epsdk-fw</artifactId>
53                 <version>${portal.sdk.version}</version>
54             </dependency>
55         </dependencies>
56     </dependencyManagement>
57
58     <!-- we don't need to deploy the top level pom project -->
59         <build>
60           <pluginManagement>
61             <plugins>
62                 <plugin>
63                     <groupId>org.apache.maven.plugins</groupId>
64                     <artifactId>maven-compiler-plugin</artifactId>
65                     <version>${maven-compiler-plugin.version}</version>
66                     <inherited>true</inherited>
67                     <configuration>
68                         <source>${maven-compiler-plugin.source}</source>
69                         <target>${maven-compiler-plugin.target}</target>
70                         <testSource>${maven-compiler-plugin.test.source}</testSource>
71                         <testTarget>${maven-compiler-plugin.test.target}</testTarget>
72                     </configuration>
73                 </plugin>
74                 <plugin>
75                     <groupId>org.apache.maven.plugins</groupId>
76                     <artifactId>maven-deploy-plugin</artifactId>
77                 </plugin>
78                 </plugins>
79               </pluginManagement>
80
81               <!-- once we connect aai-parent or oparent 3.0+ we can take out this
82                    whole section -->
83               <plugins>
84               <plugin>
85                 <groupId>org.jacoco</groupId>
86                 <artifactId>jacoco-maven-plugin</artifactId>
87                 <version>${jacoco.version}</version>
88                 <configuration>
89                   <!-- Note: This exclusion list should match <sonar.exclusions> property
90                        above -->
91                   <excludes>
92                     <exclude>**/gen/**</exclude>
93                     <exclude>**/generated-sources/**</exclude>
94                     <exclude>**/yang-gen/**</exclude>
95                     <exclude>**/pax/**</exclude>
96                     <exclude>org/onap/aai/babel/xml/generator/xsd/*</exclude>
97                   </excludes>
98                 </configuration>
99                 <executions>
100                   <!-- Prepares the property pointing to the JaCoCo runtime agent which
101                        is passed as VM argument when Maven the Surefire plugin is executed. -->
102                   <execution>
103                     <id>pre-unit-test</id>
104                     <goals>
105                       <goal>prepare-agent</goal>
106                     </goals>
107                     <configuration>
108                       <!-- Sets the path to the file which contains the execution data
109                            . -->
110                       <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
111                       <!-- Sets the name of the property containing the settings for JaCoCo
112                            runtime agent. -->
113                       <propertyName>surefireArgLine</propertyName>
114                     </configuration>
115                   </execution>
116                   <!-- Ensures that the code coverage report for unit tests is created
117                        after unit tests have been run. -->
118                   <execution>
119                     <id>post-unit-test</id>
120                     <phase>test</phase>
121                     <goals>
122                       <goal>report</goal>
123                     </goals>
124                     <configuration>
125                       <!-- Sets the path to the file which contains the execution data
126                            . -->
127                       <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
128                       <!-- Sets the output directory for the code coverage report. -->
129                       <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
130                     </configuration>
131                   </execution>
132                   <execution>
133                     <id>pre-integration-test</id>
134                     <phase>pre-integration-test</phase>
135                     <goals>
136                       <goal>prepare-agent</goal>
137                     </goals>
138                     <configuration>
139                       <!-- Sets the path to the file which contains the execution data
140                            . -->
141                       <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
142                       <!-- Sets the name of the property containing the settings for JaCoCo
143                            runtime agent. -->
144                       <propertyName>failsafeArgLine</propertyName>
145                     </configuration>
146                   </execution>
147                   <!-- Ensures that the code coverage report for integration tests after
148                        integration tests have been run. -->
149                   <execution>
150                     <id>post-integration-test</id>
151                     <phase>post-integration-test</phase>
152                     <goals>
153                       <goal>report</goal>
154                     </goals>
155                     <configuration>
156                       <!-- Sets the path to the file which contains the execution data
157                            . -->
158                       <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
159                       <!-- Sets the output directory for the code coverage report. -->
160                       <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
161                     </configuration>
162                   </execution>
163                   <execution>
164                     <id>default-check</id>
165                     <goals>
166                       <goal>check</goal>
167                     </goals>
168                     <configuration>
169                       <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
170                       <rules>
171                         <rule implementation="org.jacoco.maven.RuleConfiguration">
172                           <element>BUNDLE</element>
173                           <limits>
174                             <limit implementation="org.jacoco.report.check.Limit">
175                               <counter>LINE</counter>
176                               <value>COVEREDRATIO</value>
177                               <minimum>${jacoco.line.coverage.limit}</minimum>
178                             </limit>
179                           </limits>
180                         </rule>
181                       </rules>
182                     </configuration>
183                   </execution>
184                 </executions>
185               </plugin>
186               <plugin>
187                 <groupId>org.apache.maven.plugins</groupId>
188                 <artifactId>maven-surefire-plugin</artifactId>
189                 <version>3.0.0-M4</version>
190                 <configuration>
191                   <!-- Sets the VM argument line used when unit tests are run. -->
192                   <argLine>${surefireArgLine}</argLine>
193                   <!-- Excludes integration tests when unit tests are run. -->
194                   <excludes>
195                     <exclude>**/IT*.java</exclude>
196                   </excludes>
197                 </configuration>
198               </plugin>
199               <plugin>
200                 <groupId>org.apache.maven.plugins</groupId>
201                 <artifactId>maven-failsafe-plugin</artifactId>
202                 <version>3.0.0-M4</version>
203                 <executions>
204                   <!-- Ensures that both integration-test and verify goals of the Failsafe
205                        Maven plugin are executed. -->
206                   <execution>
207                     <id>integration-tests</id>
208                     <goals>
209                       <goal>integration-test</goal>
210                       <goal>verify</goal>
211                     </goals>
212                     <configuration>
213                       <!-- Sets the VM argument line used when integration tests are run. -->
214                       <argLine>${failsafeArgLine}</argLine>
215                     </configuration>
216                   </execution>
217                 </executions>
218               </plugin>
219               <plugin>
220                 <groupId>org.sonarsource.scanner.maven</groupId>
221                 <artifactId>sonar-maven-plugin</artifactId>
222                 <version>${sonar.scanner.version}</version>
223               </plugin>
224               <!-- end removable sonar config, note the additional exclusion for babel above
225               -->
226             </plugins>
227
228
229         </build>
230         
231     <distributionManagement>
232        <repository>
233           <id>ecomp-releases</id>
234           <name>ECOMP Release Repository</name>
235           <url>${onap.nexus.url}/content/repositories/releases/</url>
236        </repository>
237        <snapshotRepository>
238           <id>ecomp-snapshots</id>
239           <name>ECOMP Snapshot Repository</name>
240           <url>${onap.nexus.url}/content/repositories/snapshots/</url>
241       </snapshotRepository>
242       <site>
243         <id>ecomp-site</id>
244         <url>dav:${onap.nexus.url}${sitePath}</url>
245       </site>
246    </distributionManagement>
247
248     <repositories>
249         <repository>
250             <id>central</id>
251             <name>Maven 2 repository 2</name>
252             <url>http://repo2.maven.org/maven2/</url>
253         </repository>
254         <repository>
255             <id>ecomp-releases</id>
256             <name>ECOMP Release Repository</name>
257             <url>${onap.nexus.url}/content/repositories/releases/</url>
258         </repository>
259         <repository>
260             <id>ecomp-staging</id>
261             <name>ECOMP Staging Repository</name>
262             <url>${onap.nexus.url}/content/repositories/staging/</url>
263         </repository>
264         <repository>
265             <id>ecomp-snapshots</id>
266             <name>ECOMP Snapshot Repository</name>
267             <url>${onap.nexus.url}/content/repositories/snapshots/</url>
268         </repository>
269     </repositories>
270         
271 </project>