Add missing configuration to build-helper-maven-plugin 75/57675/2
authorMichael Vorburger <vorburger@redhat.com>
Tue, 23 May 2017 11:51:00 +0000 (13:51 +0200)
committerMichael Vorburger <vorburger@redhat.com>
Mon, 29 May 2017 15:15:10 +0000 (15:15 +0000)
This makes openflowjava work e.g. in Eclipse IDE out-of-the-box (using
https://github.com/vorburger/opendaylight-eclipse-setup configuration),
without any red.  Without this, the paths with the generated code are
not automatically source folder in IDE, so not on classpath, so there's
red errors.

This is how all other projects do it; I just copy/pasted from elsewhere.

PS: In an ideal world, this should be inherited from some parent POM
e.g. in controller, but let's at least already do an ad-hoc fix here.

Change-Id: Ib0b8258de329345422d044f5fea4e9981b67da93
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
parent/pom.xml

index 802ded076562246b2770086976f8d161e6165b36..577acb33351faf93294fffb2afdc35f0a81f0dc5 100644 (file)
             </plugin>
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
-                 <artifactId>maven-checkstyle-plugin</artifactId>
+              <artifactId>maven-checkstyle-plugin</artifactId>
               <version>${checkstyle.version}</version>
               <configuration>
                 <failOnViolation>false</failOnViolation>
             <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>${jmxGeneratorPath}</source>
+                        <source>${salGeneratorPath}</source>
+                      </sources>
+                    </configuration>
+                  </execution>
+                </executions>
             </plugin>
         </plugins>
         <pluginManagement>