Migrate to odlparent 1.9.0
[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.9.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.11.0-SNAPSHOT</version>
23     <packaging>pom</packaging>
24
25     <properties>
26         <yangtools.version>1.2.0-SNAPSHOT</yangtools.version>
27         <mdsal.version>2.3.0-SNAPSHOT</mdsal.version>
28         <mdsalmodel.version>0.11.0-SNAPSHOT</mdsalmodel.version>
29         <salGeneratorPath>${project.build.directory}/generated-sources/mdsal-binding</salGeneratorPath>
30     </properties>
31
32     <build>
33         <!-- https://bugs.opendaylight.org/show_bug.cgi?id=6252 -->
34         <resources>
35             <resource>
36                 <directory>src/main/resources</directory>
37             </resource>
38             <resource>
39                 <directory>${project.build.directory}/generated-sources/spi</directory>
40             </resource>
41             <resource>
42                 <directory>${project.build.directory}/generated-sources/yang</directory>
43             </resource>
44         </resources>
45     </build>
46
47     <dependencyManagement>
48         <dependencies>
49             <dependency>
50                 <groupId>org.opendaylight.yangtools</groupId>
51                 <artifactId>yangtools-artifacts</artifactId>
52                 <version>${yangtools.version}</version>
53                 <type>pom</type>
54                 <scope>import</scope>
55             </dependency>
56             <dependency>
57                 <groupId>org.opendaylight.mdsal</groupId>
58                 <artifactId>mdsal-artifacts</artifactId>
59                 <version>${mdsal.version}</version>
60                 <type>pom</type>
61                 <scope>import</scope>
62             </dependency>
63             <dependency>
64               <groupId>org.opendaylight.mdsal.model</groupId>
65               <artifactId>mdsal-model-artifacts</artifactId>
66               <version>${mdsalmodel.version}</version>
67               <type>pom</type>
68               <scope>import</scope>
69             </dependency>
70         </dependencies>
71     </dependencyManagement>
72
73     <profiles>
74         <profile>
75             <activation>
76                 <file>
77                     <exists>src/main/yang</exists>
78                 </file>
79             </activation>
80             <dependencies>
81                 <dependency>
82                     <groupId>org.opendaylight.mdsal</groupId>
83                     <artifactId>yang-binding</artifactId>
84                 </dependency>
85             </dependencies>
86             <build>
87                 <pluginManagement>
88                     <plugins>
89                         <plugin>
90                             <groupId>org.opendaylight.yangtools</groupId>
91                             <artifactId>yang-maven-plugin</artifactId>
92                             <version>${yangtools.version}</version>
93                             <dependencies>
94                                 <dependency>
95                                     <groupId>org.opendaylight.mdsal</groupId>
96                                     <artifactId>maven-sal-api-gen-plugin</artifactId>
97                                     <version>0.11.0-SNAPSHOT</version>
98                                     <type>jar</type>
99                                 </dependency>
100                             </dependencies>
101                             <executions>
102                                 <execution>
103                                     <id>binding</id>
104                                     <goals>
105                                         <goal>generate-sources</goal>
106                                     </goals>
107                                     <configuration>
108                                         <codeGenerators>
109                                             <generator>
110                                                 <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
111                                                 <outputBaseDir>${salGeneratorPath}</outputBaseDir>
112                                                 <resourceBaseDir>${project.build.directory}/generated-sources/spi</resourceBaseDir>
113                                             </generator>
114                                         </codeGenerators>
115                                         <inspectDependencies>true</inspectDependencies>
116                                     </configuration>
117                                 </execution>
118                             </executions>
119                         </plugin>
120                         <plugin>
121                             <artifactId>maven-clean-plugin</artifactId>
122                             <configuration>
123                                 <filesets>
124                                     <fileset>
125                                         <directory>${salGeneratorPath}</directory>
126                                         <includes>
127                                             <include>**</include>
128                                         </includes>
129                                     </fileset>
130                                 </filesets>
131                             </configuration>
132                         </plugin>
133                         <plugin>
134                             <groupId>org.codehaus.mojo</groupId>
135                             <artifactId>build-helper-maven-plugin</artifactId>
136                             <executions>
137                                 <execution>
138                                     <id>add-yang-sources</id>
139                                     <phase>generate-sources</phase>
140                                     <goals>
141                                         <goal>add-source</goal>
142                                     </goals>
143                                     <configuration>
144                                         <sources>
145                                             <source>${salGeneratorPath}</source>
146                                         </sources>
147                                     </configuration>
148                                 </execution>
149                             </executions>
150                         </plugin>
151
152                         <!-- This has to match the definition in odlparent and exists only
153                              because for some reason PMD does not understand wildcards. -->
154                         <plugin>
155                             <groupId>org.apache.maven.plugins</groupId>
156                             <artifactId>maven-pmd-plugin</artifactId>
157                             <executions>
158                                 <execution>
159                                     <id>cpd</id>
160                                     <phase>process-sources</phase>
161                                     <goals>
162                                         <goal>cpd-check</goal>
163                                     </goals>
164                                     <configuration>
165                                         <excludeRoots>
166                                             <excludeRoot>${salGeneratorPath}</excludeRoot>
167                                         </excludeRoots>
168                                     </configuration>
169                                 </execution>
170                             </executions>
171                         </plugin>
172                     </plugins>
173                 </pluginManagement>
174                 <plugins>
175                     <plugin>
176                         <groupId>org.opendaylight.yangtools</groupId>
177                         <artifactId>yang-maven-plugin</artifactId>
178                     </plugin>
179                     <plugin>
180                         <groupId>org.codehaus.mojo</groupId>
181                         <artifactId>build-helper-maven-plugin</artifactId>
182                     </plugin>
183                 </plugins>
184             </build>
185         </profile>
186     </profiles>
187
188   <!--
189       Maven Site Configuration
190
191       The following configuration is necessary for maven-site-plugin to
192       correctly identify the correct deployment path for OpenDaylight Maven
193       sites.
194   -->
195   <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
196
197   <distributionManagement>
198     <site>
199       <id>opendaylight-site</id>
200       <url>${nexus.site.url}/${project.artifactId}/</url>
201     </site>
202   </distributionManagement>
203
204 </project>