6127ebb6f87f2fe669f9a6a0f85ead2240bc40bf
[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.6.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.8.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                             </pluginExecutions>
293                         </lifecycleMappingMetadata>
294                     </configuration>
295                 </plugin>
296                 <plugin>
297                     <groupId>org.opendaylight.yangtools</groupId>
298                     <artifactId>yang-maven-plugin</artifactId>
299                     <version>0.8.0-SNAPSHOT</version>
300                     <executions>
301                         <execution>
302                             <goals>
303                                 <goal>generate-sources</goal>
304                             </goals>
305                             <configuration>
306                                 <yangFilesRootDir>src/main/yang</yangFilesRootDir>
307                                 <codeGenerators>
308                                     <generator>
309                                         <codeGeneratorClass>
310                                             org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
311                                         </codeGeneratorClass>
312                                         <outputBaseDir>
313                                             target/generated-sources/sal
314                                         </outputBaseDir>
315                                     </generator>
316                                     <generator>
317                                         <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
318                                         <outputBaseDir>target/site/restconf</outputBaseDir>
319                                     </generator>
320                                     <generator>
321                                         <codeGeneratorClass>org.opendaylight.yangtools.yang.wadl.generator.maven.WadlGenerator</codeGeneratorClass>
322                                         <outputBaseDir>target/site/restconf</outputBaseDir>
323                                     </generator>
324                                 </codeGenerators>
325                                 <inspectDependencies>true</inspectDependencies>
326                             </configuration>
327                         </execution>
328                     </executions>
329                     <dependencies>
330                         <dependency>
331                             <groupId>org.opendaylight.yangtools</groupId>
332                             <artifactId>maven-sal-api-gen-plugin</artifactId>
333                             <version>0.8.0-SNAPSHOT</version>
334                             <type>jar</type>
335                         </dependency>
336                     </dependencies>
337                 </plugin>
338                 <plugin>
339                     <groupId>org.ops4j.pax.exam</groupId>
340                     <artifactId>maven-paxexam-plugin</artifactId>
341                     <version>1.2.4</version>
342                     <executions>
343                         <execution>
344                             <id>generate-config</id>
345                             <goals>
346                                 <goal>generate-depends-file</goal>
347                             </goals>
348                         </execution>
349                     </executions>
350                 </plugin>
351                 <plugin>
352                     <groupId>org.apache.maven.plugins</groupId>
353                     <artifactId>maven-javadoc-plugin</artifactId>
354                     <version>${maven.javadoc.version}</version>
355                     <configuration>
356                         <stylesheetfile>stylesheet.css</stylesheetfile>
357                     </configuration>
358                     <executions>
359                         <execution>
360                             <id>attach-javadocs</id>
361                             <goals>
362                                 <goal>jar</goal>
363                             </goals>
364                         </execution>
365                         <execution>
366                             <goals>
367                                 <goal>aggregate</goal>
368                             </goals>
369                             <phase>site</phase>
370                         </execution>
371                     </executions>
372                 </plugin>
373                 <plugin>
374                     <groupId>org.codehaus.mojo</groupId>
375                     <artifactId>build-helper-maven-plugin</artifactId>
376                     <version>1.8</version>
377                     <executions>
378                         <execution>
379                             <phase>generate-sources</phase>
380                             <goals>
381                                 <goal>add-source</goal>
382                             </goals>
383                             <configuration>
384                                 <sources>
385                                     <source>target/generated-sources/parser</source>
386                                     <source>target/generated-sources/sal</source>
387                                     <source>${basedir}/src/main/xtend-gen</source>
388                                 </sources>
389                             </configuration>
390                         </execution>
391                     </executions>
392                 </plugin>
393                 <plugin>
394                     <groupId>org.eclipse.xtend</groupId>
395                     <artifactId>xtend-maven-plugin</artifactId>
396                     <version>2.7.3</version>
397                     <executions>
398                         <execution>
399                             <goals>
400                                 <goal>compile</goal>
401                             </goals>
402                             <configuration>
403                                 <outputDirectory>${basedir}/src/main/xtend-gen</outputDirectory>
404                             </configuration>
405                         </execution>
406                     </executions>
407                 </plugin>
408                 <plugin>
409                     <groupId>org.apache.servicemix.tooling</groupId>
410                     <artifactId>depends-maven-plugin</artifactId>
411                     <version>${maven.depends.version}</version>
412                     <executions>
413                         <execution>
414                             <id>generate-depends-file</id>
415                             <goals>
416                                 <goal>generate-depends-file</goal>
417                             </goals>
418                         </execution>
419                     </executions>
420                 </plugin>
421             </plugins>
422         </pluginManagement>
423
424         <plugins>
425             <plugin>
426                 <groupId>org.apache.maven.plugins</groupId>
427                 <artifactId>maven-enforcer-plugin</artifactId>
428                 <!--
429                 <executions>
430                     <execution>
431                         <id>enforce-dependencies</id>
432                         <configuration>
433                             <rules>
434                                 <DependencyConvergence />
435                             </rules>
436                         </configuration>
437                         <goals>
438                             <goal>enforce</goal>
439                         </goals>
440                     </execution>
441                 </executions>
442                 -->
443             </plugin>
444
445             <plugin>
446                 <artifactId>maven-clean-plugin</artifactId>
447                 <configuration>
448                     <filesets>
449                         <fileset>
450                             <directory>${basedir}/src/main/xtend-gen</directory>
451                             <includes>
452                                 <include>**</include>
453                             </includes>
454                         </fileset>
455                     </filesets>
456                 </configuration>
457             </plugin>
458             <plugin>
459                 <groupId>org.apache.maven.plugins</groupId>
460                 <artifactId>maven-jar-plugin</artifactId>
461             </plugin>
462             <plugin>
463                 <groupId>org.apache.felix</groupId>
464                 <artifactId>maven-bundle-plugin</artifactId>
465             </plugin>
466             <plugin>
467                 <groupId>org.apache.maven.plugins</groupId>
468                 <artifactId>maven-source-plugin</artifactId>
469                 <executions>
470                     <execution>
471                         <id>attach-sources</id>
472                         <goals>
473                             <goal>jar</goal>
474                         </goals>
475                     </execution>
476                 </executions>
477             </plugin>
478             <plugin>
479                 <groupId>org.apache.maven.plugins</groupId>
480                 <artifactId>maven-javadoc-plugin</artifactId>
481             </plugin>
482             <plugin>
483                 <groupId>org.jacoco</groupId>
484                 <artifactId>jacoco-maven-plugin</artifactId>
485                 <executions>
486                     <execution>
487                         <id>prepare-ut-agent</id>
488                         <phase>process-test-classes</phase>
489                         <goals>
490                             <goal>prepare-agent</goal>
491                         </goals>
492                         <configuration>
493                             <destFile>${sonar.jacoco.reportPath}</destFile>
494                             <propertyName>jacoco.agent.ut.arg</propertyName>
495                         </configuration>
496                     </execution>
497                     <execution>
498                         <id>prepare-it-agent</id>
499                         <phase>pre-integration-test</phase>
500                         <goals>
501                             <goal>prepare-agent</goal>
502                         </goals>
503                         <configuration>
504                             <destFile>${sonar.jacoco.itReportPath}</destFile>
505                             <propertyName>jacoco.agent.it.arg</propertyName>
506                         </configuration>
507                     </execution>
508                 </executions>
509             </plugin>
510         </plugins>
511     </build>
512
513     <reporting>
514         <plugins>
515             <plugin>
516                 <groupId>org.codehaus.mojo</groupId>
517                 <artifactId>findbugs-maven-plugin</artifactId>
518                 <version>${findbugs.maven.plugin.version}</version>
519                 <configuration>
520                     <effort>Max</effort>
521                     <threshold>Low</threshold>
522                     <goal>site</goal>
523                 </configuration>
524             </plugin>
525             <plugin>
526                 <groupId>org.codehaus.mojo</groupId>
527                 <artifactId>jdepend-maven-plugin</artifactId>
528                 <version>${jdepend.maven.plugin.version}</version>
529             </plugin>
530         </plugins>
531     </reporting>
532 </project>