e2188414fdb0a4aa9f080deb23b997ab8b285ced
[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.1-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.1-SNAPSHOT</version>
24     <packaging>pom</packaging>
25
26     <properties>
27         <yangtools.version>0.8.1-SNAPSHOT</yangtools.version>
28
29         <!-- FIXME: these will be upstreamed -->
30         <maven.depends.version>1.2</maven.depends.version>
31     </properties>
32
33     <dependencyManagement>
34         <dependencies>
35             <!-- Testing Dependencies -->
36             <dependency>
37                 <groupId>org.apache.maven.shared</groupId>
38                 <artifactId>maven-verifier</artifactId>
39                 <version>1.6</version>
40                 <scope>test</scope>
41             </dependency>
42             <dependency>
43                 <groupId>org.codehaus.groovy</groupId>
44                 <artifactId>groovy</artifactId>
45                 <version>2.4.5</version>
46                 <scope>test</scope>
47             </dependency>
48             <dependency>
49                 <groupId>org.codehaus.groovy</groupId>
50                 <artifactId>groovy-xml</artifactId>
51                 <version>2.4.5</version>
52                 <scope>test</scope>
53             </dependency>
54             <dependency>
55                 <groupId>org.apache.maven</groupId>
56                 <artifactId>maven-core</artifactId>
57                 <version>3.3.3</version>
58             </dependency>
59             <dependency>
60                 <groupId>org.apache.maven</groupId>
61                 <artifactId>maven-plugin-api</artifactId>
62                 <version>3.3.3</version>
63             </dependency>
64             <dependency>
65                 <groupId>org.eclipse.xtend</groupId>
66                 <artifactId>org.eclipse.xtend.lib</artifactId>
67                 <version>2.8.4</version>
68             </dependency>
69
70             <dependency>
71                 <groupId>org.glassfish.jersey.ext</groupId>
72                 <artifactId>jersey-proxy-client</artifactId>
73                 <version>2.22</version>
74             </dependency>
75             <dependency>
76                 <groupId>org.glassfish.jersey.core</groupId>
77                 <artifactId>jersey-client</artifactId>
78                 <version>2.22</version>
79             </dependency>
80
81             <dependency>
82                 <groupId>org.opendaylight.yangtools</groupId>
83                 <artifactId>yangtools-artifacts</artifactId>
84                 <version>${yangtools.version}</version>
85                 <scope>import</scope>
86                 <type>pom</type>
87             </dependency>
88
89             <dependency>
90                 <groupId>org.antlr</groupId>
91                 <artifactId>antlr4-runtime</artifactId>
92                 <version>4.5.1</version>
93             </dependency>
94         </dependencies>
95     </dependencyManagement>
96
97     <dependencies>
98         <!-- Sonar -->
99         <dependency>
100             <groupId>org.codehaus.sonar-plugins.java</groupId>
101             <artifactId>sonar-jacoco-listeners</artifactId>
102             <version>${sonar-jacoco-listeners.version}</version>
103             <scope>test</scope>
104         </dependency>
105         <dependency>
106             <groupId>org.slf4j</groupId>
107             <artifactId>slf4j-simple</artifactId>
108             <scope>test</scope>
109         </dependency>
110     </dependencies>
111
112     <build>
113         <pluginManagement>
114             <plugins>
115                 <plugin>
116                     <groupId>org.apache.maven.plugins</groupId>
117                     <artifactId>maven-jar-plugin</artifactId>
118                     <version>${maven.jar.version}</version>
119                     <configuration>
120                         <archive>
121                             <!--
122                                  Bundle OSGi Manifest created by maven-bundle-plugin
123                                  into a jar file
124                                  -->
125                             <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
126                         </archive>
127                     </configuration>
128                 </plugin>
129                 <plugin>
130                     <groupId>org.apache.felix</groupId>
131                     <artifactId>maven-bundle-plugin</artifactId>
132                     <extensions>true</extensions>
133                     <executions>
134                         <execution>
135                             <id>bundle-manifest</id>
136                             <phase>process-classes</phase>
137                             <goals>
138                                 <goal>manifest</goal>
139                             </goals>
140                         </execution>
141                     </executions>
142                 </plugin>
143                 <plugin>
144                     <groupId>org.apache.maven.plugins</groupId>
145                     <artifactId>maven-failsafe-plugin</artifactId>
146                     <configuration>
147                         <!-- Specific to generate mapping between tests and covered code -->
148                         <argLine>${jacoco.agent.it.arg}</argLine>
149                         <properties>
150                             <property>
151                                 <name>listener</name>
152                                 <value>org.sonar.java.jacoco.JUnitListener</value>
153                             </property>
154                         </properties>
155                         <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
156                         <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
157                     </configuration>
158                 </plugin>
159                 <plugin>
160                     <groupId>org.apache.maven.plugins</groupId>
161                     <artifactId>maven-surefire-plugin</artifactId>
162                     <version>${maven.surefire.version}</version>
163                     <configuration>
164                         <!-- Specific to generate mapping between tests and covered code -->
165                         <argLine>${jacoco.agent.ut.arg}</argLine>
166                         <properties>
167                             <property>
168                                 <name>listener</name>
169                                 <value>org.sonar.java.jacoco.JUnitListener</value>
170                             </property>
171                         </properties>
172                     </configuration>
173                 </plugin>
174
175                 <plugin>
176                     <groupId>org.eclipse.m2e</groupId>
177                     <artifactId>lifecycle-mapping</artifactId>
178                     <version>1.0.0</version>
179                     <configuration>
180                         <lifecycleMappingMetadata>
181                             <pluginExecutions>
182                                 <pluginExecution>
183                                     <pluginExecutionFilter>
184                                         <groupId>org.apache.felix</groupId>
185                                         <artifactId>maven-bundle-plugin</artifactId>
186                                         <versionRange>[1.0,)</versionRange>
187                                         <goals>
188                                             <goal>manifest</goal>
189                                         </goals>
190                                     </pluginExecutionFilter>
191                                     <action>
192                                         <execute />
193                                     </action>
194                                 </pluginExecution>
195                                 <pluginExecution>
196                                     <pluginExecutionFilter>
197                                         <groupId>org.apache.maven.plugins</groupId>
198                                         <artifactId>maven-antrun-plugin</artifactId>
199                                         <versionRange>[1.0,)</versionRange>
200                                         <goals>
201                                             <goal>run</goal>
202                                         </goals>
203                                     </pluginExecutionFilter>
204                                     <action>
205                                         <execute/>
206                                     </action>
207                                 </pluginExecution>
208                                 <pluginExecution>
209                                     <pluginExecutionFilter>
210                                         <groupId>org.opendaylight.yangtools</groupId>
211                                         <artifactId>yang-maven-plugin</artifactId>
212                                         <versionRange>[0.5,)</versionRange>
213                                         <goals>
214                                             <goal>generate-sources</goal>
215                                         </goals>
216                                      </pluginExecutionFilter>
217                                      <action>
218                                          <execute/>
219                                      </action>
220                                  </pluginExecution>
221                                  <pluginExecution>
222                                     <pluginExecutionFilter>
223                                         <groupId>org.codehaus.mojo</groupId>
224                                         <artifactId>properties-maven-plugin</artifactId>
225                                         <versionRange>1.0-alpha-2</versionRange>
226                                         <goals>
227                                             <goal>write-project-properties</goal>
228                                         </goals>
229                                      </pluginExecutionFilter>
230                                      <action>
231                                          <ignore />
232                                      </action>
233                                  </pluginExecution>
234                                  <pluginExecution>
235                                     <pluginExecutionFilter>
236                                         <groupId>org.ops4j.pax.exam</groupId>
237                                         <artifactId>maven-paxexam-plugin</artifactId>
238                                         <versionRange>1.2.4</versionRange>
239                                         <goals>
240                                             <goal>generate-depends-file</goal>
241                                         </goals>
242                                      </pluginExecutionFilter>
243                                      <action>
244                                          <ignore />
245                                      </action>
246                                  </pluginExecution>
247                                  <pluginExecution>
248                                     <pluginExecutionFilter>
249                                         <groupId>org.jacoco</groupId>
250                                         <artifactId>jacoco-maven-plugin</artifactId>
251                                         <versionRange>[0.6,)</versionRange>
252                                         <goals>
253                                             <goal>prepare-agent</goal>
254                                         </goals>
255                                      </pluginExecutionFilter>
256                                      <action>
257                                          <ignore/>
258                                      </action>
259                                  </pluginExecution>
260                                  <pluginExecution>
261                                      <pluginExecutionFilter>
262                                          <groupId>org.antlr</groupId>
263                                          <artifactId>antlr4-maven-plugin</artifactId>
264                                          <versionRange>[4.0,)</versionRange>
265                                          <goals>
266                                              <goal>antlr4</goal>
267                                          </goals>
268                                      </pluginExecutionFilter>
269                                      <action>
270                                          <execute />
271                                      </action>
272                                  </pluginExecution>
273                             </pluginExecutions>
274                         </lifecycleMappingMetadata>
275                     </configuration>
276                 </plugin>
277                 <plugin>
278                     <groupId>org.opendaylight.yangtools</groupId>
279                     <artifactId>yang-maven-plugin</artifactId>
280                     <version>0.8.1-SNAPSHOT</version>
281                     <executions>
282                         <execution>
283                             <goals>
284                                 <goal>generate-sources</goal>
285                             </goals>
286                             <configuration>
287                                 <yangFilesRootDir>src/main/yang</yangFilesRootDir>
288                                 <inspectDependencies>true</inspectDependencies>
289                             </configuration>
290                         </execution>
291                     </executions>
292                 </plugin>
293                 <plugin>
294                     <groupId>org.ops4j.pax.exam</groupId>
295                     <artifactId>maven-paxexam-plugin</artifactId>
296                     <version>1.2.4</version>
297                     <executions>
298                         <execution>
299                             <id>generate-config</id>
300                             <goals>
301                                 <goal>generate-depends-file</goal>
302                             </goals>
303                         </execution>
304                     </executions>
305                 </plugin>
306                 <plugin>
307                     <groupId>org.apache.maven.plugins</groupId>
308                     <artifactId>maven-javadoc-plugin</artifactId>
309                     <version>${maven.javadoc.version}</version>
310                     <configuration>
311                         <stylesheetfile>stylesheet.css</stylesheetfile>
312                     </configuration>
313                     <executions>
314                         <execution>
315                             <id>attach-javadocs</id>
316                             <goals>
317                                 <goal>jar</goal>
318                             </goals>
319                         </execution>
320                         <execution>
321                             <goals>
322                                 <goal>aggregate</goal>
323                             </goals>
324                             <phase>site</phase>
325                         </execution>
326                     </executions>
327                 </plugin>
328                 <plugin>
329                     <groupId>org.codehaus.mojo</groupId>
330                     <artifactId>build-helper-maven-plugin</artifactId>
331                     <version>1.9.1</version>
332                     <executions>
333                         <execution>
334                             <phase>generate-sources</phase>
335                             <goals>
336                                 <goal>add-source</goal>
337                             </goals>
338                             <configuration>
339                                 <sources>
340                                     <source>target/generated-sources/parser</source>
341                                     <source>target/generated-sources/sal</source>
342                                     <source>${basedir}/src/main/xtend-gen</source>
343                                 </sources>
344                             </configuration>
345                         </execution>
346                     </executions>
347                 </plugin>
348                 <plugin>
349                     <groupId>org.eclipse.xtend</groupId>
350                     <artifactId>xtend-maven-plugin</artifactId>
351                     <version>2.8.4</version>
352                     <executions>
353                         <execution>
354                             <goals>
355                                 <goal>compile</goal>
356                             </goals>
357                             <configuration>
358                                 <outputDirectory>${basedir}/src/main/xtend-gen</outputDirectory>
359                             </configuration>
360                         </execution>
361                     </executions>
362                 </plugin>
363                 <plugin>
364                     <groupId>org.apache.servicemix.tooling</groupId>
365                     <artifactId>depends-maven-plugin</artifactId>
366                     <version>${maven.depends.version}</version>
367                     <executions>
368                         <execution>
369                             <id>generate-depends-file</id>
370                             <goals>
371                                 <goal>generate-depends-file</goal>
372                             </goals>
373                         </execution>
374                     </executions>
375                 </plugin>
376
377                 <plugin>
378                     <groupId>org.antlr</groupId>
379                     <artifactId>antlr4-maven-plugin</artifactId>
380                     <version>4.5.1</version>
381                     <executions>
382                         <execution>
383                             <goals>
384                                 <goal>antlr4</goal>
385                             </goals>
386                         </execution>
387                     </executions>
388                 </plugin>
389             </plugins>
390         </pluginManagement>
391
392         <plugins>
393             <plugin>
394                 <groupId>org.apache.maven.plugins</groupId>
395                 <artifactId>maven-enforcer-plugin</artifactId>
396                 <!--
397                 <executions>
398                     <execution>
399                         <id>enforce-dependencies</id>
400                         <configuration>
401                             <rules>
402                                 <DependencyConvergence />
403                             </rules>
404                         </configuration>
405                         <goals>
406                             <goal>enforce</goal>
407                         </goals>
408                     </execution>
409                 </executions>
410                 -->
411             </plugin>
412
413             <plugin>
414                 <artifactId>maven-clean-plugin</artifactId>
415                 <configuration>
416                     <filesets>
417                         <fileset>
418                             <directory>${basedir}/src/main/xtend-gen</directory>
419                             <includes>
420                                 <include>**</include>
421                             </includes>
422                         </fileset>
423                     </filesets>
424                 </configuration>
425             </plugin>
426             <plugin>
427                 <groupId>org.apache.maven.plugins</groupId>
428                 <artifactId>maven-jar-plugin</artifactId>
429             </plugin>
430             <plugin>
431                 <groupId>org.apache.felix</groupId>
432                 <artifactId>maven-bundle-plugin</artifactId>
433             </plugin>
434             <plugin>
435                 <groupId>org.apache.maven.plugins</groupId>
436                 <artifactId>maven-source-plugin</artifactId>
437                 <executions>
438                     <execution>
439                         <id>attach-sources</id>
440                         <goals>
441                             <goal>jar</goal>
442                         </goals>
443                     </execution>
444                 </executions>
445             </plugin>
446             <plugin>
447                 <groupId>org.apache.maven.plugins</groupId>
448                 <artifactId>maven-javadoc-plugin</artifactId>
449             </plugin>
450             <plugin>
451                 <groupId>org.jacoco</groupId>
452                 <artifactId>jacoco-maven-plugin</artifactId>
453                 <executions>
454                     <execution>
455                         <id>prepare-ut-agent</id>
456                         <phase>process-test-classes</phase>
457                         <goals>
458                             <goal>prepare-agent</goal>
459                         </goals>
460                         <configuration>
461                             <destFile>${sonar.jacoco.reportPath}</destFile>
462                             <propertyName>jacoco.agent.ut.arg</propertyName>
463                         </configuration>
464                     </execution>
465                     <execution>
466                         <id>prepare-it-agent</id>
467                         <phase>pre-integration-test</phase>
468                         <goals>
469                             <goal>prepare-agent</goal>
470                         </goals>
471                         <configuration>
472                             <destFile>${sonar.jacoco.itReportPath}</destFile>
473                             <propertyName>jacoco.agent.it.arg</propertyName>
474                         </configuration>
475                     </execution>
476                 </executions>
477             </plugin>
478         </plugins>
479     </build>
480
481   <!--
482       Maven Site Configuration
483
484       The following configuration is necessary for maven-site-plugin to
485       correctly identify the correct deployment path for OpenDaylight Maven
486       sites.
487   -->
488   <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
489
490   <distributionManagement>
491     <site>
492       <id>opendaylight-site</id>
493       <url>${nexus.site.url}/${project.artifactId}/</url>
494     </site>
495   </distributionManagement>
496 </project>