Bug 651 - cleanup eclipse errors in openflowplugin 08/6008/4
authorjameshall03885 <ghall@brocade.com>
Wed, 9 Apr 2014 17:16:05 +0000 (13:16 -0400)
committerjameshall03885 <ghall@brocade.com>
Fri, 11 Apr 2014 14:38:33 +0000 (10:38 -0400)
- To avoid devs from having to run the IDE profile so eclipse can see the yang
generated source files, the yang source files are now generated under src/main/yang-gen-sals
or src/main/yang-gen-config instead of target/target-ide.

- The maven-clean-plugin was moved to the ofp parent pom and removed from
all child poms where it was specified. Thus, it will be automatically run for all
projects. The plugin's execution will clean all xtend and yang generated source dirs.

- The build-helper-maven-plugin was also moved to the parent pom and removed from
all child poms. It will automatically run for all projects and no longer needs to be
specified in child poms. The plugin's execution will created eclipse source folders
for all xtend and yang generated source.

I also removed two occurances of "&gt;" which seemed extraneous ... but perhaps I'm unaware of some pom.xml magic?

Change-Id: Ie99e141e55e03a3a3ebce3743624e7bea6e42e7b
Signed-off-by: jameshall03885 <ghall@brocade.com>
drop-test/pom.xml
pom.xml
test-provider/pom.xml

index 03f434e937587ab6309ec3488b73304a3cee45ff..a156f625e93eb3390f93b90fbe515e61f62a8441 100644 (file)
@@ -65,7 +65,7 @@
                 <configuration>
                     <instructions>
                         <Bundle-Activator>org.opendaylight.openflowplugin.droptest.DropTestActivator</Bundle-Activator>
-                        <Embed-Dependency>commons-lang</Embed-Dependency>&gt;
+                        <Embed-Dependency>commons-lang</Embed-Dependency>
                         <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                     </instructions>
                     <manifestLocation>${project.basedir}/META-INF</manifestLocation>
diff --git a/pom.xml b/pom.xml
index 00221afbbac2b0b7a94e9ad03cd9cfda843af496..c3e03d372494e46cc582fd7f7873b2db74f4a94e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
       <sal.connection.api.version>0.1.2-SNAPSHOT</sal.connection.api.version>
       <netconf.connector.version>0.2.5-SNAPSHOT</netconf.connector.version>
       <config.manager.version>0.2.5-SNAPSHOT</config.manager.version>
+      <build.helper.version>1.8</build.helper.version>
+      <xtend.version>2.4.3</xtend.version>
+      <xtend.dstdir>src/main/xtend-gen</xtend.dstdir>
+      <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
+      <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
     </properties>
 
     <dependencyManagement>
     </dependencyManagement>
 
     <build>
+        <plugins>
+          <plugin>
+             <groupId>org.codehaus.mojo</groupId>
+             <artifactId>build-helper-maven-plugin</artifactId>
+          </plugin>
+        </plugins>
         <pluginManagement>
           <plugins>
             <plugin>
               <artifactId>maven-paxexam-plugin</artifactId>
               <version>1.2.4</version>
             </plugin>
+            <plugin>
+              <groupId>org.eclipse.xtend</groupId>
+              <artifactId>xtend-maven-plugin</artifactId>
+              <version>${xtend.version}</version>
+              <executions>
+                  <execution>
+                      <goals>
+                          <goal>compile</goal>
+                      </goals>
+                      <configuration>
+                          <outputDirectory>${xtend.dstdir}</outputDirectory>
+                      </configuration>
+                  </execution>
+              </executions>
+          </plugin>
+          <plugin>
+              <artifactId>maven-clean-plugin</artifactId>
+              <configuration>
+                  <filesets>
+                      <fileset>
+                          <directory>${xtend.dstdir}</directory>
+                          <includes>
+                              <include>**</include>
+                          </includes>
+                      </fileset>
+                      <fileset>
+                          <directory>${jmxGeneratorPath}</directory>
+                          <includes>
+                              <include>**</include>
+                          </includes>
+                      </fileset>
+                      <fileset>
+                          <directory>${salGeneratorPath}</directory>
+                          <includes>
+                              <include>**</include>
+                          </includes>
+                      </fileset>
+                  </filesets>
+              </configuration>
+            </plugin>
+          <plugin>
+             <groupId>org.codehaus.mojo</groupId>
+             <artifactId>build-helper-maven-plugin</artifactId>
+             <version>${build.helper.version}</version>
+             <executions>
+                <execution>
+                   <id>add-source</id>
+                   <phase>generate-sources</phase>
+                   <goals>
+                      <goal>add-source</goal>
+                   </goals>
+                   <configuration>
+                      <sources>
+                         <source>${jmxGeneratorPath}</source>
+                         <source>${salGeneratorPath}</source>
+                         <source>${xtend.dstdir}</source>
+                      </sources>
+                   </configuration>
+                </execution>
+             </executions>
+            </plugin>
           </plugins>
-
         </pluginManagement>
     </build>
 
index 9014162ce594361a0f3c8c2e8b0905f1f3d5d5e5..c094c43a40a00fe9668563c6dff38c00bc9443fe 100644 (file)
@@ -71,7 +71,7 @@
                 <configuration>
                     <instructions>
                         <Bundle-Activator>org.opendaylight.openflowplugin.test.OpenflowpluginTestActivator</Bundle-Activator>
-                        <Embed-Dependency>commons-lang</Embed-Dependency>&gt;
+                        <Embed-Dependency>commons-lang</Embed-Dependency>
                         <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                     </instructions>
                     <manifestLocation>${project.basedir}/META-INF</manifestLocation>
             <plugin>
                 <groupId>org.eclipse.xtend</groupId>
                 <artifactId>xtend-maven-plugin</artifactId>
-                <version>${xtend.version}</version>
-                <executions>
-                  <execution>
-                      <goals>
-                          <goal>compile</goal>
-                      </goals>
-                      <configuration>
-                          <outputDirectory>${basedir}/src/main/xtend-gen</outputDirectory>
-                      </configuration>
-                  </execution>
-              </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <version>${maven.clean.plugin.version}</version>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/xtend-gen</directory>
-                            <includes>
-                                <include>**</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
             </plugin>
         </plugins>
     </build>