You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2013/09/29 19:20:30 UTC

svn commit: r1527355 - in /qpid/trunk/qpid/java: broker-core/pom.xml common/pom.xml pom.xml

Author: robbie
Date: Sun Sep 29 17:20:29 2013
New Revision: 1527355

URL: http://svn.apache.org/r1527355
Log:
QPID-5192, QPID-5048: update the maven build in line with previous QPID-5192 commit, generate into the src tree but only when -Dgenerate=true is used

Moves the JavaCC invocation in common and the antrun-plugin invocation in broker-core to their own profile so they dont run unless requested. The antrun-plugin in common to be similarly moved when other changes to what its doing later become possible.

Modified:
    qpid/trunk/qpid/java/broker-core/pom.xml
    qpid/trunk/qpid/java/common/pom.xml
    qpid/trunk/qpid/java/pom.xml

Modified: qpid/trunk/qpid/java/broker-core/pom.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/pom.xml?rev=1527355&r1=1527354&r2=1527355&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/pom.xml (original)
+++ qpid/trunk/qpid/java/broker-core/pom.xml Sun Sep 29 17:20:29 2013
@@ -27,7 +27,7 @@
   <artifactId>qpid-broker-core</artifactId>
 
   <properties>
-    <generated-logmessages-dir>${project.build.directory}/generated-sources/generated-logmessages</generated-logmessages-dir>
+    <generated-logmessages-dir>${basedir}/src/main/java</generated-logmessages-dir>
   </properties>
 
   <dependencies>
@@ -212,65 +212,6 @@
 
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <!--version is specified in the parent poms -->
-        <executions>
-            <execution>
-              <id>logmessages-generated</id>
-              <phase>generate-sources</phase>
-              <goals>
-                <goal>run</goal>
-              </goals>
-              <configuration>
-                <target>
-                    <ant antfile="build-generate-sources.xml">
-                      <reference torefid="source.generation.classpathref" refid="maven.plugin.classpath" />
-                      <property name="build.compiler" value="extJavac"/>
-                      <property name="generated-logmessages-dir" value ="${generated-logmessages-dir}"/>
-                      <property name="gentools.classes" location="${basedir}/../common/target/gentools-classes" />
-                      <property name="velocity.classes" value="${project.build.directory}/velocity-classes"/>
-                      <property name="module.src" value="${basedir}/src/main/java"/>
-                    </ant>
-                </target>
-              </configuration>
-            </execution>
-        </executions>
-        <dependencies>
-          <dependency>
-            <groupId>velocity</groupId>
-            <artifactId>velocity</artifactId>
-            <version>1.4</version>
-          </dependency>
-          <dependency>
-            <groupId>velocity</groupId>
-            <artifactId>velocity-dep</artifactId>
-            <version>1.4</version>
-          </dependency>
-        </dependencies>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <version>1.8</version>
-        <executions>
-          <execution>
-            <id>add-source</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>add-source</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>${generated-logmessages-dir}</source>
-              </sources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <!--version specified in parent pom -->
         <configuration>
@@ -280,4 +221,58 @@
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <id>generate-sources-broker-core</id>
+      <activation>
+        <property>
+          <name>generate</name>
+          <value>true</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <!--version is specified in the parent poms -->
+            <executions>
+                <execution>
+                  <id>generate-sources-broker-core</id>
+                  <phase>generate-sources</phase>
+                  <goals>
+                    <goal>run</goal>
+                  </goals>
+                  <configuration>
+                    <target>
+                        <ant antfile="build-generate-sources.xml">
+                          <reference torefid="source.generation.classpathref" refid="maven.plugin.classpath" />
+                          <property name="build.compiler" value="extJavac"/>
+                          <property name="generated-logmessages-dir" value ="${generated-logmessages-dir}"/>
+                          <property name="gentools.classes" location="${basedir}/../common/target/gentools-classes" />
+                          <property name="velocity.classes" value="${project.build.directory}/velocity-classes"/>
+                          <property name="module.src" value="${basedir}/src/main/java"/>
+                        </ant>
+                    </target>
+                  </configuration>
+                </execution>
+            </executions>
+            <dependencies>
+              <dependency>
+                <groupId>velocity</groupId>
+                <artifactId>velocity</artifactId>
+                <version>1.4</version>
+              </dependency>
+              <dependency>
+                <groupId>velocity</groupId>
+                <artifactId>velocity-dep</artifactId>
+                <version>1.4</version>
+              </dependency>
+            </dependencies>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
 </project>

