Bump yangtools to 2.0.5
[mdsal.git] / binding / binding-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4  Copyright (c) 2014 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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
11
12     <parent>
13         <groupId>org.opendaylight.odlparent</groupId>
14         <artifactId>bundle-parent</artifactId>
15         <version>3.1.0</version>
16         <relativePath/>
17     </parent>
18
19     <modelVersion>4.0.0</modelVersion>
20     <groupId>org.opendaylight.mdsal</groupId>
21     <artifactId>binding-parent</artifactId>
22     <version>0.13.0-SNAPSHOT</version>
23     <packaging>pom</packaging>
24
25     <properties>
26         <salGeneratorPath>${project.build.directory}/generated-sources/mdsal-binding</salGeneratorPath>
27     </properties>
28
29     <build>
30         <!-- https://bugs.opendaylight.org/show_bug.cgi?id=6252 -->
31         <resources>
32             <resource>
33                 <directory>src/main/resources</directory>
34             </resource>
35             <resource>
36                 <directory>${project.build.directory}/generated-sources/spi</directory>
37             </resource>
38             <resource>
39                 <directory>${project.build.directory}/generated-sources/yang</directory>
40             </resource>
41         </resources>
42     </build>
43
44     <dependencyManagement>
45         <dependencies>
46             <dependency>
47                 <groupId>org.opendaylight.yangtools</groupId>
48                 <artifactId>yangtools-artifacts</artifactId>
49                 <version>2.0.5</version>
50                 <type>pom</type>
51                 <scope>import</scope>
52             </dependency>
53             <dependency>
54                 <groupId>org.opendaylight.mdsal</groupId>
55                 <artifactId>mdsal-artifacts</artifactId>
56                 <version>2.5.0-SNAPSHOT</version>
57                 <type>pom</type>
58                 <scope>import</scope>
59             </dependency>
60             <dependency>
61                 <groupId>org.opendaylight.mdsal.model</groupId>
62                 <artifactId>mdsal-model-artifacts</artifactId>
63                 <version>0.13.0-SNAPSHOT</version>
64                 <type>pom</type>
65                 <scope>import</scope>
66             </dependency>
67         </dependencies>
68     </dependencyManagement>
69
70     <profiles>
71         <profile>
72             <activation>
73                 <file>
74                     <exists>src/main/yang</exists>
75                 </file>
76             </activation>
77             <dependencies>
78                 <dependency>
79                     <groupId>org.opendaylight.mdsal</groupId>
80                     <artifactId>yang-binding</artifactId>
81                 </dependency>
82             </dependencies>
83             <build>
84                 <pluginManagement>
85                     <plugins>
86                         <plugin>
87                             <groupId>org.opendaylight.yangtools</groupId>
88                             <artifactId>yang-maven-plugin</artifactId>
89                             <version>2.0.5</version>
90                             <dependencies>
91                                 <dependency>
92                                     <groupId>org.opendaylight.mdsal</groupId>
93                                     <artifactId>maven-sal-api-gen-plugin</artifactId>
94                                     <version>0.13.0-SNAPSHOT</version>
95                                     <type>jar</type>
96                                 </dependency>
97                             </dependencies>
98                             <executions>
99                                 <execution>
100                                     <id>binding</id>
101                                     <goals>
102                                         <goal>generate-sources</goal>
103                                     </goals>
104                                     <configuration>
105                                         <codeGenerators>
106                                             <generator>
107                                                 <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
108                                                 <outputBaseDir>${salGeneratorPath}</outputBaseDir>
109                                                 <resourceBaseDir>${project.build.directory}/generated-sources/spi</resourceBaseDir>
110                                             </generator>
111                                         </codeGenerators>
112                                         <inspectDependencies>true</inspectDependencies>
113                                     </configuration>
114                                 </execution>
115                             </executions>
116                         </plugin>
117                         <plugin>
118                             <artifactId>maven-clean-plugin</artifactId>
119                             <configuration>
120                                 <filesets>
121                                     <fileset>
122                                         <directory>${salGeneratorPath}</directory>
123                                         <includes>
124                                             <include>**</include>
125                                         </includes>
126                                     </fileset>
127                                 </filesets>
128                             </configuration>
129                         </plugin>
130                         <plugin>
131                             <groupId>org.codehaus.mojo</groupId>
132                             <artifactId>build-helper-maven-plugin</artifactId>
133                             <executions>
134                                 <execution>
135                                     <id>add-yang-sources</id>
136                                     <phase>generate-sources</phase>
137                                     <goals>
138                                         <goal>add-source</goal>
139                                     </goals>
140                                     <configuration>
141                                         <sources>
142                                             <source>${salGeneratorPath}</source>
143                                         </sources>
144                                     </configuration>
145                                 </execution>
146                             </executions>
147                         </plugin>
148
149                         <!-- This has to match the definition in odlparent and exists only
150                              because for some reason PMD does not understand wildcards. -->
151                         <plugin>
152                             <groupId>org.apache.maven.plugins</groupId>
153                             <artifactId>maven-pmd-plugin</artifactId>
154                             <executions>
155                                 <execution>
156                                     <id>cpd</id>
157                                     <phase>process-sources</phase>
158                                     <goals>
159                                         <goal>cpd-check</goal>
160                                     </goals>
161                                     <configuration>
162                                         <excludeRoots>
163                                             <excludeRoot>${salGeneratorPath}</excludeRoot>
164                                         </excludeRoots>
165                                     </configuration>
166                                 </execution>
167                             </executions>
168                         </plugin>
169                     </plugins>
170                 </pluginManagement>
171                 <plugins>
172                     <plugin>
173                         <groupId>org.opendaylight.yangtools</groupId>
174                         <artifactId>yang-maven-plugin</artifactId>
175                     </plugin>
176                     <plugin>
177                         <groupId>org.codehaus.mojo</groupId>
178                         <artifactId>build-helper-maven-plugin</artifactId>
179                     </plugin>
180                 </plugins>
181             </build>
182         </profile>
183     </profiles>
184 </project>