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