a5b37272aca40df9a2d384f917a80fe7f478a0d2
[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
26     <properties>
27         <yangtools.version>0.7.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                     <version>${maven.bundle.version}</version>
165                     <extensions>true</extensions>
166                     <executions>
167                         <execution>
168                             <id>bundle-manifest</id>
169                             <phase>process-classes</phase>
170                             <goals>
171                                 <goal>manifest</goal>
172                             </goals>
173                         </execution>
174                     </executions>
175                 </plugin>
176                 <plugin>
177                     <groupId>org.apache.maven.plugins</groupId>
178                     <artifactId>maven-failsafe-plugin</artifactId>
179                     <configuration>
180                         <!-- Specific to generate mapping between tests and covered code -->
181                         <argLine>${jacoco.agent.it.arg}</argLine>
182                         <properties>
183                             <property>
184                                 <name>listener</name>
185                                 <value>org.sonar.java.jacoco.JUnitListener</value>
186                             </property>
187                         </properties>
188                         <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
189                         <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
190                     </configuration>
191                 </plugin>
192                 <plugin>
193                     <groupId>org.apache.maven.plugins</groupId>
194                     <artifactId>maven-surefire-plugin</artifactId>
195                     <version>${maven.surefire.version}</version>
196                     <configuration>
197                         <!-- Specific to generate mapping between tests and covered code -->
198                         <argLine>${jacoco.agent.ut.arg}</argLine>
199                         <properties>
200                             <property>
201                                 <name>listener</name>
202                                 <value>org.sonar.java.jacoco.JUnitListener</value>
203                             </property>
204                         </properties>
205                     </configuration>
206                 </plugin>
207
208                 <plugin>
209                     <groupId>org.eclipse.m2e</groupId>
210                     <artifactId>lifecycle-mapping</artifactId>
211                     <version>1.0.0</version>
212                     <configuration>
213                         <lifecycleMappingMetadata>
214                             <pluginExecutions>
215                                 <pluginExecution>
216                                     <pluginExecutionFilter>
217                                         <groupId>org.apache.felix</groupId>
218                                         <artifactId>maven-bundle-plugin</artifactId>
219                                         <versionRange>[1.0,)</versionRange>
220                                         <goals>
221                                             <goal>manifest</goal>
222                                         </goals>
223                                     </pluginExecutionFilter>
224                                     <action>
225                                         <execute />
226                                     </action>
227                                 </pluginExecution>
228                                 <pluginExecution>
229                                     <pluginExecutionFilter>
230                                         <groupId>org.apache.maven.plugins</groupId>
231                                         <artifactId>maven-antrun-plugin</artifactId>
232                                         <versionRange>[1.0,)</versionRange>
233                                         <goals>
234                                             <goal>run</goal>
235                                         </goals>
236                                     </pluginExecutionFilter>
237                                     <action>
238                                         <execute/>
239                                     </action>
240                                 </pluginExecution>
241                                 <pluginExecution>
242                                     <pluginExecutionFilter>
243                                         <groupId>org.opendaylight.yangtools</groupId>
244                                         <artifactId>yang-maven-plugin</artifactId>
245                                         <versionRange>[0.5,)</versionRange>
246                                         <goals>
247                                             <goal>generate-sources</goal>
248                                         </goals>
249                                      </pluginExecutionFilter>
250                                      <action>
251                                          <ignore />
252                                      </action>
253                                  </pluginExecution>
254                                  <pluginExecution>
255                                     <pluginExecutionFilter>
256                                         <groupId>org.codehaus.mojo</groupId>
257                                         <artifactId>properties-maven-plugin</artifactId>
258                                         <versionRange>1.0-alpha-2</versionRange>
259                                         <goals>
260                                             <goal>write-project-properties</goal>
261                                         </goals>
262                                      </pluginExecutionFilter>
263                                      <action>
264                                          <ignore />
265                                      </action>
266                                  </pluginExecution>
267                                  <pluginExecution>
268                                     <pluginExecutionFilter>
269                                         <groupId>org.ops4j.pax.exam</groupId>
270                                         <artifactId>maven-paxexam-plugin</artifactId>
271                                         <versionRange>1.2.4</versionRange>
272                                         <goals>
273                                             <goal>generate-depends-file</goal>
274                                         </goals>
275                                      </pluginExecutionFilter>
276                                      <action>
277                                          <ignore />
278                                      </action>
279                                  </pluginExecution>
280                                  <pluginExecution>
281                                     <pluginExecutionFilter>
282                                         <groupId>org.jacoco</groupId>
283                                         <artifactId>jacoco-maven-plugin</artifactId>
284                                         <versionRange>[0.6,)</versionRange>
285                                         <goals>
286                                             <goal>prepare-agent</goal>
287                                         </goals>
288                                      </pluginExecutionFilter>
289                                      <action>
290                                          <ignore/>
291                                      </action>
292                                  </pluginExecution>
293                             </pluginExecutions>
294                         </lifecycleMappingMetadata>
295                     </configuration>
296                 </plugin>
297                 <plugin>
298                     <groupId>org.opendaylight.yangtools</groupId>
299                     <artifactId>yang-maven-plugin</artifactId>
300                     <version>0.7.0-SNAPSHOT</version>
301                     <executions>
302                         <execution>
303                             <goals>
304                                 <goal>generate-sources</goal>
305                             </goals>
306                             <configuration>
307                                 <yangFilesRootDir>src/main/yang</yangFilesRootDir>
308                                 <codeGenerators>
309                                     <generator>
310                                         <codeGeneratorClass>
311                                             org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
312                                         </codeGeneratorClass>
313                                         <outputBaseDir>
314                                             target/generated-sources/sal
315                                         </outputBaseDir>
316                                     </generator>
317                                     <generator>
318                                         <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
319                                         <outputBaseDir>target/site/restconf</outputBaseDir>
320                                     </generator>
321                                     <generator>
322                                         <codeGeneratorClass>org.opendaylight.yangtools.yang.wadl.generator.maven.WadlGenerator</codeGeneratorClass>
323                                         <outputBaseDir>target/site/restconf</outputBaseDir>
324                                     </generator>
325                                 </codeGenerators>
326                                 <inspectDependencies>true</inspectDependencies>
327                             </configuration>
328                         </execution>
329                     </executions>
330                     <dependencies>
331                         <dependency>
332                             <groupId>org.opendaylight.yangtools</groupId>
333                             <artifactId>maven-sal-api-gen-plugin</artifactId>
334                             <version>0.7.0-SNAPSHOT</version>
335                             <type>jar</type>
336                         </dependency>
337                     </dependencies>
338                 </plugin>
339                 <plugin>
340                     <groupId>org.ops4j.pax.exam</groupId>
341                     <artifactId>maven-paxexam-plugin</artifactId>
342                     <version>1.2.4</version>
343                     <executions>
344                         <execution>
345                             <id>generate-config</id>
346                             <goals>
347                                 <goal>generate-depends-file</goal>
348                             </goals>
349                         </execution>
350                     </executions>
351                 </plugin>
352                 <plugin>
353                     <groupId>org.apache.maven.plugins</groupId>
354                     <artifactId>maven-javadoc-plugin</artifactId>
355                     <version>${maven.javadoc.version}</version>
356                     <configuration>
357                         <stylesheetfile>stylesheet.css</stylesheetfile>
358                     </configuration>
359                     <executions>
360                         <execution>
361                             <id>attach-javadocs</id>
362                             <goals>
363                                 <goal>jar</goal>
364                             </goals>
365                         </execution>
366                         <execution>
367                             <goals>
368                                 <goal>aggregate</goal>
369                             </goals>
370                             <phase>site</phase>
371                         </execution>
372                     </executions>
373                 </plugin>
374                 <plugin>
375                     <groupId>org.codehaus.mojo</groupId>
376                     <artifactId>build-helper-maven-plugin</artifactId>
377                     <version>1.8</version>
378                     <executions>
379                         <execution>
380                             <phase>generate-sources</phase>
381                             <goals>
382                                 <goal>add-source</goal>
383                             </goals>
384                             <configuration>
385                                 <sources>
386                                     <source>target/generated-sources/parser</source>
387                                     <source>target/generated-sources/sal</source>
388                                     <source>${basedir}/src/main/xtend-gen</source>
389                                 </sources>
390                             </configuration>
391                         </execution>
392                     </executions>
393                 </plugin>
394                 <plugin>
395                     <groupId>org.eclipse.xtend</groupId>
396                     <artifactId>xtend-maven-plugin</artifactId>
397                     <version>2.7.3</version>
398                     <executions>
399                         <execution>
400                             <goals>
401                                 <goal>compile</goal>
402                             </goals>
403                             <configuration>
404                                 <outputDirectory>${basedir}/src/main/xtend-gen</outputDirectory>
405                             </configuration>
406                         </execution>
407                     </executions>
408                 </plugin>
409                 <plugin>
410                     <groupId>org.apache.servicemix.tooling</groupId>
411                     <artifactId>depends-maven-plugin</artifactId>
412                     <version>${maven.depends.version}</version>
413                     <executions>
414                         <execution>
415                             <id>generate-depends-file</id>
416                             <goals>
417                                 <goal>generate-depends-file</goal>
418                             </goals>
419                         </execution>
420                     </executions>
421                 </plugin>
422             </plugins>
423         </pluginManagement>
424
425         <plugins>
426             <plugin>
427                 <groupId>org.apache.maven.plugins</groupId>
428                 <artifactId>maven-enforcer-plugin</artifactId>
429                 <!--
430                 <executions>
431                     <execution>
432                         <id>enforce-dependencies</id>
433                         <configuration>
434                             <rules>
435                                 <DependencyConvergence />
436                             </rules>
437                         </configuration>
438                         <goals>
439                             <goal>enforce</goal>
440                         </goals>
441                     </execution>
442                 </executions>
443                 -->
444             </plugin>
445
446             <plugin>
447                 <artifactId>maven-clean-plugin</artifactId>
448                 <configuration>
449                     <filesets>
450                         <fileset>
451                             <directory>${basedir}/src/main/xtend-gen</directory>
452                             <includes>
453                                 <include>**</include>
454                             </includes>
455                         </fileset>
456                     </filesets>
457                 </configuration>
458             </plugin>
459             <plugin>
460                 <groupId>org.apache.maven.plugins</groupId>
461                 <artifactId>maven-jar-plugin</artifactId>
462             </plugin>
463             <plugin>
464                 <groupId>org.apache.felix</groupId>
465                 <artifactId>maven-bundle-plugin</artifactId>
466             </plugin>
467             <plugin>
468                 <groupId>org.apache.maven.plugins</groupId>
469                 <artifactId>maven-source-plugin</artifactId>
470                 <executions>
471                     <execution>
472                         <id>attach-sources</id>
473                         <goals>
474                             <goal>jar</goal>
475                         </goals>
476                     </execution>
477                 </executions>
478             </plugin>
479             <plugin>
480                 <groupId>org.apache.maven.plugins</groupId>
481                 <artifactId>maven-javadoc-plugin</artifactId>
482             </plugin>
483             <plugin>
484                 <groupId>org.jacoco</groupId>
485                 <artifactId>jacoco-maven-plugin</artifactId>
486                 <executions>
487                     <execution>
488                         <id>prepare-ut-agent</id>
489                         <phase>process-test-classes</phase>
490                         <goals>
491                             <goal>prepare-agent</goal>
492                         </goals>
493                         <configuration>
494                             <destFile>${sonar.jacoco.reportPath}</destFile>
495                             <propertyName>jacoco.agent.ut.arg</propertyName>
496                         </configuration>
497                     </execution>
498                     <execution>
499                         <id>prepare-it-agent</id>
500                         <phase>pre-integration-test</phase>
501                         <goals>
502                             <goal>prepare-agent</goal>
503                         </goals>
504                         <configuration>
505                             <destFile>${sonar.jacoco.itReportPath}</destFile>
506                             <propertyName>jacoco.agent.it.arg</propertyName>
507                         </configuration>
508                     </execution>
509                 </executions>
510             </plugin>
511         </plugins>
512     </build>
513
514     <reporting>
515         <plugins>
516             <plugin>
517                 <groupId>org.codehaus.mojo</groupId>
518                 <artifactId>findbugs-maven-plugin</artifactId>
519                 <version>${findbugs.maven.plugin.version}</version>
520                 <configuration>
521                     <effort>Max</effort>
522                     <threshold>Low</threshold>
523                     <goal>site</goal>
524                 </configuration>
525             </plugin>
526             <plugin>
527                 <groupId>org.codehaus.mojo</groupId>
528                 <artifactId>jdepend-maven-plugin</artifactId>
529                 <version>${jdepend.maven.plugin.version}</version>
530             </plugin>
531         </plugins>
532     </reporting>
533
534
535     <!-- Note: we can not use variables for these URLs because we need to
536          be able to download the parent pom from the repository the first
537          time we go to use it (since it is in a different project).
538          To override the settings, use the "mirror" section of the
539          settings.xml. See http://maven.apache.org/settings.html -->
540     <repositories>
541         <!-- OpenDayLight Repo Mirror -->
542         <repository>
543             <id>opendaylight-mirror</id>
544             <name>opendaylight-mirror</name>
545             <url>http://nexus.opendaylight.org/content/groups/public/</url>
546             <snapshots>
547                 <enabled>false</enabled>
548             </snapshots>
549             <releases>
550                 <enabled>true</enabled>
551                 <updatePolicy>never</updatePolicy>
552             </releases>
553         </repository>
554
555         <!-- OpenDayLight Snapshot artifact -->
556         <repository>
557             <id>opendaylight-snapshot</id>
558             <name>opendaylight-snapshot</name>
559             <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
560             <snapshots>
561                 <enabled>true</enabled>
562             </snapshots>
563             <releases>
564                 <enabled>false</enabled>
565             </releases>
566         </repository>
567     </repositories>
568 </project>