Add javadoc generation for yang modules in netconf subsystem
[controller.git] / opendaylight / netconf / pom.xml
index 6fef98ff361a05842d896d7f901a86ff04c7c783..2c2ef3b5076155d2f34303e56f32eef4ff411b94 100644 (file)
@@ -50,6 +50,7 @@
         <netconf.netty.version>4.0.10.Final</netconf.netty.version>
         <netconf.version>0.2.4-SNAPSHOT</netconf.version>
         <config.version>0.2.4-SNAPSHOT</config.version>
         <netconf.netty.version>4.0.10.Final</netconf.netty.version>
         <netconf.version>0.2.4-SNAPSHOT</netconf.version>
         <config.version>0.2.4-SNAPSHOT</config.version>
+        <salGeneratorPath>${project.build.directory}/generated-sources/sal</salGeneratorPath>
     </properties>
 
     <dependencies>
     </properties>
 
     <dependencies>
                         </instructions>
                     </configuration>
                 </plugin>
                         </instructions>
                     </configuration>
                 </plugin>
+                <plugin>
+                    <groupId>org.opendaylight.yangtools</groupId>
+                    <artifactId>yang-maven-plugin</artifactId>
+                    <version>${yangtools.version}</version>
+                    <executions>
+                        <execution>
+                            <goals>
+                                <goal>generate-sources</goal>
+                            </goals>
+                            <configuration>
+                                <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+                                <codeGenerators>
+                                    <generator>
+                                        <codeGeneratorClass>
+                                            org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
+                                        </codeGeneratorClass>
+                                        <outputBaseDir>
+                                            ${salGeneratorPath}
+                                        </outputBaseDir>
+                                    </generator>
+                                    <generator>
+                                        <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
+                                        <outputBaseDir>${project.build.directory}/site/models</outputBaseDir>
+                                    </generator>
+                                </codeGenerators>
+                                <inspectDependencies>true</inspectDependencies>
+                            </configuration>
+                        </execution>
+                    </executions>
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.opendaylight.yangtools</groupId>
+                            <artifactId>maven-sal-api-gen-plugin</artifactId>
+                            <version>${yangtools.version}</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>build-helper-maven-plugin</artifactId>
+                    <version>1.7</version>
+                    <executions>
+                        <execution>
+                            <phase>generate-sources</phase>
+                            <goals>
+                                <goal>add-source</goal>
+                            </goals>
+                            <configuration>
+                                <sources>
+                                    <source>${salGeneratorPath}</source>
+                                </sources>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
             </plugins>
 
         </pluginManagement>
             </plugins>
 
         </pluginManagement>