Merge "Fix for Bug 3"
[controller.git] / opendaylight / config / config-plugin-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <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">
4     <parent>
5         <groupId>org.opendaylight.controller</groupId>
6         <artifactId>config-subsystem</artifactId>
7         <version>0.2.3-SNAPSHOT</version>
8     </parent>
9     <modelVersion>4.0.0</modelVersion>
10     <artifactId>config-plugin-parent</artifactId>
11     <name>${project.artifactId}</name>
12     <packaging>pom</packaging>
13     <prerequisites>
14         <maven>3.0.4</maven>
15     </prerequisites>
16
17     <properties>
18         <jmxGeneratorPath>${project.build.directory}/generated-sources/config</jmxGeneratorPath>
19     </properties>
20
21     <build>
22         <pluginManagement>
23             <plugins>
24                 <plugin>
25                     <groupId>org.opendaylight.yangtools</groupId>
26                     <artifactId>yang-maven-plugin</artifactId>
27                     <executions>
28                         <execution>
29                             <id>config</id>
30                             <goals>
31                                 <goal>generate-sources</goal>
32                             </goals>
33                             <configuration>
34                                 <codeGenerators>
35                                     <generator>
36                                         <codeGeneratorClass>
37                                             org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
38                                         </codeGeneratorClass>
39                                         <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
40                                         <additionalConfiguration>
41                                             <namespaceToPackage1>
42                                                 urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang
43                                             </namespaceToPackage1>
44                                         </additionalConfiguration>
45                                     </generator>
46                                 </codeGenerators>
47                                 <inspectDependencies>true</inspectDependencies>
48                             </configuration>
49                         </execution>
50                     </executions>
51                     <dependencies>
52                         <dependency>
53                             <groupId>org.opendaylight.controller</groupId>
54                             <artifactId>yang-jmx-generator-plugin</artifactId>
55                             <version>${config.version}</version>
56                         </dependency>
57                     </dependencies>
58                 </plugin>
59
60                 <!-- tell eclipse about generated source folders -->
61                 <plugin>
62                     <groupId>org.codehaus.mojo</groupId>
63                     <artifactId>build-helper-maven-plugin</artifactId>
64                     <version>1.8</version>
65                     <executions>
66                         <execution>
67                             <id>add-source</id>
68                             <phase>generate-sources</phase>
69                             <goals>
70                                 <goal>add-source</goal>
71                             </goals>
72                             <configuration>
73                                 <sources>
74                                     <source>${jmxGeneratorPath}</source>
75                                     <source>${salGeneratorPath}</source>
76                                 </sources>
77                             </configuration>
78                         </execution>
79                     </executions>
80                 </plugin>
81             </plugins>
82         </pluginManagement>
83     </build>
84 </project>