summaryrefslogtreecommitdiff
path: root/qpid/java/pom.xml
diff options
context:
space:
mode:
authorBhupendra Bhusman Bhardwaj <bhupendrab@apache.org>2006-12-21 16:47:01 +0000
committerBhupendra Bhusman Bhardwaj <bhupendrab@apache.org>2006-12-21 16:47:01 +0000
commit4cac701ce33975589563f8b86737fb68008723ae (patch)
treead2d8b325f0c2f45b3c0966822310061633d935a /qpid/java/pom.xml
parent7122ba938e962dbd10edbb850b3b9932ad319cc3 (diff)
downloadqpid-python-4cac701ce33975589563f8b86737fb68008723ae.tar.gz
QPID-227
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@489403 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/pom.xml')
-rw-r--r--qpid/java/pom.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/qpid/java/pom.xml b/qpid/java/pom.xml
index 6cd745726f..7a2790ec5c 100644
--- a/qpid/java/pom.xml
+++ b/qpid/java/pom.xml
@@ -162,6 +162,7 @@
<pluginManagement>
<plugins>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
@@ -174,6 +175,52 @@
</dependency>
</dependencies>
+
+ <executions>
+
+ <!-- This Ant task writes the module name, version and the Subversion version information out to a properties file.
+ The svnversion command must be available to run from the command line for this to work. The build will not fail if
+ svnversion cannot be run though.
+ This is done during the 'compile' phase to reflect the version of the currently compiled code and to ensure that
+ these properties are up to date when running from a file system classpath. Consider moving this to, or running a second
+ time, during the 'package' phase to capture the version of any resources added to jar files.
+ This svnversion command is always run in the top directory to accurately reflect the svnversion range accross all modules
+ at the time of the build.
+ The properties are placed into a file 'version.properties' in the target/classes directory of any child module that runs
+ this plugin.
+ The 'version.properties' file is loaded by the org.apache.qpid.common.QpidProperties class.
+ Be carefull of the possibility that the 'common' module may run this antrun plugin and recieve its own set of
+ version.properties and then the client or broker being built against an older version of the common library ending up with
+ the wrong version information. This is unlikely to happen because the client or broker should pick up its own properties
+ from the classpath first. If this happens it will be obvious because the productName property will be
+ 'Qpid Common Utilities'. If this is a problem then push this ant task down into the client and broker poms and remove it
+ from here.
+ -->
+ <execution>
+ <id>version_properties</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+
+ <exec executable="svnversion" spawn="false" failifexecutionfails="false"
+ dir="${topDirectoryLocation}" outputproperty="svnversion">
+ <arg line="."/>
+ </exec>
+
+ <!-- Write the version.properties out. -->
+ <propertyfile file="target/classes/version.properties">
+ <entry key="qpid.svnversion" value="${svnversion}"/>
+ <entry key="qpid.name" value="${project.name}"/>
+ <entry key="qpid.version" value="${project.version}"/>
+ </propertyfile>
+
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>