blob: b886639369e7cbf1f8ea7c4980a3cba17a994b38 [file] [log] [blame]
Carmelo Cascone87b893e2019-11-12 10:34:05 -08001<!--
2 ~ Copyright 2019-present Open Networking Foundation
3 ~
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
7 ~
8 ~ http://www.apache.org/licenses/LICENSE-2.0
9 ~
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
15 -->
16<project xmlns="http://maven.apache.org/POM/4.0.0"
17 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
19 <modelVersion>4.0.0</modelVersion>
20
21 <parent>
22 <groupId>org.onosproject</groupId>
23 <artifactId>onos-base</artifactId>
24 <version>1</version>
25 </parent>
26
27 <artifactId><!-- ONOS_ARTIFACT_BASE -->dependencies</artifactId>
28 <groupId><!-- ONOS_GROUP_ID --></groupId>
29 <packaging>pom</packaging>
30 <version><!-- ONOS_VERSION --></version>
31 <name>${project.artifactId}</name>
32 <description>ONOS shared dependencies for third-party apps</description>
33
34 <properties>
35 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36 <karaf.version>4.2.6</karaf.version>
37 <maven.version.min>3.3.9</maven.version.min>
38 <java.version.min><!-- JAVA_VERSION --></java.version.min>
39 <onos.version><!-- ONOS_VERSION --></onos.version>
40 </properties>
41
42 <dependencyManagement>
43 <dependencies>
44 <!-- DEPS_MGMT -->
45 </dependencies>
46 </dependencyManagement>
47
48 <dependencies>
49 <!-- DEPS -->
50 </dependencies>
51
52 <build>
53
54 <pluginManagement>
55 <plugins>
56 <plugin>
57 <groupId>org.apache.maven.plugins</groupId>
58 <artifactId>maven-compiler-plugin</artifactId>
59 <version>3.8.0</version>
60 <configuration>
61 <release>11</release>
62 </configuration>
63 <inherited>true</inherited>
64 </plugin>
65 <plugin>
66 <groupId>org.apache.maven.plugins</groupId>
67 <artifactId>maven-enforcer-plugin</artifactId>
68 <version>3.0.0-M2</version>
69 <executions>
70 <execution>
71 <id>enforce-maven</id>
72 <goals>
73 <goal>enforce</goal>
74 </goals>
75 <configuration>
76 <rules>
77 <requireMavenVersion>
78
79 <version>[${maven.version.min},)</version>
80 </requireMavenVersion>
81 </rules>
82 </configuration>
83 </execution>
84 <execution>
85 <id>enforce-java</id>
86 <goals>
87 <goal>enforce</goal>
88 </goals>
89 <configuration>
90 <rules>
91 <requireJavaVersion>
92 <version>[${java.version.min},)</version>
93 </requireJavaVersion>
94 </rules>
95 </configuration>
96 </execution>
97 </executions>
98 </plugin>
99 <plugin>
100 <groupId>org.apache.maven.plugins</groupId>
101 <artifactId>maven-clean-plugin</artifactId>
102 <version>3.1.0</version>
103 </plugin>
104 <plugin>
105 <groupId>org.apache.maven.plugins</groupId>
106 <artifactId>maven-deploy-plugin</artifactId>
107 <version>3.0.0-M1</version>
108 </plugin>
109 <plugin>
110 <groupId>org.apache.maven.plugins</groupId>
111 <artifactId>maven-install-plugin</artifactId>
112 <version>3.0.0-M1</version>
113 </plugin>
114 <plugin>
115 <groupId>org.apache.maven.plugins</groupId>
116 <artifactId>maven-site-plugin</artifactId>
117 <version>3.8.2</version>
118 </plugin>
119 <plugin>
120 <groupId>org.apache.maven.plugins</groupId>
121 <artifactId>maven-project-info-reports-plugin</artifactId>
122 <version>3.0.0</version>
123 </plugin>
124 <plugin>
125 <groupId>org.apache.maven.plugins</groupId>
126 <artifactId>maven-surefire-plugin</artifactId>
127 <version>3.0.0-M3</version>
128 <configuration>
129 <redirectTestOutputToFile>
130 true
131 </redirectTestOutputToFile>
132 <printSummary>
133 true
134 </printSummary>
135 <excludedGroups>
136 org.onlab.junit.IntegrationTest
137 </excludedGroups>
138 <rerunFailingTestsCount>
139 1
140 </rerunFailingTestsCount>
141 </configuration>
142 </plugin>
143 <plugin>
144 <groupId>org.apache.maven.plugins</groupId>
145 <artifactId>maven-javadoc-plugin</artifactId>
146 <version>3.1.1</version>
147 <configuration>
148 <tags>
149 <tag>
150 <name>onos.rsModel</name>
151 <placement>m</placement>
152 <head>Json model for REST api:</head>
153 </tag>
154 </tags>
155 </configuration>
156 </plugin>
157 <plugin>
158 <groupId>org.apache.maven.plugins</groupId>
159 <artifactId>maven-jar-plugin</artifactId>
160 <version>3.2.0</version>
161 <configuration>
162 <skipIfEmpty>true</skipIfEmpty>
163 </configuration>
164 <executions>
165 <execution>
166 <id>default</id>
167 <goals>
168 <goal>test-jar</goal>
169 </goals>
170 </execution>
171 </executions>
172 </plugin>
173 <plugin>
174 <groupId>org.apache.maven.plugins</groupId>
175 <artifactId>maven-checkstyle-plugin</artifactId>
176 <version>3.0.0</version>
177 <dependencies>
178 <dependency>
179 <groupId>org.onosproject</groupId>
180 <artifactId>onos-build-conf</artifactId>
181 <version>${onos.version}</version>
182 </dependency>
183 <dependency>
184 <groupId>com.puppycrawl.tools</groupId>
185 <artifactId>checkstyle</artifactId>
186 <version>8.10</version>
187 </dependency>
188 </dependencies>
189 <configuration>
190 <configLocation>
191 onos/checkstyle-mvn.xml
192 </configLocation>
193 <suppressionsLocation>
194 onos/suppressions.xml
195 </suppressionsLocation>
196 <headerLocation>
197 onos/onos-java.header
198 </headerLocation>
199 <failsOnError>false</failsOnError>
200 <logViolationsToConsole>true</logViolationsToConsole>
201 <includeTestSourceDirectory>true</includeTestSourceDirectory>
202 <includeResources>false</includeResources>
203 </configuration>
204 <executions>
205 <execution>
206 <id>validate-checkstyle</id>
207 <phase>verify</phase>
208 <goals>
209 <goal>check</goal>
210 </goals>
211 </execution>
212 </executions>
213 </plugin>
214 <plugin>
215 <groupId>org.apache.maven.plugins</groupId>
216 <artifactId>maven-pmd-plugin</artifactId>
217 <version>3.12.0</version>
218 <dependencies>
219 <dependency>
220 <groupId>org.onosproject</groupId>
221 <artifactId>onos-build-conf</artifactId>
222 <version>${onos.version}</version>
223 </dependency>
224 </dependencies>
225 <executions>
226 <execution>
227 <id>validate-pmd</id>
228 <phase>verify</phase>
229 <goals>
230 <!-- Uncomment this goal to make the build fail on pmd errors -->
231 <!-- <goal>check</goal> -->
232 </goals>
233 </execution>
234 </executions>
235 <configuration>
236 <rulesets>
237 <ruleset>onos/pmd.xml</ruleset>
238 </rulesets>
239 </configuration>
240 </plugin>
241 <plugin>
242 <groupId>org.jacoco</groupId>
243 <artifactId>jacoco-maven-plugin</artifactId>
244 <version>0.8.5</version>
245 <executions>
246 <execution>
247 <id>default-prepare-agent</id>
248 <goals>
249 <goal>prepare-agent</goal>
250 </goals>
251 </execution>
252 <execution>
253 <id>default-report</id>
254 <phase>prepare-package</phase>
255 <goals>
256 <goal>report</goal>
257 </goals>
258 </execution>
259 </executions>
260 </plugin>
261 <plugin>
262 <groupId>org.apache.maven.plugins</groupId>
263 <artifactId>maven-resources-plugin</artifactId>
264 <version>3.1.0</version>
265 </plugin>
266 <plugin>
267 <groupId>org.apache.felix</groupId>
268 <artifactId>maven-bundle-plugin</artifactId>
269 <version>4.1.0</version>
270 <extensions>true</extensions>
271 <configuration>
272 <instructions>
273 <Bundle-SymbolicName>
274 ${project.groupId}.${project.artifactId}
275 </Bundle-SymbolicName>
276 <_dsannotations-options>inherit</_dsannotations-options>
277 </instructions>
278 </configuration>
279 </plugin>
280 <plugin>
281 <groupId>org.apache.maven.plugins</groupId>
282 <artifactId>maven-source-plugin</artifactId>
283 <version>3.1.0</version>
284 <executions>
285 <execution>
286 <id>attach-sources</id>
287 <goals>
288 <goal>jar</goal>
289 </goals>
290 </execution>
291 </executions>
292 </plugin>
293 <plugin>
294 <groupId>org.apache.maven.plugins</groupId>
295 <artifactId>maven-shade-plugin</artifactId>
296 <version>3.1.1</version>
297 </plugin>
298 <plugin>
299 <groupId>com.github.spotbugs</groupId>
300 <artifactId>spotbugs-maven-plugin</artifactId>
301 <version>3.1.12</version>
302 <configuration>
303 <effort>Max</effort>
304 </configuration>
305 </plugin>
306 <plugin>
307 <groupId>org.onosproject</groupId>
308 <artifactId>onos-maven-plugin</artifactId>
309 <!-- This version needs to be updated manually when changes
310 are made to onos-maven-plugin -->
311 <version>2.2</version>
312 <executions>
313 <execution>
314 <id>cfg</id>
315 <phase>generate-resources</phase>
316 <goals>
317 <goal>cfg</goal>
318 </goals>
319 </execution>
320 <execution>
321 <id>swagger</id>
322 <phase>generate-sources</phase>
323 <goals>
324 <goal>swagger</goal>
325 </goals>
326 </execution>
327 <execution>
328 <id>app</id>
329 <phase>package</phase>
330 <goals>
331 <goal>app</goal>
332 </goals>
333 </execution>
334 </executions>
335 </plugin>
336 <plugin>
337 <groupId>org.apache.karaf.tooling</groupId>
338 <artifactId>karaf-maven-plugin</artifactId>
339 <version>${karaf.version}</version>
340 <extensions>true</extensions>
341 </plugin>
342 </plugins>
343 </pluginManagement>
344
345 <plugins>
346 <plugin>
347 <groupId>org.apache.felix</groupId>
348 <artifactId>maven-bundle-plugin</artifactId>
349 </plugin>
350 <plugin>
351 <groupId>org.apache.maven.plugins</groupId>
352 <artifactId>maven-compiler-plugin</artifactId>
353 </plugin>
354 <plugin>
355 <groupId>org.apache.maven.plugins</groupId>
356 <artifactId>maven-enforcer-plugin</artifactId>
357 </plugin>
358 <plugin>
359 <groupId>org.apache.maven.plugins</groupId>
360 <artifactId>maven-jar-plugin</artifactId>
361 </plugin>
362 </plugins>
363 </build>
364
365 <reporting>
366 <plugins>
367 <plugin>
368 <groupId>org.apache.maven.plugins</groupId>
369 <artifactId>maven-checkstyle-plugin</artifactId>
370 </plugin>
371 <plugin>
372 <groupId>org.apache.maven.plugins</groupId>
373 <artifactId>maven-pmd-plugin</artifactId>
374 </plugin>
375 <plugin>
376 <groupId>org.jacoco</groupId>
377 <artifactId>jacoco-maven-plugin</artifactId>
378 </plugin>
379 <plugin>
380 <groupId>com.github.spotbugs</groupId>
381 <artifactId>spotbugs-maven-plugin</artifactId>
382 </plugin>
383 </plugins>
384 </reporting>
385
386</project>