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