Mark yang generated source location as a source directory. 87/15087/2
authorNathan Harmon <nathan.harmon@hp.com>
Mon, 9 Feb 2015 21:19:39 +0000 (13:19 -0800)
committerRobert Varga <nite@hq.sk>
Tue, 10 Feb 2015 08:14:00 +0000 (08:14 +0000)
Change-Id: I958affa226e9e34a795ffea42450976ca9ef4697
Signed-off-by: Nathan Harmon <nathan.harmon@hp.com>
code-generator/binding-parent/pom.xml

index e3e22309680467997415b8960f056e3400d493d9..c38481e8d499af78d692e66f4c70d63ac1e3ed8c 100644 (file)
                 </file>
             </activation>
             <dependencies>
-              <dependency>
-                <groupId>org.opendaylight.yangtools</groupId>
-                <artifactId>yang-binding</artifactId>
-              </dependency>
+                <dependency>
+                    <groupId>org.opendaylight.yangtools</groupId>
+                    <artifactId>yang-binding</artifactId>
+                </dependency>
             </dependencies>
             <build>
                 <pluginManagement>
                                 </execution>
                             </executions>
                         </plugin>
-                      <plugin>
-                        <artifactId>maven-clean-plugin</artifactId>
-                        <configuration>
-                          <filesets>
-                            <fileset>
-                              <directory>${salGeneratorPath}</directory>
-                              <includes>
-                                <include>**</include>
-                              </includes>
-                            </fileset>
-                          </filesets>
-                        </configuration>
-                      </plugin>
+                        <plugin>
+                            <artifactId>maven-clean-plugin</artifactId>
+                            <configuration>
+                                <filesets>
+                                    <fileset>
+                                        <directory>${salGeneratorPath}</directory>
+                                        <includes>
+                                            <include>**</include>
+                                        </includes>
+                                    </fileset>
+                                </filesets>
+                            </configuration>
+                        </plugin>
+                        <plugin>
+                            <groupId>org.codehaus.mojo</groupId>
+                            <artifactId>build-helper-maven-plugin</artifactId>
+                            <executions>
+                                <execution>
+                                    <id>add-yang-sources</id>
+                                    <phase>generate-sources</phase>
+                                    <goals>
+                                        <goal>add-source</goal>
+                                    </goals>
+                                    <configuration>
+                                        <sources>
+                                            <source>${salGeneratorPath}</source>
+                                        </sources>
+                                    </configuration>
+                                </execution>
+                            </executions>
+                        </plugin>
                     </plugins>
                 </pluginManagement>
-              <plugins>
-                <plugin>
-                  <groupId>org.opendaylight.yangtools</groupId>
-                  <artifactId>yang-maven-plugin</artifactId>
-                  <version>${yangtools.version}</version>
-                </plugin>
-              </plugins>
+                <plugins>
+                    <plugin>
+                        <groupId>org.opendaylight.yangtools</groupId>
+                        <artifactId>yang-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>build-helper-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
             </build>
         </profile>
     </profiles>