a63eb495ec72a808ef105e3752243b6bf29ad5e9
[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     <distributionManagement>
61         <!-- OpenDayLight Released artifact -->
62         <repository>
63             <id>opendaylight-release</id>
64             <url>${nexusproxy}/repositories/opendaylight.release/</url>
65         </repository>
66         <!-- OpenDayLight Snapshot artifact -->
67         <snapshotRepository>
68             <id>opendaylight-snapshot</id>
69             <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
70         </snapshotRepository>
71         <!-- Site deployment -->
72         <!-- site>
73             <id>website</id>
74             <url>${sitedeploy}</url>
75         </site -->
76     </distributionManagement>
77
78
79     <dependencyManagement>
80         <dependencies>
81             <!-- feature dependencies -->
82             <dependency>
83               <groupId>org.opendaylight.yangtools</groupId>
84               <artifactId>features-yangtools</artifactId>
85               <version>${yangtools.version}</version>
86               <classifier>features</classifier>
87               <type>xml</type>
88             </dependency>
89             <dependency>
90               <groupId>org.opendaylight.controller</groupId>
91               <artifactId>features-config</artifactId>
92               <version>${config.version}</version>
93               <classifier>features</classifier>
94               <type>xml</type>
95             </dependency>
96             <dependency>
97                 <groupId>org.opendaylight.yangtools.model</groupId>
98                 <artifactId>ietf-inet-types</artifactId>
99                 <version>${ietf.model.version}</version>
100             </dependency>
101             <dependency>
102                 <groupId>org.opendaylight.yangtools.model</groupId>
103                 <artifactId>ietf-yang-types</artifactId>
104                 <version>${ietf.model.version}</version>
105             </dependency>
106             <dependency>
107                 <groupId>org.opendaylight.yangtools.model</groupId>
108                 <artifactId>yang-ext</artifactId>
109                 <version>${yang.ext.version}</version>
110             </dependency>
111             <dependency>
112                 <groupId>org.opendaylight.controller</groupId>
113                 <artifactId>config-api</artifactId>
114                 <version>0.3.0-SNAPSHOT</version>
115             </dependency>
116             <dependency>
117               <groupId>org.opendaylight.yangtools</groupId>
118               <artifactId>features-test</artifactId>
119               <version>${yangtools.version}</version>
120             </dependency>
121         </dependencies>
122     </dependencyManagement>
123
124     <dependencies>
125         <!-- Sonar -->
126         <dependency>
127             <groupId>org.codehaus.sonar-plugins.java</groupId>
128             <artifactId>sonar-jacoco-listeners</artifactId>
129             <version>${sonar-jacoco-listeners.version}</version>
130             <scope>test</scope>
131         </dependency>
132     </dependencies>
133
134     <build>
135         <plugins>
136             <plugin>
137                 <groupId>org.apache.maven.plugins</groupId>
138                 <artifactId>maven-compiler-plugin</artifactId>
139                 <inherited>true</inherited>
140                 <configuration>
141                     <source>1.7</source>
142                     <target>1.7</target>
143                 </configuration>
144             </plugin>
145             <plugin>
146                 <artifactId>maven-source-plugin</artifactId>
147                 <executions>
148                     <execution>
149                         <id>attach-sources</id>
150                         <phase>deploy</phase>
151                         <goals>
152                             <goal>jar-no-fork</goal>
153                         </goals>
154                     </execution>
155                 </executions>
156             </plugin>
157             <plugin>
158               <groupId>org.apache.felix</groupId>
159               <artifactId>maven-bundle-plugin</artifactId>
160               <extensions>true</extensions>
161               <configuration>
162                 <instructions>
163                   <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
164                 </instructions>
165                 <manifestLocation>${project.build.directory}/META-INF</manifestLocation>
166               </configuration>
167             </plugin>
168             <plugin>
169               <groupId>org.apache.maven.plugins</groupId>
170               <artifactId>maven-checkstyle-plugin</artifactId>
171               <version>2.12</version>
172               <configuration>
173                 <failOnViolation>false</failOnViolation>
174                 <configLocation>checkstyle-logging.xml</configLocation>
175                 <consoleOutput>true</consoleOutput>
176                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
177                 <sourceDirectory>${project.basedir}</sourceDirectory>
178                 <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
179                 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/src/main/yang-gen-config\/,**\/src/main/yang-gen-sal\/</excludes>
180               </configuration>
181               <dependencies>
182                 <dependency>
183                 <groupId>org.opendaylight.yangtools</groupId>
184                 <artifactId>checkstyle-logging</artifactId>
185                 <version>${yangtools.version}</version>
186                 </dependency>
187               </dependencies>
188               <executions>
189                 <execution>
190                 <goals>
191                   <goal>check</goal>
192                 </goals>
193                 </execution>
194               </executions>
195             </plugin>
196             <plugin>
197                 <groupId>org.codehaus.mojo</groupId>
198                 <artifactId>build-helper-maven-plugin</artifactId>
199             </plugin>
200             <plugin>
201                 <groupId>org.jacoco</groupId>
202                 <artifactId>jacoco-maven-plugin</artifactId>
203                 <executions>
204                     <execution>
205                         <id>prepare-ut-agent</id>
206                         <phase>process-test-classes</phase>
207                         <goals>
208                             <goal>prepare-agent</goal>
209                         </goals>
210                         <configuration>
211                             <destFile>${sonar.jacoco.reportPath}</destFile>
212                             <propertyName>jacoco.agent.ut.arg</propertyName>
213                         </configuration>
214                     </execution>
215                     <execution>
216                         <id>prepare-it-agent</id>
217                         <phase>pre-integration-test</phase>
218                         <goals>
219                             <goal>prepare-agent</goal>
220                         </goals>
221                         <configuration>
222                             <destFile>${sonar.jacoco.itReportPath}</destFile>
223                             <propertyName>jacoco.agent.it.arg</propertyName>
224                         </configuration>
225                     </execution>
226                 </executions>
227             </plugin>
228         </plugins>
229         <pluginManagement>
230             <plugins>
231                 <plugin>
232                     <groupId>org.opendaylight.yangtools</groupId>
233                     <artifactId>yang-maven-plugin</artifactId>
234                     <version>${yangtools.version}</version>
235                 </plugin>
236                 <plugin>
237                     <groupId>org.codehaus.mojo</groupId>
238                     <artifactId>build-helper-maven-plugin</artifactId>
239                     <version>1.8</version>
240                     <executions>
241                         <execution>
242                             <id>add-source</id>
243                             <goals>
244                                 <goal>add-source</goal>
245                             </goals>
246                             <phase>generate-sources</phase>
247                             <configuration>
248                                 <sources>
249                                     <source>src/main/yang</source>
250                                 </sources>
251                             </configuration>
252                         </execution>
253                     </executions>
254                 </plugin>
255                 <plugin>
256                     <groupId>org.apache.maven.plugins</groupId>
257                     <artifactId>maven-failsafe-plugin</artifactId>
258                     <configuration>
259                         <!-- Specific to generate mapping between tests and covered code -->
260                         <argLine>${jacoco.agent.it.arg}</argLine>
261                         <properties>
262                             <property>
263                                 <name>listener</name>
264                                 <value>org.sonar.java.jacoco.JUnitListener</value>
265                             </property>
266                         </properties>
267                         <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
268                         <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
269                     </configuration>
270                 </plugin>
271                 <plugin>
272                     <groupId>org.apache.maven.plugins</groupId>
273                     <artifactId>maven-surefire-plugin</artifactId>
274                     <configuration>
275                         <!-- Specific to generate mapping between tests and covered code -->
276                         <argLine>${jacoco.agent.ut.arg}</argLine>
277                         <properties>
278                             <property>
279                                 <name>listener</name>
280                                 <value>org.sonar.java.jacoco.JUnitListener</value>
281                             </property>
282                         </properties>
283                     </configuration>
284                 </plugin>
285                 <!-- Ignore/Execute plugin execution -->
286                 <plugin>
287                   <groupId>org.eclipse.m2e</groupId>
288                   <artifactId>lifecycle-mapping</artifactId>
289                   <version>1.0.0</version>
290                   <configuration>
291                     <lifecycleMappingMetadata>
292                       <pluginExecutions>
293                         <pluginExecution>
294                           <pluginExecutionFilter>
295                             <groupId>org.codehaus.mojo</groupId>
296                             <artifactId>properties-maven-plugin</artifactId>
297                             <versionRange>[0.0,)</versionRange>
298                             <goals>
299                               <goal>set-system-properties</goal>
300                             </goals>
301                           </pluginExecutionFilter>
302                           <action>
303                             <ignore/>
304                           </action>
305                         </pluginExecution>
306                         <pluginExecution>
307                           <pluginExecutionFilter>
308                             <groupId>org.codehaus.enunciate</groupId>
309                             <artifactId>maven-enunciate-plugin</artifactId>
310                             <versionRange>[0.0,)</versionRange>
311                             <goals>
312                               <goal>docs</goal>
313                             </goals>
314                           </pluginExecutionFilter>
315                           <action>
316                             <ignore/>
317                           </action>
318                         </pluginExecution>
319                         <pluginExecution>
320                           <pluginExecutionFilter>
321                             <groupId>org.jacoco</groupId>
322                             <artifactId>jacoco-maven-plugin</artifactId>
323                             <versionRange>[0.0,)</versionRange>
324                             <goals>
325                               <goal>prepare-agent</goal>
326                               <goal>pre-test</goal>
327                               <goal>post-test</goal>
328                             </goals>
329                           </pluginExecutionFilter>
330                           <action>
331                             <ignore/>
332                           </action>
333                         </pluginExecution>
334                         <pluginExecution>
335                           <pluginExecutionFilter>
336                             <groupId>org.ops4j.pax.exam</groupId>
337                             <artifactId>maven-paxexam-plugin</artifactId>
338                             <versionRange>[1.2.4,)</versionRange>
339                             <goals>
340                               <goal>generate-depends-file</goal>
341                             </goals>
342                           </pluginExecutionFilter>
343                           <action>
344                             <execute>
345                               <runOnIncremental>false</runOnIncremental>
346                             </execute>
347                           </action>
348                         </pluginExecution>
349                         <pluginExecution>
350                           <pluginExecutionFilter>
351                             <groupId>org.apache.maven.plugins</groupId>
352                             <artifactId>maven-checkstyle-plugin</artifactId>
353                             <versionRange>[2.0,)</versionRange>
354                             <goals>
355                               <goal>check</goal>
356                             </goals>
357                           </pluginExecutionFilter>
358                           <action>
359                             <ignore/>
360                           </action>
361                         </pluginExecution>
362                         <pluginExecution>
363                           <pluginExecutionFilter>
364                             <groupId>org.opendaylight.yangtools</groupId>
365                             <artifactId>yang-maven-plugin</artifactId>
366                             <versionRange>[0.5,)</versionRange>
367                             <goals>
368                               <goal>generate-sources</goal>
369                             </goals>
370                           </pluginExecutionFilter>
371                           <action>
372                             <execute/>
373                           </action>
374                         </pluginExecution>
375                         <pluginExecution>
376                           <pluginExecutionFilter>
377                             <groupId>org.codehaus.groovy.maven</groupId>
378                             <artifactId>gmaven-plugin</artifactId>
379                             <versionRange>1.0</versionRange>
380                             <goals>
381                               <goal>execute</goal>
382                             </goals>
383                           </pluginExecutionFilter>
384                           <action>
385                             <ignore/>
386                           </action>
387                         </pluginExecution>
388                         <pluginExecution>
389                           <pluginExecutionFilter>
390                             <groupId>org.apache.maven.plugins</groupId>
391                             <artifactId>maven-enforcer-plugin</artifactId>
392                             <versionRange>${enforcer.version}</versionRange>
393                             <goals>
394                               <goal>enforce</goal>
395                             </goals>
396                           </pluginExecutionFilter>
397                           <action>
398                             <ignore/>
399                           </action>
400                         </pluginExecution>
401                       </pluginExecutions>
402                     </lifecycleMappingMetadata>
403                   </configuration>
404                 </plugin>
405             </plugins>
406         </pluginManagement>
407     </build>
408     <reporting>
409         <plugins>
410             <plugin>
411                 <groupId>org.codehaus.mojo</groupId>
412                 <artifactId>findbugs-maven-plugin</artifactId>
413                 <version>2.5.2</version>
414                 <configuration>
415                     <effort>Max</effort>
416                     <threshold>Low</threshold>
417                     <goal>site</goal>
418                 </configuration>
419             </plugin>
420             <plugin>
421               <artifactId>maven-jxr-plugin</artifactId>
422               <version>2.3</version>
423               <configuration>
424                 <aggregate>true</aggregate>
425                 <linkJavadoc>true</linkJavadoc>
426               </configuration>
427             </plugin>
428
429             <plugin>
430                 <groupId>org.codehaus.mojo</groupId>
431                 <artifactId>jdepend-maven-plugin</artifactId>
432                 <version>2.0-beta-2</version>
433             </plugin>
434         </plugins>
435     </reporting>
436     <profiles>
437         <profile>
438             <id>viewbuild</id>
439             <activation>
440                 <activeByDefault>true</activeByDefault>
441             </activation>
442             <properties>
443                 <build.suffix>${project.version}</build.suffix>
444             </properties>
445         </profile>
446         <profile>
447             <id>jenkins</id>
448             <activation>
449                 <property>
450                     <name>BUILDSUFFIX</name>
451                 </property>
452             </activation>
453             <properties>
454                 <build.suffix>${BUILDSUFFIX}</build.suffix>
455             </properties>
456         </profile>
457         <profile>
458             <id>repoBuild</id>
459             <build>
460                 <plugins>
461                     <plugin>
462                         <groupId>org.apache.maven.plugins</groupId>
463                         <artifactId>maven-javadoc-plugin</artifactId>
464                         <version>2.8.1</version>
465                         <executions>
466                             <execution>
467                                 <goals>
468                                     <goal>aggregate</goal>
469                                 </goals>
470                                 <phase>site</phase>
471                             </execution>
472                             <execution>
473                                 <id>attach-javadocs</id>
474                                 <goals>
475                                     <goal>jar</goal>
476                                 </goals>
477                             </execution>
478                         </executions>
479                     </plugin>
480                     <plugin>
481                         <groupId>org.apache.maven.plugins</groupId>
482                         <artifactId>maven-source-plugin</artifactId>
483                         <executions>
484                             <execution>
485                                 <id>attach-sources</id>
486                                 <phase>package</phase>
487                                 <goals>
488                                     <goal>jar-no-fork</goal>
489                                 </goals>
490                             </execution>
491                         </executions>
492                     </plugin>
493                 </plugins>
494             </build>
495         </profile>
496     </profiles>
497 </project>