Modified: qpid/trunk/qpid/java/common/pom.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/pom.xml?rev=1527355&r1=1527354&r2=1527355&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/pom.xml (original)
+++ qpid/trunk/qpid/java/common/pom.xml Sun Sep 29 17:20:29 2013
@@ -28,9 +28,9 @@
 
   <properties>
     <!-- used during the antrun-plugin execution -->
-    <generated-amqp-0-8-dir>${project.build.directory}/generated-sources/generated-amqp-0-8</generated-amqp-0-8-dir>
-    <generated-amqp-0-10-dir>${project.build.directory}/generated-sources/generated-amqp-0-10</generated-amqp-0-10-dir>
-    <selector.output.dir>${project.build.directory}/generated-sources/generated-jms-selector/org/apache/qpid/filter/selector</selector.output.dir>
+    <generated-amqp-0-8-dir>${basedir}/src/main/java</generated-amqp-0-8-dir>
+    <generated-amqp-0-10-dir>${basedir}/src/main/java</generated-amqp-0-10-dir>
+    <selector.output.dir>${basedir}/src/main/java/org/apache/qpid/filter/selector</selector.output.dir>
     <version.file>${project.build.directory}/classes/qpidversion.properties</version.file>
   </properties>
 
@@ -86,28 +86,6 @@
       </plugin>
 
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>javacc-maven-plugin</artifactId>
-        <version>2.6</version>
-        <executions>
-          <execution>
-            <id>jms-selector-generated</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>javacc</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${selector.output.dir}</outputDirectory>
-              <sourceDirectory>src/main/grammar</sourceDirectory>
-              <includes>
-                <include>SelectorParser.jj</include>
-              </includes>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-antrun-plugin</artifactId>
         <!--version specified via parent poms -->
@@ -147,30 +125,44 @@
           </dependency>
         </dependencies>
       </plugin>
-
-      <!-- Add the generated source paths for compilation-->
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <version>1.8</version>
-        <executions>
-          <execution>
-            <id>add-source</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>add-source</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>${generated-amqp-0-8-dir}</source>
-                <source>${generated-amqp-0-10-dir}</source>
-              </sources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <id>generate-sources-common</id>
+      <activation>
+        <property>
+          <name>generate</name>
+          <value>true</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>javacc-maven-plugin</artifactId>
+          <version>2.6</version>
+          <executions>
+            <execution>
+              <id>jms-selector-generated</id>
+              <phase>generate-sources</phase>
+              <goals>
+                <goal>javacc</goal>
+              </goals>
+              <configuration>
+                <outputDirectory>${selector.output.dir}</outputDirectory>
+                <sourceDirectory>src/main/grammar</sourceDirectory>
+                <includes>
+                  <include>SelectorParser.jj</include>
+                </includes>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
 </project>

Modified: qpid/trunk/qpid/java/pom.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/pom.xml?rev=1527355&r1=1527354&r2=1527355&view=diff
==============================================================================
--- qpid/trunk/qpid/java/pom.xml (original)
+++ qpid/trunk/qpid/java/pom.xml Sun Sep 29 17:20:29 2013
@@ -51,6 +51,10 @@
 
     === Once the Ant build is removed ===
     - Move all the resources to be in the /src/foo/resources folders.
+    - Make qpidversion.properties in common be a filtered resource instead of generated.
+      - Get rid of the antrun-plugin execution in common, directly invoke the required java elements.
+      - Do the above in the generate-sources-common profile instead of current default config.
+    - Get rid of the antrun-plugin execution in broker-core, directly invoke the required java elements.
     - Fix the tests not to be dependant on the working dir being the java dir.
     - Fix the tests not to be dependant on the test config/output dirs being children of qpid.home.
       - Remove the QBTC output file mechanics, rely on Surefire to do it?



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org