blob: adaeb0d496fa5604d6bb8cb714b87deafae5eaa4 [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>
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>
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>
198 </configuration>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800199 </plugin>
200 <plugin>
201 <groupId>org.apache.maven.plugins</groupId>
202 <artifactId>maven-pmd-plugin</artifactId>
203 <version>3.12.0</version>
204 <dependencies>
205 <dependency>
206 <groupId>org.onosproject</groupId>
207 <artifactId>onos-build-conf</artifactId>
208 <version>${onos.version}</version>
209 </dependency>
210 </dependencies>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800211 <configuration>
212 <rulesets>
213 <ruleset>onos/pmd.xml</ruleset>
214 </rulesets>
215 </configuration>
216 </plugin>
217 <plugin>
218 <groupId>org.jacoco</groupId>
219 <artifactId>jacoco-maven-plugin</artifactId>
220 <version>0.8.5</version>
221 <executions>
222 <execution>
223 <id>default-prepare-agent</id>
224 <goals>
225 <goal>prepare-agent</goal>
226 </goals>
227 </execution>
228 <execution>
229 <id>default-report</id>
230 <phase>prepare-package</phase>
231 <goals>
232 <goal>report</goal>
233 </goals>
234 </execution>
235 </executions>
236 </plugin>
237 <plugin>
238 <groupId>org.apache.maven.plugins</groupId>
239 <artifactId>maven-resources-plugin</artifactId>
240 <version>3.1.0</version>
241 </plugin>
242 <plugin>
243 <groupId>org.apache.felix</groupId>
244 <artifactId>maven-bundle-plugin</artifactId>
245 <version>4.1.0</version>
246 <extensions>true</extensions>
247 <configuration>
248 <instructions>
249 <Bundle-SymbolicName>
250 ${project.groupId}.${project.artifactId}
251 </Bundle-SymbolicName>
252 <_dsannotations-options>inherit</_dsannotations-options>
253 </instructions>
254 </configuration>
255 </plugin>
256 <plugin>
257 <groupId>org.apache.maven.plugins</groupId>
258 <artifactId>maven-source-plugin</artifactId>
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800259 <version>${maven.source.plugin.version}</version>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800260 </plugin>
261 <plugin>
262 <groupId>org.apache.maven.plugins</groupId>
263 <artifactId>maven-shade-plugin</artifactId>
264 <version>3.1.1</version>
265 </plugin>
266 <plugin>
267 <groupId>com.github.spotbugs</groupId>
268 <artifactId>spotbugs-maven-plugin</artifactId>
269 <version>3.1.12</version>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800270 </plugin>
271 <plugin>
272 <groupId>org.onosproject</groupId>
273 <artifactId>onos-maven-plugin</artifactId>
274 <!-- This version needs to be updated manually when changes
275 are made to onos-maven-plugin -->
Daniele Moro462547a2019-11-22 18:00:29 -0800276 <version>2.2.1</version>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800277 <executions>
278 <execution>
279 <id>cfg</id>
280 <phase>generate-resources</phase>
281 <goals>
282 <goal>cfg</goal>
283 </goals>
284 </execution>
285 <execution>
286 <id>swagger</id>
287 <phase>generate-sources</phase>
288 <goals>
289 <goal>swagger</goal>
290 </goals>
291 </execution>
292 <execution>
293 <id>app</id>
294 <phase>package</phase>
295 <goals>
296 <goal>app</goal>
297 </goals>
298 </execution>
299 </executions>
300 </plugin>
301 <plugin>
302 <groupId>org.apache.karaf.tooling</groupId>
303 <artifactId>karaf-maven-plugin</artifactId>
304 <version>${karaf.version}</version>
305 <extensions>true</extensions>
306 </plugin>
307 </plugins>
308 </pluginManagement>
309
310 <plugins>
311 <plugin>
312 <groupId>org.apache.felix</groupId>
313 <artifactId>maven-bundle-plugin</artifactId>
314 </plugin>
315 <plugin>
316 <groupId>org.apache.maven.plugins</groupId>
317 <artifactId>maven-compiler-plugin</artifactId>
318 </plugin>
319 <plugin>
320 <groupId>org.apache.maven.plugins</groupId>
321 <artifactId>maven-enforcer-plugin</artifactId>
322 </plugin>
323 <plugin>
324 <groupId>org.apache.maven.plugins</groupId>
325 <artifactId>maven-jar-plugin</artifactId>
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800326 <executions>
327 <execution>
328 <id>default</id>
329 <goals>
330 <goal>test-jar</goal>
331 </goals>
332 </execution>
333 </executions>
334 </plugin>
335 <plugin>
336 <groupId>org.apache.maven.plugins</groupId>
337 <artifactId>maven-checkstyle-plugin</artifactId>
338 <!-- Verify checkstyle as part of the build -->
339 <executions>
340 <execution>
341 <id>validate-checkstyle</id>
342 <phase>verify</phase>
343 <goals>
344 <goal>check</goal>
345 </goals>
346 </execution>
347 </executions>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800348 </plugin>
349 </plugins>
350 </build>
351
352 <reporting>
353 <plugins>
354 <plugin>
355 <groupId>org.apache.maven.plugins</groupId>
356 <artifactId>maven-checkstyle-plugin</artifactId>
357 </plugin>
358 <plugin>
359 <groupId>org.apache.maven.plugins</groupId>
360 <artifactId>maven-pmd-plugin</artifactId>
361 </plugin>
362 <plugin>
363 <groupId>org.jacoco</groupId>
364 <artifactId>jacoco-maven-plugin</artifactId>
365 </plugin>
366 <plugin>
367 <groupId>com.github.spotbugs</groupId>
368 <artifactId>spotbugs-maven-plugin</artifactId>
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800369 <configuration>
370 <effort>Max</effort>
371 <xmlOutput>true</xmlOutput>
372 <xmlOutputDirectory>target/site</xmlOutputDirectory>
373 </configuration>
Carmelo Cascone27b97122019-11-12 10:34:05 -0800374 </plugin>
375 </plugins>
376 </reporting>
377
Carmelo Casconec0e351f2019-11-15 21:17:14 -0800378 <profiles>
379 <profile>
380 <id>ci-verify</id>
381 <!--
382 To be used in CI jobs to perform extra validations, usually
383 skipped in local builds and required for release.
384 -->
385 <build>
386 <plugins>
387 <plugin>
388 <groupId>org.apache.maven.plugins</groupId>
389 <artifactId>maven-source-plugin</artifactId>
390 <executions>
391 <execution>
392 <id>verify-attach-sources</id>
393 <phase>test</phase>
394 <goals>
395 <goal>jar-no-fork</goal>
396 </goals>
397 </execution>
398 </executions>
399 </plugin>
400 <plugin>
401 <groupId>org.apache.maven.plugins</groupId>
402 <artifactId>maven-javadoc-plugin</artifactId>
403 <executions>
404 <execution>
405 <id>verify-attach-javadocs</id>
406 <phase>test</phase>
407 <goals>
408 <goal>jar</goal>
409 </goals>
410 </execution>
411 </executions>
412 </plugin>
413 </plugins>
414 </build>
415 </profile>
416 </profiles>
417
Carmelo Cascone27b97122019-11-12 10:34:05 -0800418</project>