Bug 4202: Migration to use mdsal project
[controller.git] / opendaylight / config / config-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   <parent>
12     <groupId>org.opendaylight.mdsal</groupId>
13     <artifactId>binding-parent</artifactId>
14     <version>0.8.0-SNAPSHOT</version>
15     <relativePath/>
16   </parent>
17
18   <modelVersion>4.0.0</modelVersion>
19   <groupId>org.opendaylight.controller</groupId>
20   <artifactId>config-parent</artifactId>
21   <version>0.4.0-SNAPSHOT</version>
22   <packaging>pom</packaging>
23
24   <properties>
25     <config.version>0.4.0-SNAPSHOT</config.version>
26     <mdsal.version>1.3.0-SNAPSHOT</mdsal.version>
27     <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
28     <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
29     <config.file>src/main/config/default-config.xml</config.file>
30   </properties>
31
32   <dependencyManagement>
33     <dependencies>
34       <!-- project specific dependencies -->
35       <dependency>
36         <groupId>org.opendaylight.controller</groupId>
37         <artifactId>config-artifacts</artifactId>
38         <version>${config.version}</version>
39         <type>pom</type>
40         <scope>import</scope>
41       </dependency>
42       <dependency>
43         <groupId>org.opendaylight.controller</groupId>
44         <artifactId>mdsal-artifacts</artifactId>
45         <version>${mdsal.version}</version>
46         <type>pom</type>
47         <scope>import</scope>
48       </dependency>
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>2.0.0-SNAPSHOT</version>
60         <type>pom</type>
61         <scope>import</scope>
62       </dependency>
63     </dependencies>
64   </dependencyManagement>
65
66   <dependencies>
67     <dependency>
68       <groupId>org.opendaylight.yangtools</groupId>
69       <artifactId>yang-common</artifactId>
70     </dependency>
71     <dependency>
72       <groupId>org.opendaylight.controller</groupId>
73       <artifactId>config-api</artifactId>
74     </dependency>
75     <dependency>
76       <groupId>org.opendaylight.controller</groupId>
77       <artifactId>sal-binding-config</artifactId>
78     </dependency>
79   </dependencies>
80   <build>
81     <pluginManagement>
82       <plugins>
83         <plugin>
84           <groupId>org.opendaylight.yangtools</groupId>
85           <artifactId>yang-maven-plugin</artifactId>
86           <dependencies>
87             <dependency>
88               <groupId>org.opendaylight.controller</groupId>
89               <artifactId>yang-jmx-generator-plugin</artifactId>
90               <version>${config.version}</version>
91             </dependency>
92           </dependencies>
93           <executions>
94             <execution>
95               <id>config</id>
96               <goals>
97                 <goal>generate-sources</goal>
98               </goals>
99               <configuration>
100                 <codeGenerators>
101                   <generator>
102                     <codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass>
103                     <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
104                     <additionalConfiguration>
105                       <namespaceToPackage1>urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang</namespaceToPackage1>
106                     </additionalConfiguration>
107                   </generator>
108                 </codeGenerators>
109                 <inspectDependencies>true</inspectDependencies>
110               </configuration>
111             </execution>
112           </executions>
113         </plugin>
114         <plugin>
115           <artifactId>maven-clean-plugin</artifactId>
116           <configuration>
117             <filesets>
118               <fileset>
119                 <directory>${jmxGeneratorPath}</directory>
120                 <includes>
121                   <include>**</include>
122                 </includes>
123               </fileset>
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>${jmxGeneratorPath}</source>
146                   <source>${salGeneratorPath}</source>
147                 </sources>
148               </configuration>
149             </execution>
150           </executions>
151         </plugin>
152       </plugins>
153     </pluginManagement>
154   </build>
155   <profiles>
156     <profile>
157       <activation>
158         <file>
159           <exists>${config.file}</exists>
160         </file>
161       </activation>
162       <build>
163         <pluginManagement>
164           <plugins>
165             <plugin>
166               <groupId>org.codehaus.mojo</groupId>
167               <artifactId>build-helper-maven-plugin</artifactId>
168               <executions>
169                 <execution>
170                   <id>attach-artifacts</id>
171                   <goals>
172                     <goal>attach-artifact</goal>
173                   </goals>
174                   <phase>package</phase>
175                   <configuration>
176                     <artifacts>
177                       <artifact>
178                         <file>${config.file}</file>
179                         <type>xml</type>
180                         <classifier>config</classifier>
181                       </artifact>
182                     </artifacts>
183                   </configuration>
184                 </execution>
185               </executions>
186             </plugin>
187           </plugins>
188         </pluginManagement>
189         <plugins>
190           <plugin>
191             <groupId>org.codehaus.mojo</groupId>
192             <artifactId>build-helper-maven-plugin</artifactId>
193           </plugin>
194         </plugins>
195       </build>
196     </profile>
197   </profiles>
198 </project>