fa8a4385e300d0b995a0b66627ce89cdea94840c
[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.yangtools</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     </dependencies>
57   </dependencyManagement>
58
59   <dependencies>
60     <dependency>
61       <groupId>org.opendaylight.yangtools</groupId>
62       <artifactId>yang-common</artifactId>
63     </dependency>
64     <dependency>
65       <groupId>org.opendaylight.controller</groupId>
66       <artifactId>config-api</artifactId>
67     </dependency>
68     <dependency>
69       <groupId>org.opendaylight.controller</groupId>
70       <artifactId>sal-binding-config</artifactId>
71     </dependency>
72   </dependencies>
73   <build>
74     <pluginManagement>
75       <plugins>
76         <plugin>
77           <groupId>org.opendaylight.yangtools</groupId>
78           <artifactId>yang-maven-plugin</artifactId>
79           <dependencies>
80             <dependency>
81               <groupId>org.opendaylight.controller</groupId>
82               <artifactId>yang-jmx-generator-plugin</artifactId>
83               <version>${config.version}</version>
84             </dependency>
85           </dependencies>
86           <executions>
87             <execution>
88               <id>config</id>
89               <goals>
90                 <goal>generate-sources</goal>
91               </goals>
92               <configuration>
93                 <codeGenerators>
94                   <generator>
95                     <codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass>
96                     <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
97                     <additionalConfiguration>
98                       <namespaceToPackage1>urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang</namespaceToPackage1>
99                     </additionalConfiguration>
100                   </generator>
101                 </codeGenerators>
102                 <inspectDependencies>true</inspectDependencies>
103               </configuration>
104             </execution>
105           </executions>
106         </plugin>
107         <plugin>
108           <artifactId>maven-clean-plugin</artifactId>
109           <configuration>
110             <filesets>
111               <fileset>
112                 <directory>${jmxGeneratorPath}</directory>
113                 <includes>
114                   <include>**</include>
115                 </includes>
116               </fileset>
117               <fileset>
118                 <directory>${salGeneratorPath}</directory>
119                 <includes>
120                   <include>**</include>
121                 </includes>
122               </fileset>
123             </filesets>
124           </configuration>
125         </plugin>
126         <plugin>
127           <groupId>org.codehaus.mojo</groupId>
128           <artifactId>build-helper-maven-plugin</artifactId>
129           <executions>
130             <execution>
131               <id>add-yang-sources</id>
132               <phase>generate-sources</phase>
133               <goals>
134                 <goal>add-source</goal>
135               </goals>
136               <configuration>
137                 <sources>
138                   <source>${jmxGeneratorPath}</source>
139                   <source>${salGeneratorPath}</source>
140                 </sources>
141               </configuration>
142             </execution>
143           </executions>
144         </plugin>
145       </plugins>
146     </pluginManagement>
147   </build>
148   <profiles>
149     <profile>
150       <activation>
151         <file>
152           <exists>${config.file}</exists>
153         </file>
154       </activation>
155       <build>
156         <pluginManagement>
157           <plugins>
158             <plugin>
159               <groupId>org.codehaus.mojo</groupId>
160               <artifactId>build-helper-maven-plugin</artifactId>
161               <executions>
162                 <execution>
163                   <id>attach-artifacts</id>
164                   <goals>
165                     <goal>attach-artifact</goal>
166                   </goals>
167                   <phase>package</phase>
168                   <configuration>
169                     <artifacts>
170                       <artifact>
171                         <file>${config.file}</file>
172                         <type>xml</type>
173                         <classifier>config</classifier>
174                       </artifact>
175                     </artifacts>
176                   </configuration>
177                 </execution>
178               </executions>
179             </plugin>
180           </plugins>
181         </pluginManagement>
182         <plugins>
183           <plugin>
184             <groupId>org.codehaus.mojo</groupId>
185             <artifactId>build-helper-maven-plugin</artifactId>
186           </plugin>
187         </plugins>
188       </build>
189     </profile>
190   </profiles>
191 </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.