From: Richard C. <ri...@cy...> - 2007-01-19 16:40:29
|
Jason, This happens because your Ant script redirects standard output *and* standard error into the log file. That way, the informative progress information generated by CVS ("cvs log: Logging ." and so on) also ends up in the logfile and confuses StatCVS. After a quick glance at [1], I think that adding a logError="true" attribute to the <exec/> task should fix it. This will write standard error to the screen instead of into the file. Richard [1] http://ant.apache.org/manual/CoreTasks/exec.html On 19 Jan 2007, at 03:18, Jason Weinstein wrote: > ANT SCRIPT > > > > <project name="statcvs" default="statcvs" basedir="."> > > <property environment="env" /> > > <property file="statcvs.properties" /> > > > > <taskdef name="statcvs" > classname="net.sf.statcvs.ant.StatCvsTask"/> > > > > <target name="statcvs" depends="" description=""> > > <exec executable="C:\Program Files\cvsnt\cvs" > dir="<module dir>" output="C:\temp\log.txt"> > > <arg line="log -d "2007-01-01<"" /> > > </exec> > > > > <statcvs path="<module dir>" log="C:\temp\log.txt" > outputDir="C:\temp\statcvs.txt" include="**/*.java" /> > > </target> > > </project> > > > > ANT OUTPUT > > > > Total time: 2 minutes 18 seconds > > S:\autobuild>ant -verbose -buildfile statcvs.xml > > Apache Ant version 1.6.5 compiled on June 2 2005 > > Buildfile: statcvs.xml > > Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_06\jre > > Detected OS: Windows XP > > parsing buildfile S:\autobuild\statcvs.xml with URI = file:///S:/ > autobuild/statcvs.xml > > Project base dir set to: S:\autobuild > > [property] Loading Environment env. > > [property] Loading S:\autobuild\statcvs.properties > > Build sequence for target(s) `statcvs' is [statcvs] > > Complete build sequence is [statcvs, ] > > > > statcvs: > > [exec] Current OS is Windows XP > > [exec] Output redirected to C:\temp\log.txt > > [exec] Executing 'C:\Program Files\cvsnt\cvs' with arguments: > > [exec] 'log' > > [exec] '-d' > > [exec] '2007-01-01<' > > [exec] > > [exec] The ' characters around the executable and arguments are > > [exec] not part of the command. > > > > BUILD FAILED > > S:\autobuild\statcvs.xml:12: Expected '?' or empty line at line 1, > but found 'cvs server: Logging .' > > at net.sf.statcvs.ant.StatCvsTask.execute(StatCvsTask.java:80) > > at org.apache.tools.ant.UnknownElement.execute > (UnknownElement.java:275) > > at org.apache.tools.ant.Task.perform(Task.java:364) > > at org.apache.tools.ant.Target.execute(Target.java:341) > > at org.apache.tools.ant.Target.performTasks(Target.java:369) > > at org.apache.tools.ant.Project.executeSortedTargets > (Project.java:1216) > > at org.apache.tools.ant.Project.executeTarget(Project.java: > 1185) > > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets > (DefaultExecutor.java:40) > > at org.apache.tools.ant.Project.executeTargets(Project.java: > 1068) > > at org.apache.tools.ant.Main.runBuild(Main.java:668) > > at org.apache.tools.ant.Main.startAnt(Main.java:187) > > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) > > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) > > > > Total time: 2 minutes 32 seconds > > S:\autobuild> > > > > LOG > > > > cvs server: Logging . > > > > RCS file: /cvs/<module>/Attic/.classpath,v > > Working file: .classpath > > head: 1.1 > > branch: > > locks: strict > > access list: > > symbolic names: > > > > ... > > |