blob: 129b893628ef9b90447c26a7f4db74f58bf2a7fa [file] [log] [blame]
Carmelo Cascone27b97122019-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>
Carmelo Casconec0e351f2019-11-15 21:17:14 -080024 <version>2</version>
Carmelo Cascone27b97122019-11-12 10:34:05 -080025 </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>
Ray Milkey5f5db1f2020-01-31 16:25:57 -080036 <karaf.version>4.2.8</karaf.version>
Carmelo Cascone27b97122019-11-12 10:34:05 -080037 <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>
Carmelo Casconec0e351f2019-11-15 21:17:14 -080040 <errorprone.version>2.3.3</errorprone.version>
Carmelo Cascone27b97122019-11-12 10:34:05 -080041 </properties>
42
43 <dependencyManagement>
44 <dependencies>
45 <!-- DEPS_MGMT -->
46 </dependencies>
47 </dependencyManagement>
48
49 <dependencies>
50 <!-- DEPS -->
51 </dependencies>
52
53 <build>
54
55 <pluginManagement>
56 <plugins>
57 <plugin>
58 <groupId>org.apache.maven.plugins</groupId>
59 <artifactId>maven-compiler-plugin</artifactId>
60 <version>3.8.0</version>
61 <configuration>
Carmelo Casconec0e351f2019-11-15 21:17:14 -080062 <release>${java.version.min}</release>
63 <encoding>${project.build.sourceEncoding}</encoding>
64 <compilerArgs>
65 <arg>-XDcompilePolicy=simple</arg>
66 <arg>-Xplugin:ErrorProne</arg>
67 <arg>-Xlint:unchecked</arg>
68 </compilerArgs>
69 <annotationProcessorPaths>
70 <path>
71 <groupId>com.google.errorprone</groupId>
72 <artifactId>error_prone_core</artifactId>
73 <version>${errorprone.version}</version>
74 </path>
75 </annotationProcessorPaths>
Carmelo Cascone27b97122019-11-12 10:34:05 -080076 </configuration>
Carmelo Cascone27b97122019-11-12 10:34:05 -080077 </plugin>
78 <plugin>
79 <groupId>org.apache.maven.plugins</groupId>
80 <artifactId>maven-enforcer-plugin</artifactId>
81 <version>3.0.0-M2</version>
82 <executions>
83 <execution>
84 <id>enforce-maven</id>
85 <goals>
86 <goal>enforce</goal>
87 </goals>
88 <configuration>
89 <rules>
90 <requireMavenVersion>
Carmelo Cascone27b97122019-11-12 10:34:05 -080091 <version>[${maven.version.min},)</version>
92 </requireMavenVersion>
93 </rules>
94 </configuration>
95 </execution>
96 <execution>
97 <id>enforce-java</id>
98 <goals>
99 <goal>enforce</goal>
100 </goals>
101 <configuration>
102 <rules>
103 <requireJavaVersion>
104 <version>[${java.version.min},)</version>
105 </requireJavaVersion>
106 </rules>
107 </configuration>
108 </execution>
109 </executions>
110 </plugin>
111 <plugin>
112 <groupId>org.apache.maven.plugins</groupId>
113 <artifactId>maven-clean-plugin</artifactId>
114 <version>3.1.0</version>
115 </plugin>
116 <plugin>
117 <groupId>org.apache.maven.plugins</groupId>
118 <artifactId>maven-deploy-plugin</artifactId>
119 <version>3.0.0-M1</version>
120 </plugin>
121 <plugin>
122 <groupId>org.apache.maven.plugins</groupId>
123 <artifactId>maven-install-plugin</artifactId>
124 <version>3.0.0-M1</version>
125 </plugin>
126 <plugin>
127 <groupId>org.apache.maven.plugins</groupId>
128 <artifactId>maven-site-plugin</artifactId>
129 <version>3.8.2</version>
130 </plugin>
131 <plugin>
132 <groupId>org.apache.maven.plugins</groupId>
133 <artifactId>maven-project-info-reports-plugin</artifactId>
134 <version>3.0.0</version>
135 </plugin>
136 <plugin>
137 <groupId>org.apache.maven.plugins</groupId>
138 <artifactId>maven-surefire-plugin</artifactId>
139 <version>3.0.0-M3</version>
140 <configuration>
141 <redirectTestOutputToFile>
142 true
143 </redirectTestOutputToFile>
144 <printSummary>
145 true
146 </printSummary>
147 <excludedGroups>
148 org.onlab.junit.IntegrationTest
149 </excludedGroups>
150 <rerunFailingTestsCount>
151 1
152 </rerunFailingTestsCount>
153 </configuration>
154 </plugin>
155 <plugin>
156 <groupId>org.apache.maven.plugins</groupId>
157 <artifactId>maven-javadoc-plugin</artifactId>
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800158 <version>${maven.javadoc.plugin.version}</version>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800159 </plugin>
160 <plugin>
161 <groupId>org.apache.maven.plugins</groupId>
162 <artifactId>maven-jar-plugin</artifactId>
163 <version>3.2.0</version>
164 <configuration>
165 <skipIfEmpty>true</skipIfEmpty>
166 </configuration>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800167 </plugin>
168 <plugin>
169 <groupId>org.apache.maven.plugins</groupId>
170 <artifactId>maven-checkstyle-plugin</artifactId>
171 <version>3.0.0</version>
172 <dependencies>
173 <dependency>
174 <groupId>org.onosproject</groupId>
175 <artifactId>onos-build-conf</artifactId>
176 <version>${onos.version}</version>
177 </dependency>
178 <dependency>
179 <groupId>com.puppycrawl.tools</groupId>
180 <artifactId>checkstyle</artifactId>
181 <version>8.10</version>
182 </dependency>
183 </dependencies>
184 <configuration>
185 <configLocation>
186 onos/checkstyle-mvn.xml
187 </configLocation>
188 <suppressionsLocation>
189 onos/suppressions.xml
190 </suppressionsLocation>
191 <headerLocation>
192 onos/onos-java.header
193 </headerLocation>
194 <failsOnError>false</failsOnError>
195 <logViolationsToConsole>true</logViolationsToConsole>
196 <includeTestSourceDirectory>true</includeTestSourceDirectory>
197 <includeResources>false</includeResources>
Carmelo Casconee4cf0512020-01-22 13:47:02 -0800198 <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800199 </configuration>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800200 </plugin>
201 <plugin>
202 <groupId>org.apache.maven.plugins</groupId>
203 <artifactId>maven-pmd-plugin</artifactId>
204 <version>3.12.0</version>
205 <dependencies>
206 <dependency>
207 <groupId>org.onosproject</groupId>
208 <artifactId>onos-build-conf</artifactId>
209 <version>${onos.version}</version>
210 </dependency>
211 </dependencies>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800212 <configuration>
213 <rulesets>
214 <ruleset>onos/pmd.xml</ruleset>
215 </rulesets>
216 </configuration>
217 </plugin>
218 <plugin>
219 <groupId>org.jacoco</groupId>
220 <artifactId>jacoco-maven-plugin</artifactId>
221 <version>0.8.5</version>
222 <executions>
223 <execution>
224 <id>default-prepare-agent</id>
225 <goals>
226 <goal>prepare-agent</goal>
227 </goals>
228 </execution>
229 <execution>
230 <id>default-report</id>
231 <phase>prepare-package</phase>
232 <goals>
233 <goal>report</goal>
234 </goals>
235 </execution>
236 </executions>
237 </plugin>
238 <plugin>
239 <groupId>org.apache.maven.plugins</groupId>
240 <artifactId>maven-resources-plugin</artifactId>
241 <version>3.1.0</version>
242 </plugin>
243 <plugin>
244 <groupId>org.apache.felix</groupId>
245 <artifactId>maven-bundle-plugin</artifactId>
246 <version>4.1.0</version>
247 <extensions>true</extensions>
248 <configuration>
249 <instructions>
250 <Bundle-SymbolicName>
251 ${project.groupId}.${project.artifactId}
252 </Bundle-SymbolicName>
253 <_dsannotations-options>inherit</_dsannotations-options>
254 </instructions>
255 </configuration>
256 </plugin>
257 <plugin>
258 <groupId>org.apache.maven.plugins</groupId>
259 <artifactId>maven-source-plugin</artifactId>
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800260 <version>${maven.source.plugin.version}</version>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800261 </plugin>
262 <plugin>
263 <groupId>org.apache.maven.plugins</groupId>
264 <artifactId>maven-shade-plugin</artifactId>
265 <version>3.1.1</version>
266 </plugin>
267 <plugin>
268 <groupId>com.github.spotbugs</groupId>
269 <artifactId>spotbugs-maven-plugin</artifactId>
270 <version>3.1.12</version>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800271 </plugin>
272 <plugin>
273 <groupId>org.onosproject</groupId>
274 <artifactId>onos-maven-plugin</artifactId>
275 <!-- This version needs to be updated manually when changes
276 are made to onos-maven-plugin -->
Daniele Moro462547a2019-11-22 18:00:29 -0800277 <version>2.2.1</version>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800278 <executions>
279 <execution>
280 <id>cfg</id>
281 <phase>generate-resources</phase>
282 <goals>
283 <goal>cfg</goal>
284 </goals>
285 </execution>
286 <execution>
287 <id>swagger</id>
288 <phase>generate-sources</phase>
289 <goals>
290 <goal>swagger</goal>
291 </goals>
292 </execution>
293 <execution>
294 <id>app</id>
295 <phase>package</phase>
296 <goals>
297 <goal>app</goal>
298 </goals>
299 </execution>
300 </executions>
301 </plugin>
302 <plugin>
303 <groupId>org.apache.karaf.tooling</groupId>
304 <artifactId>karaf-maven-plugin</artifactId>
305 <version>${karaf.version}</version>
306 <extensions>true</extensions>
307 </plugin>
308 </plugins>
309 </pluginManagement>
310
311 <plugins>
312 <plugin>
313 <groupId>org.apache.felix</groupId>
314 <artifactId>maven-bundle-plugin</artifactId>
315 </plugin>
316 <plugin>
317 <groupId>org.apache.maven.plugins</groupId>
318 <artifactId>maven-compiler-plugin</artifactId>
319 </plugin>
320 <plugin>
321 <groupId>org.apache.maven.plugins</groupId>
322 <artifactId>maven-enforcer-plugin</artifactId>
323 </plugin>
324 <plugin>
325 <groupId>org.apache.maven.plugins</groupId>
326 <artifactId>maven-jar-plugin</artifactId>
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800327 <executions>
328 <execution>
329 <id>default</id>
330 <goals>
331 <goal>test-jar</goal>
332 </goals>
333 </execution>
334 </executions>
335 </plugin>
336 <plugin>
337 <groupId>org.apache.maven.plugins</groupId>
338 <artifactId>maven-checkstyle-plugin</artifactId>
339 <!-- Verify checkstyle as part of the build -->
340 <executions>
341 <execution>
342 <id>validate-checkstyle</id>
343 <phase>verify</phase>
344 <goals>
345 <goal>check</goal>
346 </goals>
347 </execution>
348 </executions>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800349 </plugin>
350 </plugins>
351 </build>
352
353 <reporting>
354 <plugins>
355 <plugin>
356 <groupId>org.apache.maven.plugins</groupId>
357 <artifactId>maven-checkstyle-plugin</artifactId>
358 </plugin>
359 <plugin>
360 <groupId>org.apache.maven.plugins</groupId>
361 <artifactId>maven-pmd-plugin</artifactId>
362 </plugin>
363 <plugin>
364 <groupId>org.jacoco</groupId>
365 <artifactId>jacoco-maven-plugin</artifactId>
366 </plugin>
367 <plugin>
368 <groupId>com.github.spotbugs</groupId>
369 <artifactId>spotbugs-maven-plugin</artifactId>
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800370 <configuration>
371 <effort>Max</effort>
372 <xmlOutput>true</xmlOutput>
373 <xmlOutputDirectory>target/site</xmlOutputDirectory>
374 </configuration>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800375 </plugin>
376 </plugins>
377 </reporting>
378
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800379 <profiles>
380 <profile>
381 <id>ci-verify</id>
382 <!--
383 To be used in CI jobs to perform extra validations, usually
384 skipped in local builds and required for release.
385 -->
386 <build>
387 <plugins>
388 <plugin>
389 <groupId>org.apache.maven.plugins</groupId>
390 <artifactId>maven-source-plugin</artifactId>
391 <executions>
392 <execution>
393 <id>verify-attach-sources</id>
394 <phase>test</phase>
395 <goals>
396 <goal>jar-no-fork</goal>
397 </goals>
398 </execution>
399 </executions>
400 </plugin>
401 <plugin>
402 <groupId>org.apache.maven.plugins</groupId>
403 <artifactId>maven-javadoc-plugin</artifactId>
404 <executions>
405 <execution>
406 <id>verify-attach-javadocs</id>
407 <phase>test</phase>
408 <goals>
409 <goal>jar</goal>
410 </goals>
411 </execution>
412 </executions>
413 </plugin>
414 </plugins>
415 </build>
416 </profile>
417 </profiles>
418
Carmelo Cascone27b97122019-11-12 10:34:05 -0800419</project>