Bug 2531: Fix build breakage in absense of src/main/yang directory
[yangtools.git] / code-generator / binding-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
4
5 This program and the accompanying materials are made available under the
6 terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 and is available at http://www.eclipse.org/legal/epl-v10.html
8 -->
9 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10   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>1.5.0-SNAPSHOT</version>
16     <relativePath/>
17   </parent>
18
19   <modelVersion>4.0.0</modelVersion>
20   <groupId>org.opendaylight.yangtools</groupId>
21   <artifactId>binding-parent</artifactId>
22   <version>0.7.0-SNAPSHOT</version>
23   <packaging>pom</packaging>
24
25   <properties>
26     <yangtools.version>0.7.0-SNAPSHOT</yangtools.version>
27     <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
28   </properties>
29   <dependencyManagement>
30     <dependencies>
31       <dependency>
32         <groupId>org.opendaylight.yangtools</groupId>
33         <artifactId>yangtools-artifacts</artifactId>
34         <version>${yangtools.version}</version>
35         <type>pom</type>
36         <scope>import</scope>
37       </dependency>
38     </dependencies>
39   </dependencyManagement>
40   <build>
41     <pluginManagement>
42       <plugins>
43         <plugin>
44           <groupId>org.opendaylight.yangtools</groupId>
45           <artifactId>yang-maven-plugin</artifactId>
46           <version>${yangtools.version}</version>
47           <dependencies>
48             <dependency>
49               <groupId>org.opendaylight.yangtools</groupId>
50               <artifactId>maven-sal-api-gen-plugin</artifactId>
51               <version>${yangtools.version}</version>
52               <type>jar</type>
53             </dependency>
54           </dependencies>
55           <executions>
56             <execution>
57               <id>binding</id>
58               <goals>
59                 <goal>generate-sources</goal>
60               </goals>
61               <configuration>
62                 <codeGenerators>
63                   <generator>
64                     <codeGeneratorClass>org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
65                     <outputBaseDir>${salGeneratorPath}</outputBaseDir>
66                   </generator>
67                 </codeGenerators>
68                 <inspectDependencies>true</inspectDependencies>
69               </configuration>
70             </execution>
71           </executions>
72         </plugin>
73         <plugin>
74           <artifactId>maven-clean-plugin</artifactId>
75           <configuration>
76             <filesets>
77               <fileset>
78                 <directory>${salGeneratorPath}</directory>
79                 <includes>
80                   <include>**</include>
81                 </includes>
82               </fileset>
83             </filesets>
84           </configuration>
85         </plugin>
86       </plugins>
87     </pluginManagement>
88     <plugins>
89       <plugin>
90         <groupId>org.opendaylight.yangtools</groupId>
91         <artifactId>yang-maven-plugin</artifactId>
92         <version>${yangtools.version}</version>
93       </plugin>
94     </plugins>
95   </build>
96 </project>