21f4d8271e0750ed910f6211d3157745a2cf570d
[openflowjava.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
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     <parent>
5         <groupId>org.opendaylight.odlparent</groupId>
6         <artifactId>odlparent</artifactId>
7         <version>1.5.0-SNAPSHOT</version>
8         <relativePath/>
9     </parent>
10
11     <groupId>org.opendaylight.openflowjava</groupId>
12     <artifactId>openflow-protocol-parent</artifactId>
13     <version>0.6.0-SNAPSHOT</version>
14     <name>openflowjava</name> <!-- Used by Sonar to set project name -->
15     <packaging>pom</packaging>
16
17     <modules>
18         <module>openflowjava-config</module>
19         <module>openflow-protocol-api</module>
20         <module>openflow-protocol-spi</module>
21         <module>util</module>
22         <module>openflow-protocol-impl</module>
23         <module>openflow-protocol-it</module>
24         <module>features</module>
25         <module>simple-client</module>
26     </modules>
27     <scm>
28         <connection>scm:git:ssh://git.opendaylight.org:29418/openflowjava.git</connection>
29         <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowjava.git</developerConnection>
30         <url>https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main</url>
31       <tag>HEAD</tag>
32     </scm>
33
34     <properties>
35         <sonar.host.url>https://sonar.opendaylight.org/</sonar.host.url>
36         <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
37         <sitedeploy>dav:http://nexus.opendaylight.org/content/sites/site</sitedeploy>
38         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39         <jmxGeneratorPath>${project.build.directory}/yang-gen-config</jmxGeneratorPath>
40         <karaf.distro.empty.version>1.5.0-SNAPSHOT</karaf.distro.empty.version>
41         <salGeneratorPath>${project.build.directory}/yang-gen-sal</salGeneratorPath>
42         <sonar.branch>${user.name}-private-view</sonar.branch>
43         <sonar.skippedModules>org.openflow.openflowj,net.sf.jung2</sonar.skippedModules>
44         <yang.prototype.version>1.2.0-SNAPSHOT</yang.prototype.version>
45         <ietf.model.version>2010.09.24.7-SNAPSHOT</ietf.model.version>
46         <yang.ext.version>2013.09.07.7-SNAPSHOT</yang.ext.version>
47         <yangtools.version>0.7.0-SNAPSHOT</yangtools.version>
48         <yangtools.generator.version>0.7.0-SNAPSHOT</yangtools.generator.version>
49         <mdsal.version>1.2.0-SNAPSHOT</mdsal.version>
50         <config.version>0.3.0-SNAPSHOT</config.version>
51
52         <!-- Sonar config -->
53         <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
54         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
55         <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
56         <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
57         <sonar.profile>Sonar way with Findbugs</sonar.profile>
58     </properties>
59
60     <pluginRepositories>
61         <!-- Opendaylight public group -->
62         <pluginRepository>
63             <id>odlPublic</id>
64             <name>odlPublic</name>
65             <url>${nexusproxy}/groups/public/</url>
66             <snapshots>
67               <enabled>false</enabled>
68             </snapshots>
69             <releases>
70               <enabled>true</enabled>
71             </releases>
72         </pluginRepository>
73         <!-- OpenDayLight Snapshot artifact -->
74         <pluginRepository>
75             <id>opendaylight-snapshot</id>
76             <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
77             <snapshots>
78               <enabled>true</enabled>
79             </snapshots>
80             <releases>
81               <enabled>false</enabled>
82             </releases>
83         </pluginRepository>
84     </pluginRepositories>
85
86
87     <repositories>
88         <!-- Opendaylight public group -->
89         <repository>
90             <id>odlPublic</id>
91             <name>odlPublic</name>
92             <url>${nexusproxy}/groups/public/</url>
93             <snapshots>
94               <enabled>false</enabled>
95             </snapshots>
96             <releases>
97               <enabled>true</enabled>
98             </releases>
99         </repository>
100         <!-- OpenDayLight Snapshot artifact -->
101         <repository>
102             <id>opendaylight-snapshot</id>
103             <name>opendaylight-snapshot</name>
104             <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
105             <snapshots>
106               <enabled>true</enabled>
107             </snapshots>
108             <releases>
109               <enabled>false</enabled>
110             </releases>
111         </repository>
112     </repositories>
113     <distributionManagement>
114         <!-- OpenDayLight Released artifact -->
115         <repository>
116             <id>opendaylight-release</id>
117             <url>${nexusproxy}/repositories/opendaylight.release/</url>
118         </repository>
119         <!-- OpenDayLight Snapshot artifact -->
120         <snapshotRepository>
121             <id>opendaylight-snapshot</id>
122             <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
123         </snapshotRepository>
124         <!-- Site deployment -->
125         <!-- site>
126             <id>website</id>
127             <url>${sitedeploy}</url>
128         </site -->
129     </distributionManagement>
130
131
132     <dependencyManagement>
133         <dependencies>
134             <!-- feature dependencies -->
135             <dependency>
136               <groupId>org.opendaylight.yangtools</groupId>
137               <artifactId>features-yangtools</artifactId>
138               <version>${yangtools.version}</version>
139               <classifier>features</classifier>
140               <type>xml</type>
141             </dependency>
142             <dependency>
143               <groupId>org.opendaylight.controller</groupId>
144               <artifactId>features-config</artifactId>
145               <version>${config.version}</version>
146               <classifier>features</classifier>
147               <type>xml</type>
148             </dependency>
149             <dependency>
150                 <groupId>org.opendaylight.yangtools.model</groupId>
151                 <artifactId>ietf-inet-types</artifactId>
152                 <version>${ietf.model.version}</version>
153             </dependency>
154             <dependency>
155                 <groupId>org.opendaylight.yangtools.model</groupId>
156                 <artifactId>ietf-yang-types</artifactId>
157                 <version>${ietf.model.version}</version>
158             </dependency>
159             <dependency>
160                 <groupId>org.opendaylight.yangtools.model</groupId>
161                 <artifactId>yang-ext</artifactId>
162                 <version>${yang.ext.version}</version>
163             </dependency>
164             <dependency>
165                 <groupId>org.opendaylight.controller</groupId>
166                 <artifactId>config-api</artifactId>
167                 <version>0.3.0-SNAPSHOT</version>
168             </dependency>
169             <dependency>
170               <groupId>org.opendaylight.yangtools</groupId>
171               <artifactId>features-test</artifactId>
172               <version>${yangtools.version}</version>
173             </dependency>
174         </dependencies>
175     </dependencyManagement>
176
177     <dependencies>
178         <!-- Sonar -->
179         <dependency>
180             <groupId>org.codehaus.sonar-plugins.java</groupId>
181             <artifactId>sonar-jacoco-listeners</artifactId>
182             <version>${sonar-jacoco-listeners.version}</version>
183             <scope>test</scope>
184         </dependency>
185     </dependencies>
186
187     <build>
188         <plugins>
189             <plugin>
190                 <groupId>org.apache.maven.plugins</groupId>
191                 <artifactId>maven-compiler-plugin</artifactId>
192                 <inherited>true</inherited>
193                 <configuration>
194                     <source>1.7</source>
195                     <target>1.7</target>
196                 </configuration>
197             </plugin>
198             <plugin>
199                 <artifactId>maven-source-plugin</artifactId>
200                 <executions>
201                     <execution>
202                         <id>attach-sources</id>
203                         <phase>deploy</phase>
204                         <goals>
205                             <goal>jar-no-fork</goal>
206                         </goals>
207                     </execution>
208                 </executions>
209             </plugin>
210             <plugin>
211               <groupId>org.apache.felix</groupId>
212               <artifactId>maven-bundle-plugin</artifactId>
213               <extensions>true</extensions>
214               <configuration>
215                 <instructions>
216                   <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
217                 </instructions>
218                 <manifestLocation>${project.build.directory}/META-INF</manifestLocation>
219               </configuration>
220             </plugin>
221             <plugin>
222               <groupId>org.apache.maven.plugins</groupId>
223               <artifactId>maven-checkstyle-plugin</artifactId>
224               <version>2.12</version>
225               <configuration>
226                 <failOnViolation>false</failOnViolation>
227                 <configLocation>checkstyle-logging.xml</configLocation>
228                 <consoleOutput>true</consoleOutput>
229                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
230                 <sourceDirectory>${project.basedir}</sourceDirectory>
231                 <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
232                 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/src/main/yang-gen-config\/,**\/src/main/yang-gen-sal\/</excludes>
233               </configuration>
234               <dependencies>
235                 <dependency>
236                 <groupId>org.opendaylight.yangtools</groupId>
237                 <artifactId>checkstyle-logging</artifactId>
238                 <version>${yangtools.version}</version>
239                 </dependency>
240               </dependencies>
241               <executions>
242                 <execution>
243                 <goals>
244                   <goal>check</goal>
245                 </goals>
246                 </execution>
247               </executions>
248             </plugin>
249             <plugin>
250                 <groupId>org.codehaus.mojo</groupId>
251                 <artifactId>build-helper-maven-plugin</artifactId>
252             </plugin>
253             <plugin>
254                 <groupId>org.jacoco</groupId>
255                 <artifactId>jacoco-maven-plugin</artifactId>
256                 <executions>
257                     <execution>
258                         <id>prepare-ut-agent</id>
259                         <phase>process-test-classes</phase>
260                         <goals>
261                             <goal>prepare-agent</goal>
262                         </goals>
263                         <configuration>
264                             <destFile>${sonar.jacoco.reportPath}</destFile>
265                             <propertyName>jacoco.agent.ut.arg</propertyName>
266                         </configuration>
267                     </execution>
268                     <execution>
269                         <id>prepare-it-agent</id>
270                         <phase>pre-integration-test</phase>
271                         <goals>
272                             <goal>prepare-agent</goal>
273                         </goals>
274                         <configuration>
275                             <destFile>${sonar.jacoco.itReportPath}</destFile>
276                             <propertyName>jacoco.agent.it.arg</propertyName>
277                         </configuration>
278                     </execution>
279                 </executions>
280             </plugin>
281         </plugins>
282         <pluginManagement>
283             <plugins>
284                 <plugin>
285                     <groupId>org.opendaylight.yangtools</groupId>
286                     <artifactId>yang-maven-plugin</artifactId>
287                     <version>${yangtools.version}</version>
288                 </plugin>
289                 <plugin>
290                     <groupId>org.codehaus.mojo</groupId>
291                     <artifactId>build-helper-maven-plugin</artifactId>
292                     <version>1.8</version>
293                     <executions>
294                         <execution>
295                             <id>add-source</id>
296                             <goals>
297                                 <goal>add-source</goal>
298                             </goals>
299                             <phase>generate-sources</phase>
300                             <configuration>
301                                 <sources>
302                                     <source>src/main/yang</source>
303                                 </sources>
304                             </configuration>
305                         </execution>
306                     </executions>
307                 </plugin>
308                 <plugin>
309                     <groupId>org.apache.maven.plugins</groupId>
310                     <artifactId>maven-failsafe-plugin</artifactId>
311                     <configuration>
312                         <!-- Specific to generate mapping between tests and covered code -->
313                         <argLine>${jacoco.agent.it.arg}</argLine>
314                         <properties>
315                             <property>
316                                 <name>listener</name>
317                                 <value>org.sonar.java.jacoco.JUnitListener</value>
318                             </property>
319                         </properties>
320                         <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
321                         <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
322                     </configuration>
323                 </plugin>
324                 <plugin>
325                     <groupId>org.apache.maven.plugins</groupId>
326                     <artifactId>maven-surefire-plugin</artifactId>
327                     <configuration>
328                         <!-- Specific to generate mapping between tests and covered code -->
329                         <argLine>${jacoco.agent.ut.arg}</argLine>
330                         <properties>
331                             <property>
332                                 <name>listener</name>
333                                 <value>org.sonar.java.jacoco.JUnitListener</value>
334                             </property>
335                         </properties>
336                     </configuration>
337                 </plugin>
338                 <!-- Ignore/Execute plugin execution -->
339                 <plugin>
340                   <groupId>org.eclipse.m2e</groupId>
341                   <artifactId>lifecycle-mapping</artifactId>
342                   <version>1.0.0</version>
343                   <configuration>
344                     <lifecycleMappingMetadata>
345                       <pluginExecutions>
346                         <pluginExecution>
347                           <pluginExecutionFilter>
348                             <groupId>org.codehaus.mojo</groupId>
349                             <artifactId>properties-maven-plugin</artifactId>
350                             <versionRange>[0.0,)</versionRange>
351                             <goals>
352                               <goal>set-system-properties</goal>
353                             </goals>
354                           </pluginExecutionFilter>
355                           <action>
356                             <ignore/>
357                           </action>
358                         </pluginExecution>
359                         <pluginExecution>
360                           <pluginExecutionFilter>
361                             <groupId>org.codehaus.enunciate</groupId>
362                             <artifactId>maven-enunciate-plugin</artifactId>
363                             <versionRange>[0.0,)</versionRange>
364                             <goals>
365                               <goal>docs</goal>
366                             </goals>
367                           </pluginExecutionFilter>
368                           <action>
369                             <ignore/>
370                           </action>
371                         </pluginExecution>
372                         <pluginExecution>
373                           <pluginExecutionFilter>
374                             <groupId>org.jacoco</groupId>
375                             <artifactId>jacoco-maven-plugin</artifactId>
376                             <versionRange>[0.0,)</versionRange>
377                             <goals>
378                               <goal>prepare-agent</goal>
379                               <goal>pre-test</goal>
380                               <goal>post-test</goal>
381                             </goals>
382                           </pluginExecutionFilter>
383                           <action>
384                             <ignore/>
385                           </action>
386                         </pluginExecution>
387                         <pluginExecution>
388                           <pluginExecutionFilter>
389                             <groupId>org.ops4j.pax.exam</groupId>
390                             <artifactId>maven-paxexam-plugin</artifactId>
391                             <versionRange>[1.2.4,)</versionRange>
392                             <goals>
393                               <goal>generate-depends-file</goal>
394                             </goals>
395                           </pluginExecutionFilter>
396                           <action>
397                             <execute>
398                               <runOnIncremental>false</runOnIncremental>
399                             </execute>
400                           </action>
401                         </pluginExecution>
402                         <pluginExecution>
403                           <pluginExecutionFilter>
404                             <groupId>org.apache.maven.plugins</groupId>
405                             <artifactId>maven-checkstyle-plugin</artifactId>
406                             <versionRange>[2.0,)</versionRange>
407                             <goals>
408                               <goal>check</goal>
409                             </goals>
410                           </pluginExecutionFilter>
411                           <action>
412                             <ignore/>
413                           </action>
414                         </pluginExecution>
415                         <pluginExecution>
416                           <pluginExecutionFilter>
417                             <groupId>org.opendaylight.yangtools</groupId>
418                             <artifactId>yang-maven-plugin</artifactId>
419                             <versionRange>[0.5,)</versionRange>
420                             <goals>
421                               <goal>generate-sources</goal>
422                             </goals>
423                           </pluginExecutionFilter>
424                           <action>
425                             <execute/>
426                           </action>
427                         </pluginExecution>
428                         <pluginExecution>
429                           <pluginExecutionFilter>
430                             <groupId>org.codehaus.groovy.maven</groupId>
431                             <artifactId>gmaven-plugin</artifactId>
432                             <versionRange>1.0</versionRange>
433                             <goals>
434                               <goal>execute</goal>
435                             </goals>
436                           </pluginExecutionFilter>
437                           <action>
438                             <ignore/>
439                           </action>
440                         </pluginExecution>
441                         <pluginExecution>
442                           <pluginExecutionFilter>
443                             <groupId>org.apache.maven.plugins</groupId>
444                             <artifactId>maven-enforcer-plugin</artifactId>
445                             <versionRange>${enforcer.version}</versionRange>
446                             <goals>
447                               <goal>enforce</goal>
448                             </goals>
449                           </pluginExecutionFilter>
450                           <action>
451                             <ignore/>
452                           </action>
453                         </pluginExecution>
454                       </pluginExecutions>
455                     </lifecycleMappingMetadata>
456                   </configuration>
457                 </plugin>
458             </plugins>
459         </pluginManagement>
460     </build>
461     <reporting>
462         <plugins>
463             <plugin>
464                 <groupId>org.codehaus.mojo</groupId>
465                 <artifactId>findbugs-maven-plugin</artifactId>
466                 <version>2.5.2</version>
467                 <configuration>
468                     <effort>Max</effort>
469                     <threshold>Low</threshold>
470                     <goal>site</goal>
471                 </configuration>
472             </plugin>
473             <plugin>
474               <artifactId>maven-jxr-plugin</artifactId>
475               <version>2.3</version>
476               <configuration>
477                 <aggregate>true</aggregate>
478                 <linkJavadoc>true</linkJavadoc>
479               </configuration>
480             </plugin>
481
482             <plugin>
483                 <groupId>org.codehaus.mojo</groupId>
484                 <artifactId>jdepend-maven-plugin</artifactId>
485                 <version>2.0-beta-2</version>
486             </plugin>
487         </plugins>
488     </reporting>
489     <profiles>
490         <profile>
491             <id>viewbuild</id>
492             <activation>
493                 <activeByDefault>true</activeByDefault>
494             </activation>
495             <properties>
496                 <build.suffix>${project.version}</build.suffix>
497             </properties>
498         </profile>
499         <profile>
500             <id>jenkins</id>
501             <activation>
502                 <property>
503                     <name>BUILDSUFFIX</name>
504                 </property>
505             </activation>
506             <properties>
507                 <build.suffix>${BUILDSUFFIX}</build.suffix>
508             </properties>
509         </profile>
510         <profile>
511             <id>repoBuild</id>
512             <build>
513                 <plugins>
514                     <plugin>
515                         <groupId>org.apache.maven.plugins</groupId>
516                         <artifactId>maven-javadoc-plugin</artifactId>
517                         <version>2.8.1</version>
518                         <executions>
519                             <execution>
520                                 <goals>
521                                     <goal>aggregate</goal>
522                                 </goals>
523                                 <phase>site</phase>
524                             </execution>
525                             <execution>
526                                 <id>attach-javadocs</id>
527                                 <goals>
528                                     <goal>jar</goal>
529                                 </goals>
530                             </execution>
531                         </executions>
532                     </plugin>
533                     <plugin>
534                         <groupId>org.apache.maven.plugins</groupId>
535                         <artifactId>maven-source-plugin</artifactId>
536                         <executions>
537                             <execution>
538                                 <id>attach-sources</id>
539                                 <phase>package</phase>
540                                 <goals>
541                                     <goal>jar-no-fork</goal>
542                                 </goals>
543                             </execution>
544                         </executions>
545                     </plugin>
546                 </plugins>
547             </build>
548         </profile>
549     </profiles>
550 </project>