Added Junits
[portal.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>0.1.1</version>
10                 <relativePath />
11         </parent>
12
13         <groupId>org.onap.portal</groupId>
14         <artifactId>onap-portal-parent</artifactId>
15         <version>2.2.0</version>
16         <packaging>pom</packaging>
17         <name>portal</name>
18
19         <modules>
20                 <!-- This parent POM names only ONAP projects -->
21                 <module>ecomp-portal-BE-common</module>
22                 <module>ecomp-portal-BE-os</module>
23                 <module>ecomp-portal-FE-os</module>
24                 <module>ecomp-portal-widget-ms</module>
25         </modules>
26
27         <properties>
28                 <!-- Jenkins should invoke mvn with argument -Dbuild.number=${BUILD_NUMBER} -->
29                 <build.number>0</build.number>
30                 <epsdk.version>2.1.0</epsdk.version>
31                 <springframework.version>4.2.2.RELEASE</springframework.version>
32                 <hibernate.version>4.3.11.Final</hibernate.version>
33                 <fasterxml.version>2.7.4</fasterxml.version>
34                 <eelf.version>1.0.0</eelf.version>
35                 <!-- NOT provided by OParent, unfortunately -->
36                 <jacocoVersion>0.7.6.201602180812</jacocoVersion>
37                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38                 <encoding>UTF-8</encoding>
39                 <sonar.exclusions>**/scripts/**/*,**.js</sonar.exclusions>
40                 <sonar.test.exclusions>**/test/**/*,**/tests/**/*</sonar.test.exclusions>
41         </properties>
42
43         <!-- Specify the repositories here to avoid coordination of ~/.m2/settings.xml 
44                 files among developers. Use values (not properties) so oparent can be resolved. -->
45         <repositories>
46                 <repository>
47                         <id>onap-releases</id>
48                         <name>ONAP - Release Repository</name>
49                         <url>https://nexus.onap.org/content/repositories/releases</url>
50                 </repository>
51                 <repository>
52                         <id>onap-staging</id>
53                         <name>ONAP - Staging Repository</name>
54                         <url>https://nexus.onap.org/content/repositories/staging</url>
55                 </repository>
56                 <repository>
57                         <id>onap-snapshots</id>
58                         <name>ONAP - Snapshot Repository</name>
59                         <url>https://nexus.onap.org/content/repositories/snapshots</url>
60                 </repository>
61                 <repository>
62                         <id>onap-public</id>
63                         <url>https://nexus.onap.org/content/groups/public</url>
64                 </repository>
65         </repositories>
66
67         <!-- Specify the repositories here to avoid coordination of ~/.m2/settings.xml 
68                 files among all developers. -->
69         <pluginRepositories>
70                 <pluginRepository>
71                         <id>onap-plugin-release</id>
72                         <url>https://nexus.onap.org/content/repositories/releases/</url>
73                 </pluginRepository>
74                 <pluginRepository>
75                         <id>onap-plugin-staging</id>
76                         <url>https://nexus.onap.org/content/repositories/staging/</url>
77                 </pluginRepository>
78                 <pluginRepository>
79                         <id>onap-plugin-snapshots</id>
80                         <url>https://nexus.onap.org/content/repositories/snapshots/</url>
81                 </pluginRepository>
82         </pluginRepositories>
83
84         <profiles>
85                 <!-- disable doclint, a new feature in Java 8, when generating javadoc -->
86                 <profile>
87                         <id>doclint-java8-disable</id>
88                         <activation>
89                                 <jdk>[1.8,)</jdk>
90                         </activation>
91                         <build>
92                                 <plugins>
93                                         <plugin>
94                                                 <groupId>org.apache.maven.plugins</groupId>
95                                                 <artifactId>maven-javadoc-plugin</artifactId>
96                                                 <version>3.0.0-M1</version>
97                                                 <configuration>
98                                                         <additionalparam>-Xdoclint:none</additionalparam>
99                                                 </configuration>
100                                         </plugin>
101                                 </plugins>
102                         </build>
103                 </profile>
104         </profiles>
105
106         <build>
107                 <pluginManagement>
108                         <plugins>
109                                 <!-- Silence Eclipse m2e warnings -->
110                                 <plugin>
111                                         <groupId>org.eclipse.m2e</groupId>
112                                         <artifactId>lifecycle-mapping</artifactId>
113                                         <version>1.0.0</version>
114                                         <configuration>
115                                                 <lifecycleMappingMetadata>
116                                                         <pluginExecutions>
117                                                                 <pluginExecution>
118                                                                         <pluginExecutionFilter>
119                                                                                 <groupId>org.apache.maven.plugins</groupId>
120                                                                                 <artifactId>maven-checkstyle-plugin</artifactId>
121                                                                                 <versionRange>2.17,)</versionRange>
122                                                                                 <goals>
123                                                                                         <goal>check</goal>
124                                                                                 </goals>
125                                                                         </pluginExecutionFilter>
126                                                                         <action>
127                                                                                 <ignore />
128                                                                         </action>
129                                                                 </pluginExecution>
130                                                         </pluginExecutions>
131                                                 </lifecycleMappingMetadata>
132                                         </configuration>
133                                 </plugin>
134                                 <plugin>
135                                         <artifactId>maven-compiler-plugin</artifactId>
136                                         <version>3.1</version>
137                                         <configuration>
138                                                 <source>1.8</source>
139                                                 <target>1.8</target>
140                                         </configuration>
141                                 </plugin>
142                                 <!-- maven-site-plugin config is provided by OParent -->
143                                 <plugin>
144                                         <groupId>org.apache.maven.plugins</groupId>
145                                         <artifactId>maven-site-plugin</artifactId>
146                                         <version>3.6</version>
147                                         <dependencies>
148                                                 <dependency>
149                                                         <groupId>org.apache.maven.wagon</groupId>
150                                                         <artifactId>wagon-webdav-jackrabbit</artifactId>
151                                                         <version>2.10</version>
152                                                 </dependency>
153                                         </dependencies>
154                                 </plugin>
155                         </plugins>
156                 </pluginManagement>
157                 <plugins>
158                         <!-- Jacoco -->
159                         <plugin>
160                                 <groupId>org.jacoco</groupId>
161                                 <artifactId>jacoco-maven-plugin</artifactId>
162                                 <!-- Override OParent version -->
163                                 <version>${jacocoVersion}</version>
164                                 <executions>
165                                         <!-- disable jacoco executions from oparent -->
166                                         <execution>
167                                                 <id>pre-unit-test</id>
168                                                 <phase>none</phase>
169                                         </execution>
170                                         <execution>
171                                                 <id>post-unit-test</id>
172                                                 <phase>none</phase>
173                                         </execution>
174                                         <execution>
175                                                 <id>pre-integration-test</id>
176                                                 <phase>none</phase>
177                                         </execution>
178                                         <execution>
179                                                 <id>post-integration-test</id>
180                                                 <phase>none</phase>
181                                         </execution>
182                                         <!-- Order matters -->
183                                         <execution>
184                                                 <id>portal-prepare-agent</id>
185                                                 <goals>
186                                                         <goal>prepare-agent</goal>
187                                                 </goals>
188                                                 <configuration>
189                                                         <destFile>${sonar.jacoco.reportPath}</destFile>
190                                                 </configuration>
191                                         </execution>
192                                         <!-- offline instrumentation for PowerMock -->
193                                         <execution>
194                                                 <id>portal-offline-instrument</id>
195                                                 <goals>
196                                                         <goal>instrument</goal>
197                                                 </goals>
198                                         </execution>
199                                         <execution>
200                                                 <id>portal-restore-instrumented-classes</id>
201                                                 <phase>test</phase>
202                                                 <goals>
203                                                         <goal>restore-instrumented-classes</goal>
204                                                 </goals>
205                                         </execution>
206                                         <execution>
207                                                 <id>portal-post-unit-test</id>
208                                                 <phase>test</phase>
209                                                 <goals>
210                                                         <goal>report</goal>
211                                                 </goals>
212                                                 <configuration>
213                                                         <dataFile>${sonar.jacoco.reportPath}</dataFile>
214                                                         <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
215                                                 </configuration>
216                                         </execution>
217                                 </executions>
218                         </plugin>
219
220                         <plugin>
221                                 <groupId>org.apache.maven.plugins</groupId>
222                                 <artifactId>maven-surefire-plugin</artifactId>
223                                 <configuration>
224                                         <systemPropertyVariables>
225                                                 <jacoco-agent.destfile>${project.build.directory}/code-coverage/jacoco-ut.exec</jacoco-agent.destfile>
226                                         </systemPropertyVariables>
227                                 </configuration>
228                         </plugin>
229                         <!-- No deployment step for this project -->
230                         <plugin>
231                                 <groupId>org.apache.maven.plugins</groupId>
232                                 <artifactId>maven-deploy-plugin</artifactId>
233                                 <!-- version managed by oparent <version>2.8</version> -->
234                                 <configuration>
235                                         <skip>true</skip>
236                                 </configuration>
237                         </plugin>
238                         <plugin>
239                                 <groupId>org.codehaus.mojo</groupId>
240                                 <artifactId>sonar-maven-plugin</artifactId>
241                                 <version>3.0.2</version>
242                         </plugin>
243                 </plugins>
244         </build>
245
246         <distributionManagement>
247                 <!-- oparent.version defines snapshot and release repositories -->
248                 <site>
249                         <id>ecomp-site</id>
250                         <url>dav:https://nexus.onap.org/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</url>
251                 </site>
252         </distributionManagement>
253 </project>