723111fc954050d8c5352c5d8d691c243ed557b9
[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.9.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.5.0-SNAPSHOT</version>
22   <packaging>pom</packaging>
23
24   <properties>
25     <config.version>0.5.0-SNAPSHOT</config.version>
26     <mdsal.version>1.4.0-SNAPSHOT</mdsal.version>
27     <yangtools.version>1.0.0-SNAPSHOT</yangtools.version>
28     <jmxGeneratorPath>target/generated-sources/config-binding</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.1.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           <version>${yangtools.version}</version>
87           <dependencies>
88             <dependency>
89               <groupId>org.opendaylight.controller</groupId>
90               <artifactId>yang-jmx-generator-plugin</artifactId>
91               <version>${config.version}</version>
92             </dependency>
93           </dependencies>
94           <executions>
95             <execution>
96               <id>config</id>
97               <goals>
98                 <goal>generate-sources</goal>
99               </goals>
100               <configuration>
101                 <codeGenerators>
102                   <generator>
103                     <codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass>
104                     <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
105                     <additionalConfiguration>
106                       <namespaceToPackage1>urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang</namespaceToPackage1>
107                     </additionalConfiguration>
108                   </generator>
109                 </codeGenerators>
110                 <inspectDependencies>true</inspectDependencies>
111               </configuration>
112             </execution>
113           </executions>
114         </plugin>
115         <plugin>
116           <artifactId>maven-clean-plugin</artifactId>
117           <configuration>
118             <filesets>
119               <fileset>
120                 <directory>${jmxGeneratorPath}</directory>
121                 <includes>
122                   <include>**</include>
123                 </includes>
124               </fileset>
125               <fileset>
126                 <directory>${salGeneratorPath}</directory>
127                 <includes>
128                   <include>**</include>
129                 </includes>
130               </fileset>
131             </filesets>
132           </configuration>
133         </plugin>
134         <plugin>
135           <groupId>org.codehaus.mojo</groupId>
136           <artifactId>build-helper-maven-plugin</artifactId>
137           <executions>
138             <execution>
139               <id>add-yang-sources</id>
140               <phase>generate-sources</phase>
141               <goals>
142                 <goal>add-source</goal>
143               </goals>
144               <configuration>
145                 <sources>
146                   <source>src/main/yang</source>
147                   <source>${jmxGeneratorPath}</source>
148                   <source>${salGeneratorPath}</source>
149                 </sources>
150               </configuration>
151             </execution>
152           </executions>
153         </plugin>
154       </plugins>
155     </pluginManagement>
156   </build>
157   <profiles>
158     <profile>
159       <activation>
160         <file>
161           <exists>${config.file}</exists>
162         </file>
163       </activation>
164       <build>
165         <pluginManagement>
166           <plugins>
167             <plugin>
168               <groupId>org.codehaus.mojo</groupId>
169               <artifactId>build-helper-maven-plugin</artifactId>
170               <executions>
171                 <execution>
172                   <id>attach-artifacts</id>
173                   <goals>
174                     <goal>attach-artifact</goal>
175                   </goals>
176                   <phase>package</phase>
177                   <configuration>
178                     <artifacts>
179                       <artifact>
180                         <file>${config.file}</file>
181                         <type>xml</type>
182                         <classifier>config</classifier>
183                       </artifact>
184                     </artifacts>
185                   </configuration>
186                 </execution>
187               </executions>
188             </plugin>
189           </plugins>
190         </pluginManagement>
191         <plugins>
192           <plugin>
193             <groupId>org.codehaus.mojo</groupId>
194             <artifactId>build-helper-maven-plugin</artifactId>
195           </plugin>
196         </plugins>
197       </build>
198     </profile>
199   </profiles>
200 </project>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.