Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 52347 invoked from network); 28 Jul 2008 18:30:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jul 2008 18:30:06 -0000 Received: (qmail 8483 invoked by uid 500); 28 Jul 2008 18:30:06 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 8460 invoked by uid 500); 28 Jul 2008 18:30:05 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 8451 invoked by uid 99); 28 Jul 2008 18:30:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2008 11:30:05 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2008 18:29:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7A0002388878; Mon, 28 Jul 2008 11:29:45 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r680436 - /activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/java/org/apache/zookeeper/version/util/VerGenMojo.java Date: Mon, 28 Jul 2008 18:29:45 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080728182945.7A0002388878@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chirino Date: Mon Jul 28 11:29:45 2008 New Revision: 680436 URL: http://svn.apache.org/viewvc?rev=680436&view=rev Log: fixing version # not getting put into Info file. Modified: activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/java/org/apache/zookeeper/version/util/VerGenMojo.java Modified: activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/java/org/apache/zookeeper/version/util/VerGenMojo.java URL: http://svn.apache.org/viewvc/activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/java/org/apache/zookeeper/version/util/VerGenMojo.java?rev=680436&r1=680435&r2=680436&view=diff ============================================================================== --- activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/java/org/apache/zookeeper/version/util/VerGenMojo.java (original) +++ activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/java/org/apache/zookeeper/version/util/VerGenMojo.java Mon Jul 28 11:29:45 2008 @@ -107,8 +107,6 @@ formater.setTimeZone(TimeZone.getTimeZone("GMT")); String date = formater.format(new Date()); - VerGen.generateFile(outputDirectory, maj, min, micro, rev, date); - // Use the svn command to figure out the revision number. String svnDir; try { @@ -122,22 +120,25 @@ cli.addArguments(new String[]{ "info", svnDir}); CommandLineUtils.StringStreamConsumer out=new CommandLineUtils.StringStreamConsumer(); int rc = CommandLineUtils.executeCommandLine(cli, out, out); - getLog().debug("svn info '"+svnDir+"' rc="+rc); + getLog().debug("svn rc="+rc); + String output = out.getOutput(); + getLog().debug("svn output="+output); if( rc == 0 ) { - String output = out.getOutput(); - getLog().debug("svn output="+output); String label = "Revision: "; int pos = output.indexOf(label); if( pos >= 0 ) { StringTokenizer tok = new StringTokenizer(output.substring(pos+label.length())); - rev = Integer.parseInt(tok.nextToken()); + String t = tok.nextToken(); + rev = Integer.parseInt(t); } } } catch (Throwable e) { - getLog().warn("Unabled to determin svn revsion of directory: "+svnDir); + getLog().warn("Unabled to determin svn revsion of directory: "+svnDir, e); } + VerGen.generateFile(outputDirectory, maj, min, micro, rev, date); + this.project.addCompileSourceRoot( outputDirectory.getAbsolutePath() ); }