diff options
| author | Robert Gemmell <robbie@apache.org> | 2013-09-29 17:20:29 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2013-09-29 17:20:29 +0000 |
| commit | c4b207628ac34d5662303245fdffbf8f2e8d71ef (patch) | |
| tree | a90840f9cdbea429021b92caf4a4b74a5a190347 /qpid/java | |
| parent | 0f1bb4543e7bf03e3f7618216ef2a69919bc60b3 (diff) | |
| download | qpid-python-c4b207628ac34d5662303245fdffbf8f2e8d71ef.tar.gz | |
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.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1527355 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/broker-core/pom.xml | 115 | ||||
| -rw-r--r-- | qpid/java/common/pom.xml | 88 | ||||
| -rw-r--r-- | qpid/java/pom.xml | 4 |
3 files changed, 99 insertions, 108 deletions
diff --git a/qpid/java/broker-core/pom.xml b/qpid/java/broker-core/pom.xml index df5b9de121..0e5f486803 100644 --- a/qpid/java/broker-core/pom.xml +++ b/qpid/java/broker-core/pom.xml @@ -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> diff --git a/qpid/java/common/pom.xml b/qpid/java/common/pom.xml index a5ab0cae05..bf944df901 100644 --- a/qpid/java/common/pom.xml +++ b/qpid/java/common/pom.xml @@ -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> diff --git a/qpid/java/pom.xml b/qpid/java/pom.xml index fb1713bbc7..d3328804ba 100644 --- a/qpid/java/pom.xml +++ b/qpid/java/pom.xml @@ -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? |
