blob: 9533e0da5ab6cc8fc7fa6e0f12a7654cd6c545a6 [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>
alshabib86ac11c2014-08-14 16:14:41 -07007 <groupId>net.onrc.onos.of.ctl</groupId>
8 <artifactId>io</artifactId>
alshabib1f44e8e2014-08-14 15:19:57 -07009 <version>0.0.1</version>
10 <packaging>bundle</packaging>
alshabib86ac11c2014-08-14 16:14:41 -070011 <name>of-ctl</name>
alshabib1f44e8e2014-08-14 15:19:57 -070012 <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>
alshabib86ac11c2014-08-14 16:14:41 -070052 <findbugs.excludeFilterFile>${project.basedir}/conf/findbugs/exclude.xml</findbugs.excludeFilterFile>
alshabib1f44e8e2014-08-14 15:19:57 -070053 <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>
alshabib86ac11c2014-08-14 16:14:41 -0700100 <configLocation>${project.basedir}/conf/checkstyle/sun_checks.xml</configLocation>
101 <propertiesLocation>${project.basedir}/conf/checkstyle/checkstyle_maven.properties</propertiesLocation>
alshabib1f44e8e2014-08-14 15:19:57 -0700102 <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>
alshabib1f44e8e2014-08-14 15:19:57 -0700199 </configuration>
200 </plugin>
alshabib1f44e8e2014-08-14 15:19:57 -0700201 <plugin>
202 <artifactId>maven-assembly-plugin</artifactId>
203 <version>2.4</version>
204 <configuration>
205 <descriptorRefs>
206 <descriptorRef>jar-with-dependencies</descriptorRef>
207 </descriptorRefs>
208 </configuration>
209 </plugin>
210 <plugin>
211 <!-- Using groovy script to set maven property ${hostname}.
212 This is a workaround to get hostname as a property inside pom file,
213 which current Maven does not provide. -->
214 <groupId>org.codehaus.gmaven</groupId>
215 <artifactId>groovy-maven-plugin</artifactId>
216 <version>2.0</version>
217 <executions>
218 <execution>
219 <phase>initialize</phase>
220 <goals>
221 <goal>execute</goal>
222 </goals>
223 <configuration>
224 <source>
225 project.properties["hostname"] = InetAddress.getLocalHost().getHostName()
226 </source>
227 </configuration>
228 </execution>
229 </executions>
230 </plugin>
231 <plugin>
232 <groupId>org.apache.maven.plugins</groupId>
233 <artifactId>maven-dependency-plugin</artifactId>
234 <version>2.8</version>
235 <executions>
236 <execution>
237 <id>build-classpath</id>
238 <phase>compile</phase>
239 <goals>
240 <goal>build-classpath</goal>
241 </goals>
242 <configuration>
243 <outputFile>${project.basedir}/.javacp.${hostname}</outputFile>
244 </configuration>
245 </execution>
246 </executions>
247 </plugin>
248 <plugin>
249 <groupId>org.codehaus.mojo</groupId>
250 <artifactId>cobertura-maven-plugin</artifactId>
251 <version>${cobertura-maven-plugin.version}</version>
252 <configuration>
253 <instrumentation>
254 <ignores>
255 <ignore>org.slf4j.*</ignore>
256 </ignores>
alshabib1f44e8e2014-08-14 15:19:57 -0700257 </instrumentation>
258 <quiet>true</quiet>
259 </configuration>
260 <executions>
261 <execution>
262 <goals>
263 <goal>clean</goal>
264 </goals>
265 </execution>
266 </executions>
267 </plugin>
268 <!-- Note: the findbugs configuration is also in the reporting section -->
269 <plugin>
270 <groupId>org.codehaus.mojo</groupId>
271 <artifactId>findbugs-maven-plugin</artifactId>
272 <version>${findbugs-plugin.version}</version>
273 <configuration>
274 <effort>${findbugs.effort}</effort>
275 <excludeFilterFile>${findbugs.excludeFilterFile}</excludeFilterFile>
276 </configuration>
277 <executions>
278 <execution>
279 <id>validate-findbugs</id>
280 <phase>verify</phase>
281 <goals>
282 <goal>check</goal>
283 </goals>
284 </execution>
285 </executions>
286 </plugin>
287 <plugin>
288 <groupId>org.apache.maven.plugins</groupId>
289 <artifactId>maven-pmd-plugin</artifactId>
290 <version>3.1</version>
291 <configuration>
292 <!--
293 Note: Exclusion definition exists in multiple places.
294 - In file ${findbugs.excludeFilterFile} defined at top of pom.xml
295 - In file conf/checkstyle/onos_suppressions.xml
296 - maven-pmd-plugin configuration in pom.xml
297 (under build and reporting)
298 -->
alshabib1f44e8e2014-08-14 15:19:57 -0700299 <rulesets>
alshabib4827f042014-08-15 11:15:21 -0700300 <ruleset>${basedir}/conf/pmd/ruleset.xml</ruleset>
alshabib1f44e8e2014-08-14 15:19:57 -0700301 </rulesets>
302 </configuration>
303 <executions>
304 <execution>
305 <id>validate-pmd</id>
306 <phase>verify</phase>
307 <goals>
308 <!-- Uncomment this goal to make the build fail on pmd errors -->
309 <!--<goal>check</goal>-->
310 </goals>
311 </execution>
312 </executions>
313 </plugin>
314 </plugins>
315 <pluginManagement>
316 <plugins>
317 <!--This plugin's configuration is used to store Eclipse m2e settings
318 only. It has no influence on the Maven build itself. -->
319 <plugin>
320 <groupId>org.eclipse.m2e</groupId>
321 <artifactId>lifecycle-mapping</artifactId>
322 <version>1.0.0</version>
323 <configuration>
324 <lifecycleMappingMetadata>
325 <pluginExecutions>
326 <pluginExecution>
327 <pluginExecutionFilter>
328 <groupId>
329 org.apache.maven.plugins
330 </groupId>
331 <artifactId>
332 maven-dependency-plugin
333 </artifactId>
334 <versionRange>[2.8,)</versionRange>
335 <goals>
336 <goal>build-classpath</goal>
337 </goals>
338 </pluginExecutionFilter>
339 <action>
340 <ignore></ignore>
341 </action>
342 </pluginExecution>
343 <pluginExecution>
344 <pluginExecutionFilter>
345 <groupId>org.codehaus.gmaven</groupId>
346 <artifactId>groovy-maven-plugin</artifactId>
347 <versionRange>[2.0,)</versionRange>
348 <goals>
349 <goal>execute</goal>
350 </goals>
351 </pluginExecutionFilter>
352 <action>
353 <ignore></ignore>
354 </action>
355 </pluginExecution>
356 </pluginExecutions>
357 </lifecycleMappingMetadata>
358 </configuration>
359 </plugin>
360 </plugins>
361 </pluginManagement>
362 </build>
363 <!-- for getting visualization reporting -->
364 <reporting>
365 <excludeDefaults>true</excludeDefaults>
366 <outputDirectory>${project.build.directory}/site</outputDirectory>
367 <plugins>
368 <plugin>
369 <groupId>org.apache.maven.plugins</groupId>
370 <artifactId>maven-project-info-reports-plugin</artifactId>
371 <version>2.7</version>
372 <configuration>
373 <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
374 <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
375 </configuration>
376 <reportSets>
377 <reportSet>
378 <reports>
379 <report>dependencies</report>
380 <report>scm</report>
381 </reports>
382 </reportSet>
383 </reportSets>
384 </plugin>
385 <plugin>
386 <groupId>org.apache.maven.plugins</groupId>
387 <artifactId>maven-javadoc-plugin</artifactId>
388 <version>2.9.1</version>
389 <configuration>
390 <charset>UTF-8</charset>
391 <locale>en</locale>
392 <author>false</author>
393 <excludePackageNames>net.floodlightcontroller.*:net.onrc.onos.core.datastore.serializers</excludePackageNames>
394 </configuration>
395 </plugin>
396 <plugin>
397 <!-- Note: the checkstyle configuration is also in the build section -->
398 <groupId>org.apache.maven.plugins</groupId>
399 <artifactId>maven-checkstyle-plugin</artifactId>
400 <version>${checkstyle-plugin.version}</version>
401 <configuration>
402 <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
403 <!--
404 Note: Exclusion definition exists in multiple places.
405 - In file ${findbugs.excludeFilterFile} defined at top of pom.xml
406 - maven-checkstyle-plugin configuration in pom.xml
407 - maven-pmd-plugin configuration in pom.xml
408 (under build and reporting)
409 -->
410 <propertiesLocation>${basedir}/conf/checkstyle/checkstyle_maven.properties</propertiesLocation>
411 <includeTestSourceDirectory>true</includeTestSourceDirectory>
412 </configuration>
413 <reportSets>
414 <reportSet>
415 <reports>
416 <report>checkstyle</report>
417 </reports>
418 </reportSet>
419 </reportSets>
420 </plugin>
421 <!-- Note: the findbugs configuration is also in the build section -->
422 <plugin>
423 <groupId>org.codehaus.mojo</groupId>
424 <artifactId>findbugs-maven-plugin</artifactId>
425 <version>${findbugs-plugin.version}</version>
426 <configuration>
427 <effort>${findbugs.effort}</effort>
428 <excludeFilterFile>${findbugs.excludeFilterFile}</excludeFilterFile>
429 <reportPlugins>
430 <plugin>
431 <groupId>org.codehaus.mojo</groupId>
432 <artifactId>findbugs-maven-plugin</artifactId>
433 </plugin>
434 </reportPlugins>
435 </configuration>
436 </plugin>
437 <plugin>
438 <groupId>org.apache.maven.plugins</groupId>
439 <artifactId>maven-pmd-plugin</artifactId>
440 <version>3.1</version>
441 <configuration>
442 <!--
443 Note: Exclusion definition exists in multiple places.
444 - In file ${findbugs.excludeFilterFile} defined at top of pom.xml
445 - In file conf/checkstyle/onos_suppressions.xml
446 - maven-pmd-plugin configuration in pom.xml
447 (under build and reporting)
448 -->
449 <excludes>
450 <exclude>**/datastore/serializers/**</exclude>
451 <exclude>**/edu/stanford/**</exclude>
452 <exclude>**/net/floodlightcontroller/**</exclude>
453 </excludes>
454 <rulesets>
455 <ruleset>${basedir}/conf/pmd/onos_ruleset.xml</ruleset>
456 </rulesets>
457 </configuration>
458 </plugin>
459 <plugin>
460 <groupId>org.apache.maven.plugins</groupId>
461 <artifactId>maven-jxr-plugin</artifactId>
462 <version>2.4</version>
463 </plugin>
464 <plugin>
465 <groupId>org.codehaus.mojo</groupId>
466 <artifactId>cobertura-maven-plugin</artifactId>
467 <version>${cobertura-maven-plugin.version}</version>
468 </plugin>
469 </plugins>
470 </reporting>
471 <dependencies>
472 <!-- ONOS's direct dependencies -->
473 <dependency>
474 <groupId>org.apache.felix</groupId>
475 <artifactId>org.apache.felix.scr.annotations</artifactId>
476 <version>1.9.6</version>
477 </dependency>
478 <dependency>
479 <groupId>ch.qos.logback</groupId>
480 <artifactId>logback-classic</artifactId>
481 <version>1.1.2</version>
482 </dependency>
483 <dependency>
484 <groupId>ch.qos.logback</groupId>
485 <artifactId>logback-core</artifactId>
486 <version>1.1.2</version>
487 </dependency>
488 <dependency>
489 <groupId>org.slf4j</groupId>
490 <artifactId>slf4j-api</artifactId>
491 <version>1.7.5</version>
492 </dependency>
493 <dependency>
494 <!-- findbugs suppression annotation and @GuardedBy, etc. -->
495 <groupId>com.google.code.findbugs</groupId>
496 <artifactId>annotations</artifactId>
497 <version>${findbugs.version}</version>
498 </dependency>
499 <dependency>
500 <groupId>org.projectfloodlight</groupId>
501 <artifactId>openflowj</artifactId>
502 <version>0.3.6-SNAPSHOT</version>
503 </dependency>
504 <!-- Floodlight's dependencies -->
505 <dependency>
506 <!-- dependency to old version of netty? -->
507 <groupId>io.netty</groupId>
508 <artifactId>netty</artifactId>
509 <version>3.9.2.Final</version>
510 </dependency>
511 <!-- Dependency for libraries used for testing -->
512 <dependency>
513 <groupId>junit</groupId>
514 <artifactId>junit</artifactId>
515 <version>4.11</version>
516 <scope>test</scope>
517 </dependency>
518 <dependency>
519 <groupId>org.easymock</groupId>
520 <artifactId>easymock</artifactId>
521 <version>3.2</version>
522 <scope>test</scope>
523 </dependency>
524 <dependency>
525 <groupId>org.powermock</groupId>
526 <artifactId>powermock-module-junit4</artifactId>
527 <version>${powermock.version}</version>
528 <scope>test</scope>
529 </dependency>
530 <dependency>
531 <groupId>org.powermock</groupId>
532 <artifactId>powermock-api-easymock</artifactId>
533 <version>${powermock.version}</version>
534 <scope>test</scope>
535 </dependency>
536 </dependencies>
537 <profiles>
538 <!-- Jenkins by default defines a property BUILD_NUMBER which is used to
539 enable the profile. -->
540 <profile>
541 <id>jenkins</id>
542 <activation>
543 <property>
544 <name>env.BUILD_NUMBER</name>
545 </property>
546 </activation>
547 <build>
548 <plugins>
549 <plugin>
550 <groupId>org.codehaus.mojo</groupId>
551 <artifactId>cobertura-maven-plugin</artifactId>
552 <version>${cobertura-maven-plugin.version}</version>
553 <configuration>
554 <formats>
555 <format>xml</format>
556 </formats>
557 <quiet>true</quiet>
558 </configuration>
559 <executions>
560 <execution>
561 <phase>package</phase>
562 <goals>
563 <goal>cobertura</goal>
564 </goals>
565 </execution>
566 </executions>
567 </plugin>
568 </plugins>
569 </build>
570 </profile>
571 <profile>
572 <id>all-tests</id>
573 <build>
574 <plugins>
575 <plugin>
576 <groupId>org.apache.maven.plugins</groupId>
577 <artifactId>maven-surefire-plugin</artifactId>
578 <version>${maven.surefire.plugin.version}</version>
579 <configuration combine.self="merge">
580 <excludedGroups></excludedGroups>
581 </configuration>
582 </plugin>
583 </plugins>
584 </build>
585 </profile>
586 <profile>
587 <id>error-prone</id>
588 <build>
589 <plugins>
590 <plugin>
591 <groupId>org.apache.maven.plugins</groupId>
592 <artifactId>maven-compiler-plugin</artifactId>
593 <version>3.1</version>
594 <configuration>
595 <compilerArgs combine.children="append">
596 <!-- FIXME -Xlint:-path required when using findbugs + error-prone -->
597 <arg>-Xlint:-path</arg>
598 </compilerArgs>
599 <!-- Turn on error-prone -->
600 <compilerId>javac-with-errorprone</compilerId>
601 <forceJavacCompilerUse>true</forceJavacCompilerUse>
602 </configuration>
603 <dependencies combine.children="append">
604 <dependency>
605 <groupId>com.google.errorprone</groupId>
606 <artifactId>error_prone_core</artifactId>
607 <version>1.1.2</version>
608 </dependency>
609 <dependency>
610 <groupId>org.codehaus.plexus</groupId>
611 <artifactId>plexus-compiler-javac</artifactId>
612 <version>2.3</version>
613 </dependency>
614 <dependency>
615 <groupId>org.codehaus.plexus</groupId>
616 <artifactId>plexus-compiler-javac-errorprone</artifactId>
617 <version>2.3</version>
618 </dependency>
619 </dependencies>
620 </plugin>
621 </plugins>
622 </build>
623 </profile>
624 </profiles>
625</project>