From 5bbc924c813d28a34da64dfb2d0aeb4dfba28c60 Mon Sep 17 00:00:00 2001 From: Bilung Lee Date: Fri, 4 Nov 2011 02:15:45 +0000 Subject: [PATCH] SQOOP-383 Version tool is not working git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1197390 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 +- .../org/apache/sqoop/tool/VersionTool.java | 3 +- src/scripts/write-version-info.sh | 37 ++++++++++++++++++- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f497e1f0..c327ec3e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -107,7 +107,7 @@ Release 1.4.0-incubating SQOOP-386 Namespace migration cleanup - SQOOP-383 SQOOP-369 Version tool is not working + SQOOP-383 Version tool is not working SQOOP-381 Migrate cli and config packages to new name space diff --git a/src/java/org/apache/sqoop/tool/VersionTool.java b/src/java/org/apache/sqoop/tool/VersionTool.java index 07a61dd4..bcd824d3 100644 --- a/src/java/org/apache/sqoop/tool/VersionTool.java +++ b/src/java/org/apache/sqoop/tool/VersionTool.java @@ -33,8 +33,7 @@ public VersionTool() { @Override /** {@inheritDoc} */ public int run(SqoopOptions options) { - // FIXME with maven buildnumber plugin - System.out.print("FIXME "); + System.out.print(new org.apache.sqoop.SqoopVersion().toString()); return 0; } diff --git a/src/scripts/write-version-info.sh b/src/scripts/write-version-info.sh index b5c25111..c8695ca6 100755 --- a/src/scripts/write-version-info.sh +++ b/src/scripts/write-version-info.sh @@ -33,6 +33,9 @@ specifiedgithash=$3 outputdir=${buildroot}/src/com/cloudera/sqoop outputfile=${outputdir}/SqoopVersion.java +newoutputdir=${buildroot}/src/org/apache/sqoop +newoutputfile=${newoutputdir}/SqoopVersion.java + signature=$specifiedgithash if [ -z "$signature" ]; then signature=`git log -1 --pretty=format:%H` @@ -45,14 +48,45 @@ mkdir -p ${outputdir} cat > ${outputfile} < ${newoutputfile} <