Introduce top-level pom file.
[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>1.6.0-SNAPSHOT</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.8.0-SNAPSHOT</version>
23     <packaging>pom</packaging>
24
25     <properties>
26         <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
27         <mdsal.version>2.0.0-SNAPSHOT</mdsal.version>
28         <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
29     </properties>
30
31     <dependencyManagement>
32         <dependencies>
33             <dependency>
34                 <groupId>org.opendaylight.yangtools</groupId>
35                 <artifactId>yangtools-artifacts</artifactId>
36                 <version>${yangtools.version}</version>
37                 <type>pom</type>
38                 <scope>import</scope>
39             </dependency>
40             <dependency>
41                 <groupId>org.opendaylight.mdsal</groupId>
42                 <artifactId>mdsal-artifacts</artifactId>
43                 <version>${mdsal.version}</version>
44                 <type>pom</type>
45                 <scope>import</scope>
46             </dependency>
47         </dependencies>
48     </dependencyManagement>
49
50     <profiles>
51         <profile>
52             <activation>
53                 <file>
54                     <exists>src/main/yang</exists>
55                 </file>
56             </activation>
57             <dependencies>
58                 <dependency>
59                     <groupId>org.opendaylight.mdsal</groupId>
60                     <artifactId>yang-binding</artifactId>
61                 </dependency>
62             </dependencies>
63             <build>
64                 <pluginManagement>
65                     <plugins>
66                         <plugin>
67                             <groupId>org.opendaylight.yangtools</groupId>
68                             <artifactId>yang-maven-plugin</artifactId>
69                             <version>${yangtools.version}</version>
70                             <dependencies>
71                                 <dependency>
72                                     <groupId>org.opendaylight.mdsal</groupId>
73                                     <artifactId>maven-sal-api-gen-plugin</artifactId>
74                                     <version>0.8.0-SNAPSHOT</version>
75                                     <type>jar</type>
76                                 </dependency>
77                             </dependencies>
78                             <executions>
79                                 <execution>
80                                     <id>binding</id>
81                                     <goals>
82                                         <goal>generate-sources</goal>
83                                     </goals>
84                                     <configuration>
85                                         <codeGenerators>
86                                             <generator>
87                                                 <codeGeneratorClass>org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
88                                                 <outputBaseDir>${salGeneratorPath}</outputBaseDir>
89                                             </generator>
90                                         </codeGenerators>
91                                         <inspectDependencies>true</inspectDependencies>
92                                     </configuration>
93                                 </execution>
94                             </executions>
95                         </plugin>
96                         <plugin>
97                             <artifactId>maven-clean-plugin</artifactId>
98                             <configuration>
99                                 <filesets>
100                                     <fileset>
101                                         <directory>${salGeneratorPath}</directory>
102                                         <includes>
103                                             <include>**</include>
104                                         </includes>
105                                     </fileset>
106                                 </filesets>
107                             </configuration>
108                         </plugin>
109                         <plugin>
110                             <groupId>org.codehaus.mojo</groupId>
111                             <artifactId>build-helper-maven-plugin</artifactId>
112                             <executions>
113                                 <execution>
114                                     <id>add-yang-sources</id>
115                                     <phase>generate-sources</phase>
116                                     <goals>
117                                         <goal>add-source</goal>
118                                     </goals>
119                                     <configuration>
120                                         <sources>
121                                             <source>${salGeneratorPath}</source>
122                                         </sources>
123                                     </configuration>
124                                 </execution>
125                             </executions>
126                         </plugin>
127                     </plugins>
128                 </pluginManagement>
129                 <plugins>
130                     <plugin>
131                         <groupId>org.opendaylight.yangtools</groupId>
132                         <artifactId>yang-maven-plugin</artifactId>
133                     </plugin>
134                     <plugin>
135                         <groupId>org.codehaus.mojo</groupId>
136                         <artifactId>build-helper-maven-plugin</artifactId>
137                     </plugin>
138                 </plugins>
139             </build>
140         </profile>
141     </profiles>
142 </project>