Adding presubmit target so Joel can use it, as his checkstyle setup is currently foobared (note, checkstyle info message will be updated in subsequent commit)
review by:fabbott

git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4582 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/build.xml b/build.xml
index d6761b0..b42149b 100755
--- a/build.xml
+++ b/build.xml
@@ -71,7 +71,10 @@
     <delete dir="${gwt.build}" />
   </target>
 
-  <target name="apicheck" depends="build"
+  <target name ="presubmit" description="Runs checkstyle,apichecker, and all tests" depends="test,apicheck-nobuild,checkstyle">		
+ </target>
+	
+  <target name="apicheck-nobuild" 
     description="Checks API compatibility to prior GWT revision">
     <copy tofile="${gwt.build.out}/userApi.conf" filtering="false"
           file="${gwt.apicheck.config}"
@@ -96,5 +99,7 @@
       <arg file="${gwt.build.out}/userApi.conf"/>
     </java>
   </target>
-
+  
+  <target name="apicheck" depends="build,apicheck-nobuild"/>
+ 
 </project>
diff --git a/common.ant.xml b/common.ant.xml
index 4f76a90..1bbd0e1 100755
--- a/common.ant.xml
+++ b/common.ant.xml
@@ -252,10 +252,12 @@
     <element name="sourcepath" implicit="yes" optional="true" />
     <sequential>
       <taskdef resource="checkstyletask.properties" classpath="${gwt.tools.antlib}/checkstyle-all-4.2.jar;${gwt.build.lib}/gwt-customchecks.jar" />
-      <checkstyle config="${gwt.root}/eclipse/settings/code-style/gwt-checkstyle.xml" maxWarnings="0">
+      <checkstyle config="${gwt.root}/eclipse/settings/code-style/gwt-checkstyle.xml" maxErrors="0">
+      	<formatter type="xml" toFile="${project.build}/checkstyle_log.xml"/>
         <property key="checkstyle.header.file" file="${gwt.root}/eclipse/settings/code-style/google.header" />
         <sourcepath />
       </checkstyle>
+     <echo message="Checkstyle messages are reported in checkstyle_log.xml located at ${project.build}" />
     </sequential>
   </macrodef>
 
diff --git a/user/build.xml b/user/build.xml
index e096007..dcd2c99 100755
--- a/user/build.xml
+++ b/user/build.xml
@@ -141,5 +141,7 @@
     <delete dir="${project.build}" />
     <delete file="${project.lib}" />
   </target>
-
+  <target name="presubmit" depends="test, checkstyle" description="runs the gwt api checker, user checkstyle, and user tests">
+   <gwt.ant dir=".." target="apicheck-nobuild"/>
+  </target>
 </project>