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