5f91edd55e422e2f8bc8acba14f2c9c9be039641
[mdsal.git] / binding2 / mdsal-model-binding2-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4  Copyright (c) 2016 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.7.0-SNAPSHOT</version>
16         <relativePath/>
17     </parent>
18
19     <modelVersion>4.0.0</modelVersion>
20     <groupId>org.opendaylight.mdsal</groupId>
21     <artifactId>mdsal-model-binding2-parent</artifactId>
22     <version>0.9.0-SNAPSHOT</version>
23     <packaging>pom</packaging>
24
25     <properties>
26         <yangtools.version>1.0.0-SNAPSHOT</yangtools.version>
27         <mdsal.version>2.1.0-SNAPSHOT</mdsal.version>
28         <mdsalmodel.version>0.9.0-SNAPSHOT</mdsalmodel.version>
29         <salGeneratorPath>target/generated-sources/mdsal-binding2</salGeneratorPath>
30     </properties>
31
32     <dependencyManagement>
33         <dependencies>
34             <dependency>
35                 <groupId>org.opendaylight.yangtools</groupId>
36                 <artifactId>yangtools-artifacts</artifactId>
37                 <version>${yangtools.version}</version>
38                 <type>pom</type>
39                 <scope>import</scope>
40             </dependency>
41             <dependency>
42                 <groupId>org.opendaylight.mdsal</groupId>
43                 <artifactId>mdsal-artifacts</artifactId>
44                 <version>${mdsal.version}</version>
45                 <type>pom</type>
46                 <scope>import</scope>
47             </dependency>
48             <dependency>
49               <groupId>org.opendaylight.mdsal.model</groupId>
50               <artifactId>mdsal-model-artifacts</artifactId>
51               <version>${mdsalmodel.version}</version>
52               <type>pom</type>
53               <scope>import</scope>
54             </dependency>
55         </dependencies>
56     </dependencyManagement>
57
58     <profiles>
59         <profile>
60             <id>binding2-generator</id>
61             <activation>
62                 <file>
63                     <exists>src/main/yang</exists>
64                 </file>
65             </activation>
66             <dependencies>
67                 <dependency>
68                     <groupId>org.opendaylight.mdsal</groupId>
69                     <artifactId>mdsal-binding2-spec</artifactId>
70                 </dependency>
71             </dependencies>
72             <build>
73                 <pluginManagement>
74                     <plugins>
75                         <plugin>
76                             <groupId>org.opendaylight.yangtools</groupId>
77                             <artifactId>yang-maven-plugin</artifactId>
78                             <version>${yangtools.version}</version>
79                             <dependencies>
80                                 <dependency>
81                                     <groupId>org.opendaylight.mdsal</groupId>
82                                     <artifactId>mdsal-binding2-maven-api-gen-plugin</artifactId>
83                                     <version>0.9.0-SNAPSHOT</version>
84                                     <type>jar</type>
85                                 </dependency>
86                             </dependencies>
87                             <executions>
88                                 <execution>
89                                     <id>binding2</id>
90                                     <goals>
91                                         <goal>generate-sources</goal>
92                                     </goals>
93                                     <configuration>
94                                         <codeGenerators>
95                                             <generator>
96                                                 <codeGeneratorClass>org.opendaylight.mdsal.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
97                                                 <outputBaseDir>${salGeneratorPath}</outputBaseDir>
98                                             </generator>
99                                         </codeGenerators>
100                                         <inspectDependencies>true</inspectDependencies>
101                                     </configuration>
102                                 </execution>
103                             </executions>
104                         </plugin>
105                         <plugin>
106                             <artifactId>maven-clean-plugin</artifactId>
107                             <configuration>
108                                 <filesets>
109                                     <fileset>
110                                         <directory>${salGeneratorPath}</directory>
111                                         <includes>
112                                             <include>**</include>
113                                         </includes>
114                                     </fileset>
115                                 </filesets>
116                             </configuration>
117                         </plugin>
118                         <plugin>
119                             <groupId>org.codehaus.mojo</groupId>
120                             <artifactId>build-helper-maven-plugin</artifactId>
121                             <executions>
122                                 <execution>
123                                     <id>add-yang-sources</id>
124                                     <phase>generate-sources</phase>
125                                     <goals>
126                                         <goal>add-source</goal>
127                                     </goals>
128                                     <configuration>
129                                         <sources>
130                                             <source>${salGeneratorPath}</source>
131                                         </sources>
132                                     </configuration>
133                                 </execution>
134                             </executions>
135                         </plugin>
136                     </plugins>
137                 </pluginManagement>
138                 <plugins>
139                     <plugin>
140                         <groupId>org.opendaylight.yangtools</groupId>
141                         <artifactId>yang-maven-plugin</artifactId>
142                     </plugin>
143                     <plugin>
144                         <groupId>org.codehaus.mojo</groupId>
145                         <artifactId>build-helper-maven-plugin</artifactId>
146                     </plugin>
147                 </plugins>
148             </build>
149         </profile>
150     </profiles>
151
152   <!--
153       Maven Site Configuration
154
155       The following configuration is necessary for maven-site-plugin to
156       correctly identify the correct deployment path for OpenDaylight Maven
157       sites.
158   -->
159   <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
160
161   <distributionManagement>
162     <site>
163       <id>opendaylight-site</id>
164       <url>${nexus.site.url}/${project.artifactId}/</url>
165     </site>
166   </distributionManagement>
167
168 </project>