From e8b6c3d5485a6c64cf2e0fbe3ff2351d0f4d95d7 Mon Sep 17 00:00:00 2001 From: Ryan Izard <ryan.izard@bigswitch.com> Date: Fri, 8 Jul 2016 08:37:33 -0400 Subject: [PATCH] allow ant to read project version and name from pom.xml. Ideally, we'd put these constants in a separate file, but maven does not allow these tags to contain variable values --- build.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.xml b/build.xml index eebe62871..cf502306b 100644 --- a/build.xml +++ b/build.xml @@ -251,10 +251,15 @@ <target name="coverage" depends="instrument,test,coverage-report"/> <target name="dist" depends="compile,compile-test"> + <xmlproperty file="pom.xml" prefix="pom"/> + <echo message="Setting Floodlight version: ${pom.project.version}"/> + <echo message="Setting Floodlight name: ${pom.project.name}"/> <jar destfile="${floodlight-jar}" filesetmanifest="mergewithoutmain"> <manifest> <attribute name="Main-Class" value="${main-class}"/> <attribute name="Class-Path" value="."/> + <attribute name="Implementation-Version" value="${pom.project.version}"/> + <attribute name="Implementation-Title" value="${pom.project.name}"/> </manifest> <fileset dir="${build}"/> <fileset dir="${resources}"/> -- GitLab