Merge "Bug 584: Test coverage increase"
[yangtools.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.5.0-SNAPSHOT</version>
17         <relativePath></relativePath>
18     </parent>
19
20     <modelVersion>4.0.0</modelVersion>
21     <artifactId>yangtools-parent</artifactId>
22     <groupId>org.opendaylight.yangtools</groupId>
23     <version>0.7.0-SNAPSHOT</version>
24     <packaging>pom</packaging>
25     <prerequisites>
26         <maven>3.0.4</maven>
27     </prerequisites>
28
29     <properties>
30         <commons.io.version>2.4</commons.io.version>
31         <ctrie.version>0.2.0</ctrie.version>
32         <exam.version>3.0.0</exam.version>
33         <groovy.version>2.1.6</groovy.version>
34         <yangtools.version>0.7.0-SNAPSHOT</yangtools.version>
35         <karaf.version>3.0.1</karaf.version>
36         <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
37         <maven.javadoc.version>2.9.1</maven.javadoc.version>
38         <jsr305.version>2.0.1</jsr305.version>
39         <maven.depends.version>1.2</maven.depends.version>
40
41         <!-- Sonar config -->
42         <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
43         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
44         <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
45         <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
46         <sonar.profile>Sonar way with Findbugs</sonar.profile>
47     </properties>
48
49     <profiles>
50         <profile>
51             <id>jdk1.8</id>
52             <activation>
53                 <jdk>1.8</jdk>
54             </activation>
55             <build>
56                 <pluginManagement>
57                     <plugins>
58                         <plugin>
59                             <groupId>org.apache.maven.plugins</groupId>
60                             <artifactId>maven-javadoc-plugin</artifactId>
61                             <version>${maven.javadoc.version}</version>
62                             <configuration>
63                                 <stylesheetfile>stylesheet.css</stylesheetfile>
64                                 <additionalparam>-Xdoclint:none</additionalparam>
65                             </configuration>
66                             <executions>
67                                 <execution>
68                                     <id>attach-javadocs</id>
69                                     <goals>
70                                         <goal>jar</goal>
71                                     </goals>
72                                 </execution>
73                                 <execution>
74                                     <goals>
75                                         <goal>aggregate</goal>
76                                     </goals>
77                                     <phase>site</phase>
78                                 </execution>
79                             </executions>
80                         </plugin>
81                     </plugins>
82                 </pluginManagement>
83             </build>
84         </profile>
85     </profiles>
86
87     <dependencyManagement>
88         <dependencies>
89             <!-- Testing Dependencies -->
90             <dependency>
91                 <groupId>org.apache.maven.shared</groupId>
92                 <artifactId>maven-verifier</artifactId>
93                 <version>1.5</version>
94                 <scope>test</scope>
95             </dependency>
96             <dependency>
97                 <groupId>equinoxSDK381</groupId>
98                 <artifactId>org.eclipse.osgi</artifactId>
99                 <version>3.8.1.v20120830-144521</version>
100                 <scope>test</scope>
101             </dependency>
102             <dependency>
103                 <groupId>org.codehaus.groovy</groupId>
104                 <artifactId>groovy</artifactId>
105                 <version>2.1.6</version>
106                 <scope>test</scope>
107             </dependency>
108             <dependency>
109                 <groupId>org.codehaus.groovy</groupId>
110                 <artifactId>groovy-xml</artifactId>
111                 <version>2.1.6</version>
112                 <scope>test</scope>
113             </dependency>
114             <dependency>
115                 <groupId>xmlunit</groupId>
116                 <artifactId>xmlunit</artifactId>
117                 <version>1.5</version>
118                 <scope>test</scope>
119             </dependency>
120             <dependency>
121                 <groupId>org.apache.maven</groupId>
122                 <artifactId>maven-core</artifactId>
123                 <version>3.0.5</version>
124             </dependency>
125             <dependency>
126                 <groupId>org.apache.maven</groupId>
127                 <artifactId>maven-plugin-api</artifactId>
128                 <version>3.0.5</version>
129             </dependency>
130             <dependency>
131                 <groupId>org.javassist</groupId>
132                 <artifactId>javassist</artifactId>
133                 <version>${javassist.version}</version>
134             </dependency>
135             <dependency>
136                 <groupId>xml-apis</groupId>
137                 <artifactId>xml-apis</artifactId>
138                 <version>2.0.2</version>
139             </dependency>
140             <dependency>
141                 <groupId>org.eclipse.xtend</groupId>
142                 <artifactId>org.eclipse.xtend.lib</artifactId>
143                 <version>2.4.3</version>
144             </dependency>
145             <dependency>
146                 <groupId>org.osgi</groupId>
147                 <artifactId>org.osgi.core</artifactId>
148                 <version>5.0.0</version>
149                 <scope>provided</scope>
150             </dependency>
151             <dependency>
152                 <groupId>javax.ws.rs</groupId>
153                 <artifactId>javax.ws.rs-api</artifactId>
154                 <version>2.0</version>
155             </dependency>
156
157             <dependency>
158                 <groupId>org.glassfish.jersey.ext</groupId>
159                 <artifactId>jersey-proxy-client</artifactId>
160                 <version>2.0</version>
161             </dependency>
162             <dependency>
163                 <groupId>org.glassfish.jersey.core</groupId>
164                 <artifactId>jersey-client</artifactId>
165                 <version>2.0</version>
166             </dependency>
167
168             <dependency>
169                 <groupId>org.opendaylight.yangtools</groupId>
170                 <artifactId>yangtools-artifacts</artifactId>
171                 <version>${yangtools.version}</version>
172                 <scope>import</scope>
173                 <type>pom</type>
174             </dependency>
175         </dependencies>
176     </dependencyManagement>
177
178     <dependencies>
179         <!-- Sonar -->
180         <dependency>
181             <groupId>org.codehaus.sonar-plugins.java</groupId>
182             <artifactId>sonar-jacoco-listeners</artifactId>
183             <version>${sonar-jacoco-listeners.version}</version>
184             <scope>test</scope>
185         </dependency>
186         <dependency>
187             <groupId>org.slf4j</groupId>
188             <artifactId>slf4j-simple</artifactId>
189             <scope>test</scope>
190         </dependency>
191     </dependencies>
192
193     <build>
194         <pluginManagement>
195             <plugins>
196                 <plugin>
197                     <groupId>org.apache.maven.plugins</groupId>
198                     <artifactId>maven-jar-plugin</artifactId>
199                     <version>${maven.jar.version}</version>
200                     <configuration>
201                         <archive>
202                             <!--
203                                  Bundle OSGi Manifest created by maven-bundle-plugin
204                                  into a jar file
205                                  -->
206                             <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
207                         </archive>
208                     </configuration>
209                 </plugin>
210                 <plugin>
211                     <groupId>org.apache.felix</groupId>
212                     <artifactId>maven-bundle-plugin</artifactId>
213                     <version>${maven.bundle.version}</version>
214                     <extensions>true</extensions>
215                     <executions>
216                         <execution>
217                             <id>bundle-manifest</id>
218                             <phase>process-classes</phase>
219                             <goals>
220                                 <goal>manifest</goal>
221                             </goals>
222                         </execution>
223                     </executions>
224                 </plugin>
225                 <plugin>
226                     <groupId>org.apache.maven.plugins</groupId>
227                     <artifactId>maven-failsafe-plugin</artifactId>
228                     <configuration>
229                         <!-- Specific to generate mapping between tests and covered code -->
230                         <argLine>${jacoco.agent.it.arg}</argLine>
231                         <properties>
232                             <property>
233                                 <name>listener</name>
234                                 <value>org.sonar.java.jacoco.JUnitListener</value>
235                             </property>
236                         </properties>
237                         <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
238                         <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
239                     </configuration>
240                 </plugin>
241                 <plugin>
242                     <groupId>org.apache.maven.plugins</groupId>
243                     <artifactId>maven-surefire-plugin</artifactId>
244                     <version>${maven.surefire.version}</version>
245                     <configuration>
246                         <!-- Specific to generate mapping between tests and covered code -->
247                         <argLine>${jacoco.agent.ut.arg}</argLine>
248                         <properties>
249                             <property>
250                                 <name>listener</name>
251                                 <value>org.sonar.java.jacoco.JUnitListener</value>
252                             </property>
253                         </properties>
254                     </configuration>
255                 </plugin>
256
257                 <plugin>
258                     <groupId>org.eclipse.m2e</groupId>
259                     <artifactId>lifecycle-mapping</artifactId>
260                     <version>1.0.0</version>
261                     <configuration>
262                         <lifecycleMappingMetadata>
263                             <pluginExecutions>
264                                 <pluginExecution>
265                                     <pluginExecutionFilter>
266                                         <groupId>org.apache.felix</groupId>
267                                         <artifactId>maven-bundle-plugin</artifactId>
268                                         <versionRange>[1.0,)</versionRange>
269                                         <goals>
270                                             <goal>manifest</goal>
271                                         </goals>
272                                     </pluginExecutionFilter>
273                                     <action>
274                                         <execute />
275                                     </action>
276                                 </pluginExecution>
277                                 <pluginExecution>
278                                     <pluginExecutionFilter>
279                                         <groupId>org.apache.maven.plugins</groupId>
280                                         <artifactId>maven-antrun-plugin</artifactId>
281                                         <versionRange>[1.0,)</versionRange>
282                                         <goals>
283                                             <goal>run</goal>
284                                         </goals>
285                                     </pluginExecutionFilter>
286                                     <action>
287                                         <execute/>
288                                     </action>
289                                 </pluginExecution>
290                                 <pluginExecution>
291                                     <pluginExecutionFilter>
292                                         <groupId>org.opendaylight.yangtools</groupId>
293                                         <artifactId>yang-maven-plugin</artifactId>
294                                         <versionRange>[0.5,)</versionRange>
295                                         <goals>
296                                             <goal>generate-sources</goal>
297                                         </goals>
298                                      </pluginExecutionFilter>
299                                      <action>
300                                          <ignore />
301                                      </action>
302                                  </pluginExecution>
303                                  <pluginExecution>
304                                     <pluginExecutionFilter>
305                                         <groupId>org.codehaus.mojo</groupId>
306                                         <artifactId>properties-maven-plugin</artifactId>
307                                         <versionRange>1.0-alpha-2</versionRange>
308                                         <goals>
309                                             <goal>write-project-properties</goal>
310                                         </goals>
311                                      </pluginExecutionFilter>
312                                      <action>
313                                          <ignore />
314                                      </action>
315                                  </pluginExecution>
316                                  <pluginExecution>
317                                     <pluginExecutionFilter>
318                                         <groupId>org.ops4j.pax.exam</groupId>
319                                         <artifactId>maven-paxexam-plugin</artifactId>
320                                         <versionRange>1.2.4</versionRange>
321                                         <goals>
322                                             <goal>generate-depends-file</goal>
323                                         </goals>
324                                      </pluginExecutionFilter>
325                                      <action>
326                                          <ignore />
327                                      </action>
328                                  </pluginExecution>
329                                  <pluginExecution>
330                                     <pluginExecutionFilter>
331                                         <groupId>org.jacoco</groupId>
332                                         <artifactId>jacoco-maven-plugin</artifactId>
333                                         <versionRange>[0.6,)</versionRange>
334                                         <goals>
335                                             <goal>prepare-agent</goal>
336                                         </goals>
337                                      </pluginExecutionFilter>
338                                      <action>
339                                          <ignore/>
340                                      </action>
341                                  </pluginExecution>
342                             </pluginExecutions>
343                         </lifecycleMappingMetadata>
344                     </configuration>
345                 </plugin>
346                 <plugin>
347                     <groupId>org.opendaylight.yangtools</groupId>
348                     <artifactId>yang-maven-plugin</artifactId>
349                     <version>0.7.0-SNAPSHOT</version>
350                     <executions>
351                         <execution>
352                             <goals>
353                                 <goal>generate-sources</goal>
354                             </goals>
355                             <configuration>
356                                 <yangFilesRootDir>src/main/yang</yangFilesRootDir>
357                                 <codeGenerators>
358                                     <generator>
359                                         <codeGeneratorClass>
360                                             org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
361                                         </codeGeneratorClass>
362                                         <outputBaseDir>
363                                             target/generated-sources/sal
364                                         </outputBaseDir>
365                                     </generator>
366                                     <generator>
367                                         <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
368                                         <outputBaseDir>target/site/restconf</outputBaseDir>
369                                     </generator>
370                                     <generator>
371                                         <codeGeneratorClass>org.opendaylight.yangtools.yang.wadl.generator.maven.WadlGenerator</codeGeneratorClass>
372                                         <outputBaseDir>target/site/restconf</outputBaseDir>
373                                     </generator>
374                                 </codeGenerators>
375                                 <inspectDependencies>true</inspectDependencies>
376                             </configuration>
377                         </execution>
378                     </executions>
379                     <dependencies>
380                         <dependency>
381                             <groupId>org.opendaylight.yangtools</groupId>
382                             <artifactId>maven-sal-api-gen-plugin</artifactId>
383                             <version>0.7.0-SNAPSHOT</version>
384                             <type>jar</type>
385                         </dependency>
386                     </dependencies>
387                 </plugin>
388                 <plugin>
389                     <groupId>org.ops4j.pax.exam</groupId>
390                     <artifactId>maven-paxexam-plugin</artifactId>
391                     <version>1.2.4</version>
392                     <executions>
393                         <execution>
394                             <id>generate-config</id>
395                             <goals>
396                                 <goal>generate-depends-file</goal>
397                             </goals>
398                         </execution>
399                     </executions>
400                 </plugin>
401                 <plugin>
402                     <groupId>org.apache.maven.plugins</groupId>
403                     <artifactId>maven-javadoc-plugin</artifactId>
404                     <version>${maven.javadoc.version}</version>
405                     <configuration>
406                         <stylesheetfile>stylesheet.css</stylesheetfile>
407                     </configuration>
408                     <executions>
409                         <execution>
410                             <id>attach-javadocs</id>
411                             <goals>
412                                 <goal>jar</goal>
413                             </goals>
414                         </execution>
415                         <execution>
416                             <goals>
417                                 <goal>aggregate</goal>
418                             </goals>
419                             <phase>site</phase>
420                         </execution>
421                     </executions>
422                 </plugin>
423                 <plugin>
424                     <groupId>org.codehaus.mojo</groupId>
425                     <artifactId>build-helper-maven-plugin</artifactId>
426                     <version>1.8</version>
427                     <executions>
428                         <execution>
429                             <phase>generate-sources</phase>
430                             <goals>
431                                 <goal>add-source</goal>
432                             </goals>
433                             <configuration>
434                                 <sources>
435                                     <source>target/generated-sources/parser</source>
436                                     <source>target/generated-sources/sal</source>
437                                     <source>${basedir}/src/main/xtend-gen</source>
438                                 </sources>
439                             </configuration>
440                         </execution>
441                     </executions>
442                 </plugin>
443                 <plugin>
444                     <groupId>org.eclipse.xtend</groupId>
445                     <artifactId>xtend-maven-plugin</artifactId>
446                     <version>${xtend.version}</version>
447                     <executions>
448                         <execution>
449                             <goals>
450                                 <goal>compile</goal>
451                             </goals>
452                             <configuration>
453                                 <outputDirectory>${basedir}/src/main/xtend-gen</outputDirectory>
454                             </configuration>
455                         </execution>
456                     </executions>
457                 </plugin>
458                 <plugin>
459                     <groupId>org.apache.servicemix.tooling</groupId>
460                     <artifactId>depends-maven-plugin</artifactId>
461                     <version>${maven.depends.version}</version>
462                     <executions>
463                         <execution>
464                             <id>generate-depends-file</id>
465                             <goals>
466                                 <goal>generate-depends-file</goal>
467                             </goals>
468                         </execution>
469                     </executions>
470                 </plugin>
471             </plugins>
472         </pluginManagement>
473
474         <plugins>
475             <!--
476             <plugin>
477                 <groupId>org.apache.maven.plugins</groupId>
478                 <artifactId>maven-enforcer-plugin</artifactId>
479                 <version>1.0</version>
480                 <executions>
481                     <execution>
482                         <id>enforce</id>
483                         <configuration>
484                             <rules>
485                                 <DependencyConvergence />
486                             </rules>
487                         </configuration>
488                         <goals>
489                             <goal>enforce</goal>
490                         </goals>
491                     </execution>
492                 </executions>
493             </plugin>
494             -->
495             <plugin>
496                 <artifactId>maven-clean-plugin</artifactId>
497                 <version>2.5</version>
498                 <configuration>
499                     <filesets>
500                         <fileset>
501                             <directory>${basedir}/src/main/xtend-gen</directory>
502                             <includes>
503                                 <include>**</include>
504                             </includes>
505                         </fileset>
506                     </filesets>
507                 </configuration>
508             </plugin>
509             <plugin>
510                 <groupId>org.apache.maven.plugins</groupId>
511                 <artifactId>maven-jar-plugin</artifactId>
512             </plugin>
513             <plugin>
514                 <groupId>org.apache.felix</groupId>
515                 <artifactId>maven-bundle-plugin</artifactId>
516             </plugin>
517             <plugin>
518                 <groupId>org.apache.maven.plugins</groupId>
519                 <artifactId>maven-source-plugin</artifactId>
520                 <version>${maven.source.version}</version>
521                 <executions>
522                     <execution>
523                         <id>attach-sources</id>
524                         <goals>
525                             <goal>jar</goal>
526                         </goals>
527                     </execution>
528                 </executions>
529             </plugin>
530             <plugin>
531                 <groupId>org.apache.maven.plugins</groupId>
532                 <artifactId>maven-javadoc-plugin</artifactId>
533             </plugin>
534             <plugin>
535                 <groupId>org.jacoco</groupId>
536                 <artifactId>jacoco-maven-plugin</artifactId>
537                 <version>0.7.2.201409121644</version>
538                 <executions>
539                     <execution>
540                         <id>prepare-ut-agent</id>
541                         <phase>process-test-classes</phase>
542                         <goals>
543                             <goal>prepare-agent</goal>
544                         </goals>
545                         <configuration>
546                             <destFile>${sonar.jacoco.reportPath}</destFile>
547                             <propertyName>jacoco.agent.ut.arg</propertyName>
548                         </configuration>
549                     </execution>
550                     <execution>
551                         <id>prepare-it-agent</id>
552                         <phase>pre-integration-test</phase>
553                         <goals>
554                             <goal>prepare-agent</goal>
555                         </goals>
556                         <configuration>
557                             <destFile>${sonar.jacoco.itReportPath}</destFile>
558                             <propertyName>jacoco.agent.it.arg</propertyName>
559                         </configuration>
560                     </execution>
561                 </executions>
562             </plugin>
563         </plugins>
564     </build>
565
566     <reporting>
567         <plugins>
568             <plugin>
569                 <groupId>org.codehaus.mojo</groupId>
570                 <artifactId>findbugs-maven-plugin</artifactId>
571                 <version>${findbugs.maven.plugin.version}</version>
572                 <configuration>
573                     <effort>Max</effort>
574                     <threshold>Low</threshold>
575                     <goal>site</goal>
576                 </configuration>
577             </plugin>
578             <plugin>
579                 <groupId>org.codehaus.mojo</groupId>
580                 <artifactId>jdepend-maven-plugin</artifactId>
581                 <version>${jdepend.maven.plugin.version}</version>
582             </plugin>
583         </plugins>
584     </reporting>
585
586
587     <!-- Note: we can not use variables for these URLs because we need to
588          be able to download the parent pom from the repository the first 
589          time we go to use it (since it is in a different project).
590          To override the settings, use the "mirror" section of the
591          settings.xml. See http://maven.apache.org/settings.html -->
592     <repositories>
593         <!-- OpenDayLight Repo Mirror -->
594         <repository>
595             <id>opendaylight-mirror</id>
596             <name>opendaylight-mirror</name>
597             <url>http://nexus.opendaylight.org/content/groups/public/</url>
598             <snapshots>
599                 <enabled>false</enabled>
600             </snapshots>
601             <releases>
602                 <enabled>true</enabled>
603                 <updatePolicy>never</updatePolicy>
604             </releases>
605         </repository>
606
607         <!-- OpenDayLight Snapshot artifact -->
608         <repository>
609             <id>opendaylight-snapshot</id>
610             <name>opendaylight-snapshot</name>
611             <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
612             <snapshots>
613                 <enabled>true</enabled>
614             </snapshots>
615             <releases>
616                 <enabled>false</enabled>
617             </releases>
618         </repository>
619     </repositories>
620 </project>