diff options
| author | Bhupendra Bhusman Bhardwaj <bhupendrab@apache.org> | 2006-12-21 16:47:01 +0000 |
|---|---|---|
| committer | Bhupendra Bhusman Bhardwaj <bhupendrab@apache.org> | 2006-12-21 16:47:01 +0000 |
| commit | 2032535eb650a7fddeef04d21b750dc026f43eb8 (patch) | |
| tree | 6f6d96bef5cb538cf389c16ee5b73f6e0649c64b /java/pom.xml | |
| parent | 73e1fc2b9f4cf126b8143714d32c964c76d9161d (diff) | |
| download | qpid-python-2032535eb650a7fddeef04d21b750dc026f43eb8.tar.gz | |
QPID-227
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@489403 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/pom.xml')
| -rw-r--r-- | java/pom.xml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/java/pom.xml b/java/pom.xml index 6cd745726f..7a2790ec5c 100644 --- a/java/pom.xml +++ b/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> |
