Introduce top-level pom file.
[mdsal.git] / common / parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4  Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
5
6  This program and the accompanying materials are made available under the
7  terms of the Eclipse Public License v1.0 which accompanies this distribution,
8  and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12
13     <parent>
14         <groupId>org.opendaylight.odlparent</groupId>
15         <artifactId>odlparent</artifactId>
16         <version>1.6.0-SNAPSHOT</version>
17         <relativePath></relativePath>
18     </parent>
19
20     <modelVersion>4.0.0</modelVersion>
21     <artifactId>mdsal-parent</artifactId>
22     <groupId>org.opendaylight.mdsal</groupId>
23     <version>2.0.0-SNAPSHOT</version>
24     <packaging>pom</packaging>
25
26     <properties>
27         <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
28
29         <!-- FIXME: these will be upstreamed -->
30         <maven.depends.version>1.2</maven.depends.version>
31         <maven.javadoc.version>2.9.1</maven.javadoc.version>
32         <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
33         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
34         <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
35         <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
36     </properties>
37
38     <dependencyManagement>
39         <dependencies>
40             <!-- Testing Dependencies -->
41             <dependency>
42                 <groupId>org.apache.maven.shared</groupId>
43                 <artifactId>maven-verifier</artifactId>
44                 <version>1.5</version>
45                 <scope>test</scope>
46             </dependency>
47             <dependency>
48                 <groupId>equinoxSDK381</groupId>
49                 <artifactId>org.eclipse.osgi</artifactId>
50                 <version>3.8.1.v20120830-144521</version>
51                 <scope>test</scope>
52             </dependency>
53             <dependency>
54                 <groupId>org.codehaus.groovy</groupId>
55                 <artifactId>groovy</artifactId>
56                 <version>2.1.6</version>
57                 <scope>test</scope>
58             </dependency>
59             <dependency>
60                 <groupId>org.codehaus.groovy</groupId>
61                 <artifactId>groovy-xml</artifactId>
62                 <version>2.1.6</version>
63                 <scope>test</scope>
64             </dependency>
65             <dependency>
66                 <groupId>xmlunit</groupId>
67                 <artifactId>xmlunit</artifactId>
68                 <version>1.5</version>
69                 <scope>test</scope>
70             </dependency>
71             <dependency>
72                 <groupId>org.apache.maven</groupId>
73                 <artifactId>maven-core</artifactId>
74                 <version>3.1.1</version>
75             </dependency>
76             <dependency>
77                 <groupId>org.apache.maven</groupId>
78                 <artifactId>maven-plugin-api</artifactId>
79                 <version>3.1.1</version>
80             </dependency>
81             <dependency>
82                 <groupId>org.javassist</groupId>
83                 <artifactId>javassist</artifactId>
84                 <version>${javassist.version}</version>
85             </dependency>
86             <dependency>
87                 <groupId>xml-apis</groupId>
88                 <artifactId>xml-apis</artifactId>
89                 <version>2.0.2</version>
90             </dependency>
91             <dependency>
92                 <groupId>org.eclipse.xtend</groupId>
93                 <artifactId>org.eclipse.xtend.lib</artifactId>
94                 <version>2.7.3</version>
95             </dependency>
96             <dependency>
97                 <groupId>org.osgi</groupId>
98                 <artifactId>org.osgi.core</artifactId>
99                 <version>5.0.0</version>
100                 <scope>provided</scope>
101             </dependency>
102             <dependency>
103                 <groupId>javax.ws.rs</groupId>
104                 <artifactId>javax.ws.rs-api</artifactId>
105                 <version>2.0</version>
106             </dependency>
107
108             <dependency>
109                 <groupId>org.glassfish.jersey.ext</groupId>
110                 <artifactId>jersey-proxy-client</artifactId>
111                 <version>2.0</version>
112             </dependency>
113             <dependency>
114                 <groupId>org.glassfish.jersey.core</groupId>
115                 <artifactId>jersey-client</artifactId>
116                 <version>2.0</version>
117             </dependency>
118
119             <dependency>
120                 <groupId>org.opendaylight.yangtools</groupId>
121                 <artifactId>yangtools-artifacts</artifactId>
122                 <version>${yangtools.version}</version>
123                 <scope>import</scope>
124                 <type>pom</type>
125             </dependency>
126         </dependencies>
127     </dependencyManagement>
128
129     <dependencies>
130         <!-- Sonar -->
131         <dependency>
132             <groupId>org.codehaus.sonar-plugins.java</groupId>
133             <artifactId>sonar-jacoco-listeners</artifactId>
134             <version>${sonar-jacoco-listeners.version}</version>
135             <scope>test</scope>
136         </dependency>
137         <dependency>
138             <groupId>org.slf4j</groupId>
139             <artifactId>slf4j-simple</artifactId>
140             <scope>test</scope>
141         </dependency>
142     </dependencies>
143
144     <build>
145         <pluginManagement>
146             <plugins>
147                 <plugin>
148                     <groupId>org.apache.maven.plugins</groupId>
149                     <artifactId>maven-jar-plugin</artifactId>
150                     <version>${maven.jar.version}</version>
151                     <configuration>
152                         <archive>
153                             <!--
154                                  Bundle OSGi Manifest created by maven-bundle-plugin
155                                  into a jar file
156                                  -->
157                             <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
158                         </archive>
159                     </configuration>
160                 </plugin>
161                 <plugin>
162                     <groupId>org.apache.felix</groupId>
163                     <artifactId>maven-bundle-plugin</artifactId>
164                     <extensions>true</extensions>
165                     <executions>
166                         <execution>
167                             <id>bundle-manifest</id>
168                             <phase>process-classes</phase>
169                             <goals>
170                                 <goal>manifest</goal>
171                             </goals>
172                         </execution>
173                     </executions>
174                 </plugin>
175                 <plugin>
176                     <groupId>org.apache.maven.plugins</groupId>
177                     <artifactId>maven-failsafe-plugin</artifactId>
178                     <configuration>
179                         <!-- Specific to generate mapping between tests and covered code -->
180                         <argLine>${jacoco.agent.it.arg}</argLine>
181                         <properties>
182                             <property>
183                                 <name>listener</name>
184                                 <value>org.sonar.java.jacoco.JUnitListener</value>
185                             </property>
186                         </properties>
187                         <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
188                         <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
189                     </configuration>
190                 </plugin>
191                 <plugin>
192                     <groupId>org.apache.maven.plugins</groupId>
193                     <artifactId>maven-surefire-plugin</artifactId>
194                     <version>${maven.surefire.version}</version>
195                     <configuration>
196                         <!-- Specific to generate mapping between tests and covered code -->
197                         <argLine>${jacoco.agent.ut.arg}</argLine>
198                         <properties>
199                             <property>
200                                 <name>listener</name>
201                                 <value>org.sonar.java.jacoco.JUnitListener</value>
202                             </property>
203                         </properties>
204                     </configuration>
205                 </plugin>
206
207                 <plugin>
208                     <groupId>org.eclipse.m2e</groupId>
209                     <artifactId>lifecycle-mapping</artifactId>
210                     <version>1.0.0</version>
211                     <configuration>
212                         <lifecycleMappingMetadata>
213                             <pluginExecutions>
214                                 <pluginExecution>
215                                     <pluginExecutionFilter>
216                                         <groupId>org.apache.felix</groupId>
217                                         <artifactId>maven-bundle-plugin</artifactId>
218                                         <versionRange>[1.0,)</versionRange>
219                                         <goals>
220                                             <goal>manifest</goal>
221                                         </goals>
222                                     </pluginExecutionFilter>
223                                     <action>
224                                         <execute />
225                                     </action>
226                                 </pluginExecution>
227                                 <pluginExecution>
228                                     <pluginExecutionFilter>
229                                         <groupId>org.apache.maven.plugins</groupId>
230                                         <artifactId>maven-antrun-plugin</artifactId>
231                                         <versionRange>[1.0,)</versionRange>
232                                         <goals>
233                                             <goal>run</goal>
234                                         </goals>
235                                     </pluginExecutionFilter>
236                                     <action>
237                                         <execute/>
238                                     </action>
239                                 </pluginExecution>
240                                 <pluginExecution>
241                                     <pluginExecutionFilter>
242                                         <groupId>org.opendaylight.yangtools</groupId>
243                                         <artifactId>yang-maven-plugin</artifactId>
244                                         <versionRange>[0.5,)</versionRange>
245                                         <goals>
246                                             <goal>generate-sources</goal>
247                                         </goals>
248                                      </pluginExecutionFilter>
249                                      <action>
250                                          <execute/>
251                                      </action>
252                                  </pluginExecution>
253                                  <pluginExecution>
254                                     <pluginExecutionFilter>
255                                         <groupId>org.codehaus.mojo</groupId>
256                                         <artifactId>properties-maven-plugin</artifactId>
257                                         <versionRange>1.0-alpha-2</versionRange>
258                                         <goals>
259                                             <goal>write-project-properties</goal>
260                                         </goals>
261                                      </pluginExecutionFilter>
262                                      <action>
263                                          <ignore />
264                                      </action>
265                                  </pluginExecution>
266                                  <pluginExecution>
267                                     <pluginExecutionFilter>
268                                         <groupId>org.ops4j.pax.exam</groupId>
269                                         <artifactId>maven-paxexam-plugin</artifactId>
270                                         <versionRange>1.2.4</versionRange>
271                                         <goals>
272                                             <goal>generate-depends-file</goal>
273                                         </goals>
274                                      </pluginExecutionFilter>
275                                      <action>
276                                          <ignore />
277                                      </action>
278                                  </pluginExecution>
279                                  <pluginExecution>
280                                     <pluginExecutionFilter>
281                                         <groupId>org.jacoco</groupId>
282                                         <artifactId>jacoco-maven-plugin</artifactId>
283                                         <versionRange>[0.6,)</versionRange>
284                                         <goals>
285                                             <goal>prepare-agent</goal>
286                                         </goals>
287                                      </pluginExecutionFilter>
288                                      <action>
289                                          <ignore/>
290                                      </action>
291                                  </pluginExecution>
292                                  <pluginExecution>
293                                     <pluginExecutionFilter>
294                                         <groupId>org.apache.maven.plugins</groupId>
295                                         <artifactId>maven-checkstyle-plugin</artifactId>
296                                         <versionRange>[2.12,)</versionRange>
297                                         <goals>
298                                             <goal>check</goal>
299                                         </goals>
300                                      </pluginExecutionFilter>
301                                      <action>
302                                          <execute/>
303                                      </action>
304                                  </pluginExecution>
305                             </pluginExecutions>
306                         </lifecycleMappingMetadata>
307                     </configuration>
308                 </plugin>
309                 <plugin>
310                     <groupId>org.opendaylight.yangtools</groupId>
311                     <artifactId>yang-maven-plugin</artifactId>
312                     <version>0.8.0-SNAPSHOT</version>
313                     <executions>
314                         <execution>
315                             <goals>
316                                 <goal>generate-sources</goal>
317                             </goals>
318                             <configuration>
319                                 <yangFilesRootDir>src/main/yang</yangFilesRootDir>
320                                 <codeGenerators>
321                                     <generator>
322                                         <codeGeneratorClass>
323                                             org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
324                                         </codeGeneratorClass>
325                                         <outputBaseDir>
326                                             target/generated-sources/sal
327                                         </outputBaseDir>
328                                     </generator>
329                                     <generator>
330                                         <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
331                                         <outputBaseDir>target/site/restconf</outputBaseDir>
332                                     </generator>
333                                     <generator>
334                                         <codeGeneratorClass>org.opendaylight.yangtools.yang.wadl.generator.maven.WadlGenerator</codeGeneratorClass>
335                                         <outputBaseDir>target/site/restconf</outputBaseDir>
336                                     </generator>
337                                 </codeGenerators>
338                                 <inspectDependencies>true</inspectDependencies>
339                             </configuration>
340                         </execution>
341                     </executions>
342                     <dependencies>
343                         <dependency>
344                             <groupId>org.opendaylight.yangtools</groupId>
345                             <artifactId>maven-sal-api-gen-plugin</artifactId>
346                             <version>0.8.0-SNAPSHOT</version>
347                             <type>jar</type>
348                         </dependency>
349                     </dependencies>
350                 </plugin>
351                 <plugin>
352                     <groupId>org.ops4j.pax.exam</groupId>
353                     <artifactId>maven-paxexam-plugin</artifactId>
354                     <version>1.2.4</version>
355                     <executions>
356                         <execution>
357                             <id>generate-config</id>
358                             <goals>
359                                 <goal>generate-depends-file</goal>
360                             </goals>
361                         </execution>
362                     </executions>
363                 </plugin>
364                 <plugin>
365                     <groupId>org.apache.maven.plugins</groupId>
366                     <artifactId>maven-javadoc-plugin</artifactId>
367                     <version>${maven.javadoc.version}</version>
368                     <configuration>
369                         <stylesheetfile>stylesheet.css</stylesheetfile>
370                     </configuration>
371                     <executions>
372                         <execution>
373                             <id>attach-javadocs</id>
374                             <goals>
375                                 <goal>jar</goal>
376                             </goals>
377                         </execution>
378                         <execution>
379                             <goals>
380                                 <goal>aggregate</goal>
381                             </goals>
382                             <phase>site</phase>
383                         </execution>
384                     </executions>
385                 </plugin>
386                 <plugin>
387                     <groupId>org.codehaus.mojo</groupId>
388                     <artifactId>build-helper-maven-plugin</artifactId>
389                     <version>1.8</version>
390                     <executions>
391                         <execution>
392                             <phase>generate-sources</phase>
393                             <goals>
394                                 <goal>add-source</goal>
395                             </goals>
396                             <configuration>
397                                 <sources>
398                                     <source>target/generated-sources/parser</source>
399                                     <source>target/generated-sources/sal</source>
400                                     <source>${basedir}/src/main/xtend-gen</source>
401                                 </sources>
402                             </configuration>
403                         </execution>
404                     </executions>
405                 </plugin>
406                 <plugin>
407                     <groupId>org.eclipse.xtend</groupId>
408                     <artifactId>xtend-maven-plugin</artifactId>
409                     <version>2.7.3</version>
410                     <executions>
411                         <execution>
412                             <goals>
413                                 <goal>compile</goal>
414                             </goals>
415                             <configuration>
416                                 <outputDirectory>${basedir}/src/main/xtend-gen</outputDirectory>
417                             </configuration>
418                         </execution>
419                     </executions>
420                 </plugin>
421                 <plugin>
422                     <groupId>org.apache.servicemix.tooling</groupId>
423                     <artifactId>depends-maven-plugin</artifactId>
424                     <version>${maven.depends.version}</version>
425                     <executions>
426                         <execution>
427                             <id>generate-depends-file</id>
428                             <goals>
429                                 <goal>generate-depends-file</goal>
430                             </goals>
431                         </execution>
432                     </executions>
433                 </plugin>
434             </plugins>
435         </pluginManagement>
436
437         <plugins>
438             <plugin>
439                 <groupId>org.apache.maven.plugins</groupId>
440                 <artifactId>maven-enforcer-plugin</artifactId>
441                 <!--
442                 <executions>
443                     <execution>
444                         <id>enforce-dependencies</id>
445                         <configuration>
446                             <rules>
447                                 <DependencyConvergence />
448                             </rules>
449                         </configuration>
450                         <goals>
451                             <goal>enforce</goal>
452                         </goals>
453                     </execution>
454                 </executions>
455                 -->
456             </plugin>
457
458             <plugin>
459                 <artifactId>maven-clean-plugin</artifactId>
460                 <configuration>
461                     <filesets>
462                         <fileset>
463                             <directory>${basedir}/src/main/xtend-gen</directory>
464                             <includes>
465                                 <include>**</include>
466                             </includes>
467                         </fileset>
468                     </filesets>
469                 </configuration>
470             </plugin>
471             <plugin>
472                 <groupId>org.apache.maven.plugins</groupId>
473                 <artifactId>maven-jar-plugin</artifactId>
474             </plugin>
475             <plugin>
476                 <groupId>org.apache.felix</groupId>
477                 <artifactId>maven-bundle-plugin</artifactId>
478             </plugin>
479             <plugin>
480                 <groupId>org.apache.maven.plugins</groupId>
481                 <artifactId>maven-source-plugin</artifactId>
482                 <executions>
483                     <execution>
484                         <id>attach-sources</id>
485                         <goals>
486                             <goal>jar</goal>
487                         </goals>
488                     </execution>
489                 </executions>
490             </plugin>
491             <plugin>
492                 <groupId>org.apache.maven.plugins</groupId>
493                 <artifactId>maven-javadoc-plugin</artifactId>
494             </plugin>
495             <plugin>
496                 <groupId>org.jacoco</groupId>
497                 <artifactId>jacoco-maven-plugin</artifactId>
498                 <executions>
499                     <execution>
500                         <id>prepare-ut-agent</id>
501                         <phase>process-test-classes</phase>
502                         <goals>
503                             <goal>prepare-agent</goal>
504                         </goals>
505                         <configuration>
506                             <destFile>${sonar.jacoco.reportPath}</destFile>
507                             <propertyName>jacoco.agent.ut.arg</propertyName>
508                         </configuration>
509                     </execution>
510                     <execution>
511                         <id>prepare-it-agent</id>
512                         <phase>pre-integration-test</phase>
513                         <goals>
514                             <goal>prepare-agent</goal>
515                         </goals>
516                         <configuration>
517                             <destFile>${sonar.jacoco.itReportPath}</destFile>
518                             <propertyName>jacoco.agent.it.arg</propertyName>
519                         </configuration>
520                     </execution>
521                 </executions>
522             </plugin>
523         </plugins>
524     </build>
525
526     <reporting>
527         <plugins>
528             <plugin>
529                 <groupId>org.codehaus.mojo</groupId>
530                 <artifactId>findbugs-maven-plugin</artifactId>
531                 <version>${findbugs.maven.plugin.version}</version>
532                 <configuration>
533                     <effort>Max</effort>
534                     <threshold>Low</threshold>
535                     <goal>site</goal>
536                 </configuration>
537             </plugin>
538             <plugin>
539                 <groupId>org.codehaus.mojo</groupId>
540                 <artifactId>jdepend-maven-plugin</artifactId>
541                 <version>${jdepend.maven.plugin.version}</version>
542             </plugin>
543         </plugins>
544     </reporting>
545 </project>