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