blob: 38b0c38e90093f3984e729fcfeaf16e60d6b4e90 [file] [log] [blame]
alshabib1f44e8e2014-08-14 15:19:57 -07001<?xml version="1.0"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3 <modelVersion>4.0.0</modelVersion>
4 <prerequisites>
5 <maven>3.0.4</maven>
6 </prerequisites>
7 <groupId>net.onrc.onos.sb</groupId>
8 <artifactId>onos-sb</artifactId>
9 <version>0.0.1</version>
10 <packaging>bundle</packaging>
11 <name>ONOS-SB</name>
12 <url>http://onlab.us/</url>
13 <licenses>
14 <license>
15 <name>Apache License, Version 2.0</name>
16 <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
17 </license>
18 </licenses>
19 <repositories>
20 <repository>
21 <id>central</id>
22 <name>Maven Central repository</name>
23 <url>https://repo1.maven.org/maven2</url>
24 </repository>
25 <repository>
26 <id>maven-restlet</id>
27 <name>Public online Restlet repository</name>
28 <url>http://maven.restlet.org</url>
29 <snapshots>
30 <enabled>false</enabled>
31 </snapshots>
32 </repository>
33 <repository>
34 <id>sonatype-oss-snapshot</id>
35 <name>Sonatype OSS snapshot repository</name>
36 <url>https://oss.sonatype.org/content/repositories/snapshots</url>
37 <releases>
38 <enabled>false</enabled>
39 </releases>
40 </repository>
41 </repositories>
42 <properties>
43 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44 <powermock.version>1.5.5</powermock.version>
45 <restlet.version>2.1.4</restlet.version>
46 <cobertura-maven-plugin.version>2.6</cobertura-maven-plugin.version>
47 <!-- Following 2 findbugs version needs to be updated in sync to match the
48 findbugs version used in findbugs-plugin -->
49 <findbugs.version>3.0.0</findbugs.version>
50 <findbugs-plugin.version>3.0.0</findbugs-plugin.version>
51 <findbugs.effort>Max</findbugs.effort>
52 <findbugs.excludeFilterFile>conf/findbugs/exclude.xml</findbugs.excludeFilterFile>
53 <checkstyle-plugin.version>2.12</checkstyle-plugin.version>
54 <!-- To publish javadoc to github,
55 uncomment com.github.github site-maven-plugin and
56 see https://github.com/OPENNETWORKINGLAB/ONOS/pull/425
57 <github.global.server>github</github.global.server>
58 -->
59 <metrics.version>3.0.2</metrics.version>
60 <maven.surefire.plugin.version>2.16</maven.surefire.plugin.version>
61 </properties>
62 <build>
63 <plugins>
64 <plugin>
65 <groupId>org.apache.felix</groupId>
66 <artifactId>maven-scr-plugin</artifactId>
67 <version>1.15.0</version>
68 <executions>
69 <execution>
70 <id>generate-scr-srcdescriptor</id>
71 <goals>
72 <goal>scr</goal>
73 </goals>
74 </execution>
75 </executions>
76 <configuration>
77 <supportedProjectTypes>
78 <supportedProjectType>bundle</supportedProjectType>
79 <supportedProjectType>war</supportedProjectType>
80 </supportedProjectTypes>
81 </configuration>
82</plugin>
83 <plugin>
84 <groupId>org.apache.felix</groupId>
85 <artifactId>maven-bundle-plugin</artifactId>
86 <version>2.3.6</version>
87 <extensions>true</extensions>
88 <configuration>
89 <instructions>
90 <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
91 </instructions>
92 </configuration>
93 </plugin>
94 <!-- Note: the checkstyle configuration is also in the reporting section -->
95 <plugin>
96 <groupId>org.apache.maven.plugins</groupId>
97 <artifactId>maven-checkstyle-plugin</artifactId>
98 <version>${checkstyle-plugin.version}</version>
99 <configuration>
100 <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
101 <propertiesLocation>${basedir}/conf/checkstyle/checkstyle_maven.properties</propertiesLocation>
102 <failsOnError>false</failsOnError>
103 <logViolationsToConsole>true</logViolationsToConsole>
104 <includeTestSourceDirectory>true</includeTestSourceDirectory>
105 </configuration>
106 <executions>
107 <execution>
108 <id>validate-checkstyle</id>
109 <phase>verify</phase>
110 <goals>
111 <goal>check</goal>
112 </goals>
113 </execution>
114 </executions>
115 </plugin>
116 <plugin>
117 <groupId>org.apache.maven.plugins</groupId>
118 <artifactId>maven-install-plugin</artifactId>
119 <version>2.5.1</version>
120 <executions>
121 </executions>
122 </plugin>
123 <!-- guice maven plugin for dependency injection inside maven -->
124 <plugin>
125 <groupId>org.apache.camel</groupId>
126 <artifactId>guice-maven-plugin</artifactId>
127 <version>2.11.0</version>
128 </plugin>
129 <plugin>
130 <artifactId>maven-clean-plugin</artifactId>
131 <version>2.5</version>
132 </plugin>
133 <plugin>
134 <artifactId>maven-deploy-plugin</artifactId>
135 <version>2.8</version>
136 </plugin>
137 <plugin>
138 <artifactId>maven-jar-plugin</artifactId>
139 <version>2.4</version>
140 </plugin>
141 <plugin>
142 <artifactId>maven-resources-plugin</artifactId>
143 <version>2.6</version>
144 </plugin>
145 <plugin>
146 <artifactId>maven-site-plugin</artifactId>
147 <version>3.3</version>
148 </plugin>
149 <plugin>
150 <groupId>org.apache.maven.plugins</groupId>
151 <artifactId>maven-compiler-plugin</artifactId>
152 <version>3.1</version>
153 <configuration>
154 <source>1.7</source>
155 <target>1.7</target>
156 <encoding>UTF-8</encoding>
157 <showDeprecation>true</showDeprecation>
158 <showWarnings>true</showWarnings>
159 <compilerArgs>
160 <arg>-Xlint:all</arg>
161 <arg>-Xlint:-serial</arg>
162 <arg>-Werror</arg>
163 </compilerArgs>
164 </configuration>
165 <executions>
166 </executions>
167 </plugin>
168 <plugin>
169 <groupId>org.apache.maven.plugins</groupId>
170 <artifactId>maven-surefire-plugin</artifactId>
171 <version>${maven.surefire.plugin.version}</version>
172 <configuration>
173 <!-- FIXME -XX:-UseSplitVerifier added as workaround for JDK 1.7.0u65 + PowerMock issue
174 https://issues.jboss.org/browse/JASSIST-228 -->
175 <argLine>-XX:MaxPermSize=256m -XX:-UseSplitVerifier</argLine>
176 <redirectTestOutputToFile>false</redirectTestOutputToFile>
177 <excludedGroups>net.onrc.onos.core.util.IntegrationTest</excludedGroups>
178 </configuration>
179 </plugin>
180 <!-- TODO exec:java no longer used remove at some point? -->
181 <plugin>
182 <groupId>org.codehaus.mojo</groupId>
183 <artifactId>exec-maven-plugin</artifactId>
184 <version>1.2.1</version>
185 <configuration>
186 <mainClass>net.onrc.onos.core.main.Main</mainClass>
187 </configuration>
188 <executions>
189 </executions>
190 </plugin>
191 <plugin>
192 <groupId>org.apache.maven.plugins</groupId>
193 <artifactId>maven-javadoc-plugin</artifactId>
194 <version>2.9.1</version>
195 <configuration>
196 <charset>UTF-8</charset>
197 <locale>en</locale>
198 <author>false</author>
199 <excludePackageNames>net.floodlightcontroller.*:net.onrc.onos.core.datastore.serializers</excludePackageNames>
200 </configuration>
201 </plugin>
202<!-- Remove me when we're sure that system test no longer need JaCoCo
203 <plugin>
204 <groupId>org.jacoco</groupId>
205 <artifactId>jacoco-maven-plugin</artifactId>
206 <version>0.6.3.201306030806</version>
207 <executions>
208 <execution>
209 <id>jacoco-initialize</id>
210 <goals>
211 <goal>prepare-agent</goal>
212 </goals>
213 </execution>
214 <execution>
215 <id>jacoco-site</id>
216 <phase>package</phase>
217 <goals>
218 <goal>report</goal>
219 </goals>
220 </execution>
221 </executions>
222 </plugin>
223-->
224 <!-- Uncomment when publishing javadoc to github in the future.
225 <plugin>
226 <groupId>com.github.github</groupId>
227 <artifactId>site-maven-plugin</artifactId>
228 <version>0.8</version>
229 <configuration>
230 <message>Creating site for ${project.version}</message>
231 <dryRun>true</dryRun>
232 <repositoryName>ONOS</repositoryName>
233 <repositoryOwner>OPENNETWORKINGLAB</repositoryOwner>
234 <path>javadoc/${project.version}/</path>
235 </configuration>
236 <executions>
237 <execution>
238 <goals>
239 <goal>site</goal>
240 </goals>
241 <phase>site</phase>
242 </execution>
243 </executions>
244 </plugin>
245 -->
246 <plugin>
247 <artifactId>maven-assembly-plugin</artifactId>
248 <version>2.4</version>
249 <configuration>
250 <descriptorRefs>
251 <descriptorRef>jar-with-dependencies</descriptorRef>
252 </descriptorRefs>
253 </configuration>
254 </plugin>
255 <plugin>
256 <!-- Using groovy script to set maven property ${hostname}.
257 This is a workaround to get hostname as a property inside pom file,
258 which current Maven does not provide. -->
259 <groupId>org.codehaus.gmaven</groupId>
260 <artifactId>groovy-maven-plugin</artifactId>
261 <version>2.0</version>
262 <executions>
263 <execution>
264 <phase>initialize</phase>
265 <goals>
266 <goal>execute</goal>
267 </goals>
268 <configuration>
269 <source>
270 project.properties["hostname"] = InetAddress.getLocalHost().getHostName()
271 </source>
272 </configuration>
273 </execution>
274 </executions>
275 </plugin>
276 <plugin>
277 <groupId>org.apache.maven.plugins</groupId>
278 <artifactId>maven-dependency-plugin</artifactId>
279 <version>2.8</version>
280 <executions>
281 <execution>
282 <id>build-classpath</id>
283 <phase>compile</phase>
284 <goals>
285 <goal>build-classpath</goal>
286 </goals>
287 <configuration>
288 <outputFile>${project.basedir}/.javacp.${hostname}</outputFile>
289 </configuration>
290 </execution>
291 </executions>
292 </plugin>
293 <plugin>
294 <groupId>org.codehaus.mojo</groupId>
295 <artifactId>cobertura-maven-plugin</artifactId>
296 <version>${cobertura-maven-plugin.version}</version>
297 <configuration>
298 <instrumentation>
299 <ignores>
300 <ignore>org.slf4j.*</ignore>
301 </ignores>
302 <excludes>
303 <exclude>edu/stanford/ramcloud/**/*.class</exclude>
304 <exclude>net/floodlightcontroller/**/web/**/*.class</exclude>
305 </excludes>
306 </instrumentation>
307 <quiet>true</quiet>
308 </configuration>
309 <executions>
310 <execution>
311 <goals>
312 <goal>clean</goal>
313 </goals>
314 </execution>
315 </executions>
316 </plugin>
317 <!-- Note: the findbugs configuration is also in the reporting section -->
318 <plugin>
319 <groupId>org.codehaus.mojo</groupId>
320 <artifactId>findbugs-maven-plugin</artifactId>
321 <version>${findbugs-plugin.version}</version>
322 <configuration>
323 <effort>${findbugs.effort}</effort>
324 <excludeFilterFile>${findbugs.excludeFilterFile}</excludeFilterFile>
325 </configuration>
326 <executions>
327 <execution>
328 <id>validate-findbugs</id>
329 <phase>verify</phase>
330 <goals>
331 <goal>check</goal>
332 </goals>
333 </execution>
334 </executions>
335 </plugin>
336 <plugin>
337 <groupId>org.apache.maven.plugins</groupId>
338 <artifactId>maven-pmd-plugin</artifactId>
339 <version>3.1</version>
340 <configuration>
341 <!--
342 Note: Exclusion definition exists in multiple places.
343 - In file ${findbugs.excludeFilterFile} defined at top of pom.xml
344 - In file conf/checkstyle/onos_suppressions.xml
345 - maven-pmd-plugin configuration in pom.xml
346 (under build and reporting)
347 -->
348 <excludes>
349 <exclude>**/datastore/serializers/**</exclude>
350 <exclude>**/edu/stanford/**</exclude>
351 <exclude>**/net/floodlightcontroller/**</exclude>
352 </excludes>
353 <rulesets>
354 <ruleset>${basedir}/conf/pmd/onos_ruleset.xml</ruleset>
355 </rulesets>
356 </configuration>
357 <executions>
358 <execution>
359 <id>validate-pmd</id>
360 <phase>verify</phase>
361 <goals>
362 <!-- Uncomment this goal to make the build fail on pmd errors -->
363 <!--<goal>check</goal>-->
364 </goals>
365 </execution>
366 </executions>
367 </plugin>
368 </plugins>
369 <pluginManagement>
370 <plugins>
371 <!--This plugin's configuration is used to store Eclipse m2e settings
372 only. It has no influence on the Maven build itself. -->
373 <plugin>
374 <groupId>org.eclipse.m2e</groupId>
375 <artifactId>lifecycle-mapping</artifactId>
376 <version>1.0.0</version>
377 <configuration>
378 <lifecycleMappingMetadata>
379 <pluginExecutions>
380 <pluginExecution>
381 <pluginExecutionFilter>
382 <groupId>
383 org.apache.maven.plugins
384 </groupId>
385 <artifactId>
386 maven-dependency-plugin
387 </artifactId>
388 <versionRange>[2.8,)</versionRange>
389 <goals>
390 <goal>build-classpath</goal>
391 </goals>
392 </pluginExecutionFilter>
393 <action>
394 <ignore></ignore>
395 </action>
396 </pluginExecution>
397 <pluginExecution>
398 <pluginExecutionFilter>
399 <groupId>org.codehaus.gmaven</groupId>
400 <artifactId>groovy-maven-plugin</artifactId>
401 <versionRange>[2.0,)</versionRange>
402 <goals>
403 <goal>execute</goal>
404 </goals>
405 </pluginExecutionFilter>
406 <action>
407 <ignore></ignore>
408 </action>
409 </pluginExecution>
410 </pluginExecutions>
411 </lifecycleMappingMetadata>
412 </configuration>
413 </plugin>
414 </plugins>
415 </pluginManagement>
416 </build>
417 <!-- for getting visualization reporting -->
418 <reporting>
419 <excludeDefaults>true</excludeDefaults>
420 <outputDirectory>${project.build.directory}/site</outputDirectory>
421 <plugins>
422 <plugin>
423 <groupId>org.apache.maven.plugins</groupId>
424 <artifactId>maven-project-info-reports-plugin</artifactId>
425 <version>2.7</version>
426 <configuration>
427 <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
428 <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
429 </configuration>
430 <reportSets>
431 <reportSet>
432 <reports>
433 <report>dependencies</report>
434 <report>scm</report>
435 </reports>
436 </reportSet>
437 </reportSets>
438 </plugin>
439 <plugin>
440 <groupId>org.apache.maven.plugins</groupId>
441 <artifactId>maven-javadoc-plugin</artifactId>
442 <version>2.9.1</version>
443 <configuration>
444 <charset>UTF-8</charset>
445 <locale>en</locale>
446 <author>false</author>
447 <excludePackageNames>net.floodlightcontroller.*:net.onrc.onos.core.datastore.serializers</excludePackageNames>
448 </configuration>
449 </plugin>
450 <plugin>
451 <!-- Note: the checkstyle configuration is also in the build section -->
452 <groupId>org.apache.maven.plugins</groupId>
453 <artifactId>maven-checkstyle-plugin</artifactId>
454 <version>${checkstyle-plugin.version}</version>
455 <configuration>
456 <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
457 <!--
458 Note: Exclusion definition exists in multiple places.
459 - In file ${findbugs.excludeFilterFile} defined at top of pom.xml
460 - maven-checkstyle-plugin configuration in pom.xml
461 - maven-pmd-plugin configuration in pom.xml
462 (under build and reporting)
463 -->
464 <propertiesLocation>${basedir}/conf/checkstyle/checkstyle_maven.properties</propertiesLocation>
465 <includeTestSourceDirectory>true</includeTestSourceDirectory>
466 </configuration>
467 <reportSets>
468 <reportSet>
469 <reports>
470 <report>checkstyle</report>
471 </reports>
472 </reportSet>
473 </reportSets>
474 </plugin>
475 <!-- Note: the findbugs configuration is also in the build section -->
476 <plugin>
477 <groupId>org.codehaus.mojo</groupId>
478 <artifactId>findbugs-maven-plugin</artifactId>
479 <version>${findbugs-plugin.version}</version>
480 <configuration>
481 <effort>${findbugs.effort}</effort>
482 <excludeFilterFile>${findbugs.excludeFilterFile}</excludeFilterFile>
483 <reportPlugins>
484 <plugin>
485 <groupId>org.codehaus.mojo</groupId>
486 <artifactId>findbugs-maven-plugin</artifactId>
487 </plugin>
488 </reportPlugins>
489 </configuration>
490 </plugin>
491 <plugin>
492 <groupId>org.apache.maven.plugins</groupId>
493 <artifactId>maven-pmd-plugin</artifactId>
494 <version>3.1</version>
495 <configuration>
496 <!--
497 Note: Exclusion definition exists in multiple places.
498 - In file ${findbugs.excludeFilterFile} defined at top of pom.xml
499 - In file conf/checkstyle/onos_suppressions.xml
500 - maven-pmd-plugin configuration in pom.xml
501 (under build and reporting)
502 -->
503 <excludes>
504 <exclude>**/datastore/serializers/**</exclude>
505 <exclude>**/edu/stanford/**</exclude>
506 <exclude>**/net/floodlightcontroller/**</exclude>
507 </excludes>
508 <rulesets>
509 <ruleset>${basedir}/conf/pmd/onos_ruleset.xml</ruleset>
510 </rulesets>
511 </configuration>
512 </plugin>
513 <plugin>
514 <groupId>org.apache.maven.plugins</groupId>
515 <artifactId>maven-jxr-plugin</artifactId>
516 <version>2.4</version>
517 </plugin>
518 <plugin>
519 <groupId>org.codehaus.mojo</groupId>
520 <artifactId>cobertura-maven-plugin</artifactId>
521 <version>${cobertura-maven-plugin.version}</version>
522 </plugin>
523 </plugins>
524 </reporting>
525 <dependencies>
526 <!-- ONOS's direct dependencies -->
527 <dependency>
528 <groupId>org.apache.felix</groupId>
529 <artifactId>org.apache.felix.scr.annotations</artifactId>
530 <version>1.9.6</version>
531 </dependency>
532 <dependency>
533 <groupId>ch.qos.logback</groupId>
534 <artifactId>logback-classic</artifactId>
535 <version>1.1.2</version>
536 </dependency>
537 <dependency>
538 <groupId>ch.qos.logback</groupId>
539 <artifactId>logback-core</artifactId>
540 <version>1.1.2</version>
541 </dependency>
542 <dependency>
543 <groupId>org.slf4j</groupId>
544 <artifactId>slf4j-api</artifactId>
545 <version>1.7.5</version>
546 </dependency>
547 <dependency>
548 <!-- findbugs suppression annotation and @GuardedBy, etc. -->
549 <groupId>com.google.code.findbugs</groupId>
550 <artifactId>annotations</artifactId>
551 <version>${findbugs.version}</version>
552 </dependency>
553 <dependency>
554 <groupId>org.projectfloodlight</groupId>
555 <artifactId>openflowj</artifactId>
556 <version>0.3.6-SNAPSHOT</version>
557 </dependency>
558 <!-- Floodlight's dependencies -->
559 <dependency>
560 <!-- dependency to old version of netty? -->
561 <groupId>io.netty</groupId>
562 <artifactId>netty</artifactId>
563 <version>3.9.2.Final</version>
564 </dependency>
565 <!-- Dependency for libraries used for testing -->
566 <dependency>
567 <groupId>junit</groupId>
568 <artifactId>junit</artifactId>
569 <version>4.11</version>
570 <scope>test</scope>
571 </dependency>
572 <dependency>
573 <groupId>org.easymock</groupId>
574 <artifactId>easymock</artifactId>
575 <version>3.2</version>
576 <scope>test</scope>
577 </dependency>
578 <dependency>
579 <groupId>org.powermock</groupId>
580 <artifactId>powermock-module-junit4</artifactId>
581 <version>${powermock.version}</version>
582 <scope>test</scope>
583 </dependency>
584 <dependency>
585 <groupId>org.powermock</groupId>
586 <artifactId>powermock-api-easymock</artifactId>
587 <version>${powermock.version}</version>
588 <scope>test</scope>
589 </dependency>
590 </dependencies>
591 <profiles>
592 <!-- Jenkins by default defines a property BUILD_NUMBER which is used to
593 enable the profile. -->
594 <profile>
595 <id>jenkins</id>
596 <activation>
597 <property>
598 <name>env.BUILD_NUMBER</name>
599 </property>
600 </activation>
601 <build>
602 <plugins>
603 <plugin>
604 <groupId>org.codehaus.mojo</groupId>
605 <artifactId>cobertura-maven-plugin</artifactId>
606 <version>${cobertura-maven-plugin.version}</version>
607 <configuration>
608 <formats>
609 <format>xml</format>
610 </formats>
611 <quiet>true</quiet>
612 </configuration>
613 <executions>
614 <execution>
615 <phase>package</phase>
616 <goals>
617 <goal>cobertura</goal>
618 </goals>
619 </execution>
620 </executions>
621 </plugin>
622 </plugins>
623 </build>
624 </profile>
625 <profile>
626 <id>all-tests</id>
627 <build>
628 <plugins>
629 <plugin>
630 <groupId>org.apache.maven.plugins</groupId>
631 <artifactId>maven-surefire-plugin</artifactId>
632 <version>${maven.surefire.plugin.version}</version>
633 <configuration combine.self="merge">
634 <excludedGroups></excludedGroups>
635 </configuration>
636 </plugin>
637 </plugins>
638 </build>
639 </profile>
640 <profile>
641 <id>error-prone</id>
642 <build>
643 <plugins>
644 <plugin>
645 <groupId>org.apache.maven.plugins</groupId>
646 <artifactId>maven-compiler-plugin</artifactId>
647 <version>3.1</version>
648 <configuration>
649 <compilerArgs combine.children="append">
650 <!-- FIXME -Xlint:-path required when using findbugs + error-prone -->
651 <arg>-Xlint:-path</arg>
652 </compilerArgs>
653 <!-- Turn on error-prone -->
654 <compilerId>javac-with-errorprone</compilerId>
655 <forceJavacCompilerUse>true</forceJavacCompilerUse>
656 </configuration>
657 <dependencies combine.children="append">
658 <dependency>
659 <groupId>com.google.errorprone</groupId>
660 <artifactId>error_prone_core</artifactId>
661 <version>1.1.2</version>
662 </dependency>
663 <dependency>
664 <groupId>org.codehaus.plexus</groupId>
665 <artifactId>plexus-compiler-javac</artifactId>
666 <version>2.3</version>
667 </dependency>
668 <dependency>
669 <groupId>org.codehaus.plexus</groupId>
670 <artifactId>plexus-compiler-javac-errorprone</artifactId>
671 <version>2.3</version>
672 </dependency>
673 </dependencies>
674 </plugin>
675 </plugins>
676 </build>
677 </profile>
678 </profiles>
679</project>