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