You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2004/01/01 18:51:00 UTC

cvs commit: ws-jaxme/src/documentation/content/xdocs misc.xml site.xml

jochen      2004/01/01 09:51:00

  Modified:    .        buildxs.xml status.xml buildjm.xml buildjs.xml
                        build.xml buildpm.xml buildapi.xml
               src/webapp build.xml
               src/test/jaxb build.xml
               src/documentation/content/xdocs site.xml
  Added:       src/documentation/content/xdocs misc.xml
  Log:
  Added support for creation of a Clover report. See misc.xml for details.
  
  Revision  Changes    Path
  1.5       +7 -2      ws-jaxme/buildxs.xml
  
  Index: buildxs.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/buildxs.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- buildxs.xml	29 Oct 2003 17:40:25 -0000	1.4
  +++ buildxs.xml	1 Jan 2004 17:51:00 -0000	1.5
  @@ -40,7 +40,12 @@
       <zip destfile="${dist}/jaxmexs-src.zip" basedir="${src}"/>
     </target>
   
  -  <target name="test" depends="init,all">
  +  <target name="init.clover" if="build.clover.db">
  +    <taskdef resource="clovertasks"/>
  +    <clover-setup initString="${build.clover.db}"/>
  +  </target>
  +
  +  <target name="test" depends="init.clover,init,all">
       <mkdir dir="${build.reports}"/>
       <junit printsummary="yes" haltonfailure="no">
         <classpath>
  @@ -48,7 +53,7 @@
           <pathelement location="${dist}/jaxmexs.jar"/>
         </classpath>
         <formatter type="plain" />
  -      <batchtest fork="no" todir="${build.reports}">
  +      <batchtest todir="${build.reports}">
           <fileset dir="${src}" includes="org/apache/ws/jaxme/xs/junit/**/*Test.java"/>
         </batchtest>
       </junit>
  
  
  
  1.3       +5 -2      ws-jaxme/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/status.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- status.xml	9 Dec 2003 11:38:43 -0000	1.2
  +++ status.xml	1 Jan 2004 17:51:00 -0000	1.3
  @@ -13,7 +13,10 @@
     </todo>
   
     <changes>
  +    <release version="0.6-dev" date="unreleased">
  +      <action dev="JW" type="improvement" context="build system">
  +      	Added support for creating a clover report. See misc.html for a howto.
  +      </action>
  +    </release>
     </changes>
   </status>
  -
  -
  
  
  
  1.4       +7 -2      ws-jaxme/buildjm.xml
  
  Index: buildjm.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/buildjm.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- buildjm.xml	3 Nov 2003 20:50:50 -0000	1.3
  +++ buildjm.xml	1 Jan 2004 17:51:00 -0000	1.4
  @@ -4,7 +4,7 @@
          depend on init. Would be nice, if Ant could do that for us.
          All the properties below could as well be set in
          ${user.home}/.jaxme.properties or ${basedir}/jaxme.properties -->
  -  <target name="init">
  +  <target name="init" depends="init.clover">
   	<property name="jaxme.properties.location.1" location="${user.home}/.jaxme.properties"/>
   	<property name="jaxme.properties.location.2" location="${basedir}/jaxme.properties"/>
       <available file="${jaxme.properties.location.1}" property="jaxme.properties.location" value="${jaxme.properties.location.1}"/>
  @@ -46,6 +46,11 @@
       </path>
     </target>
   
  +  <target name="init.clover" if="build.clover.db">
  +    <taskdef resource="clovertasks"/>
  +    <clover-setup initString="${build.clover.db}"/>
  +  </target>
  +
     <target name="clean" depends="init">
       <delete dir="${build}"/>
       <delete dir="${dist}"/>
  @@ -292,7 +297,7 @@
           <pathelement location="${build}/examples/src"/>
         </classpath>
         <formatter type="plain" />
  -      <batchtest fork="true" todir="${build}/reports">
  +      <batchtest todir="${build}/reports">
           <fileset dir="${src}">
             <include name="org/apache/ws/jaxme/junit/**/*Test.java"/>
           </fileset>
  
  
  
  1.2       +11 -6     ws-jaxme/buildjs.xml
  
  Index: buildjs.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/buildjs.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- buildjs.xml	23 Sep 2003 12:29:09 -0000	1.1
  +++ buildjs.xml	1 Jan 2004 17:51:00 -0000	1.2
  @@ -1,7 +1,7 @@
   <?xml version="1.0"?>
   
   <project name="JaxMe JavaSource framework" default="all">
  -  <target name="init">
  +  <target name="init" depends="init.clover">
       <!-- Allow the user to override properties in its home directory. -->
       <property file="${user.home}/.jaxme.properties"/>
       <!-- Likewise, allow the user to have a custom jaxme.properties file -->
  @@ -54,6 +54,11 @@
       </path>
     </target>
   
  +  <target name="init.clover" if="build.clover.db">
  +    <taskdef resource="clovertasks"/>
  +    <clover-setup initString="${build.clover.db}"/>
  +  </target>
  +
     <target name="clean" depends="init">
       <delete dir="${build}"/>
       <delete dir="${dist}"/>
  @@ -150,17 +155,17 @@
   
     <target name="all" depends="init,compile,jar,generate"/>
   
  -  <target name="test" depends="test.javasource,test.sqlsource"/>
  +  <target name="test" depends="init.clover,test.javasource,test.sqlsource"/>
   
     <target name="test.javasource" depends="all">
       <mkdir dir="${build.reports}"/>
  -    <junit printsummary="yes" haltonfailure="yes">
  +    <junit printsummary="yes" haltonfailure="no">
         <classpath>
           <path refid="jaxmejs.runtime.path"/>
           <pathelement location="${build.test.classes}"/>
         </classpath>
         <formatter type="plain" />
  -      <batchtest fork="yes" todir="${build.reports}">
  +      <batchtest todir="${build.reports}">
           <fileset dir="${src}">
             <include name="org/apache/ws/jaxme/js/junit/**/VersionTest.java"/>
           </fileset>
  @@ -174,13 +179,13 @@
   
     <target name="test.sqlsource" depends="all">
       <mkdir dir="${build.reports}"/>
  -    <junit printsummary="yes" haltonfailure="yes">
  +    <junit printsummary="yes" haltonfailure="no">
         <classpath>
           <path refid="jaxmejs.runtime.path"/>
           <pathelement location="${build.test.classes}"/>
         </classpath>
         <formatter type="plain" />
  -      <batchtest fork="no" todir="${build.reports}">
  +      <batchtest todir="${build.reports}">
           <fileset dir="${src}">
             <include name="org/apache/ws/jaxme/sqls/junit/**/*Test.java"/>
           </fileset>
  
  
  
  1.13      +30 -3     ws-jaxme/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/build.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build.xml	27 Nov 2003 18:29:57 -0000	1.12
  +++ build.xml	1 Jan 2004 17:51:00 -0000	1.13
  @@ -2,7 +2,7 @@
   <!ENTITY forrest-targets SYSTEM "file:forrest-targets.ent">
   ]>
   <project name="JaxMe2" default="all">
  -  <target name="init">
  +  <target name="init" depends="init.clover">
   	<property name="version" value="0.2"/>
   	<property name="jaxme.properties.location.1" location="${user.home}/.jaxme.properties"/>
   	<property name="jaxme.properties.location.2" location="${basedir}/jaxme.properties"/>
  @@ -17,6 +17,7 @@
       <property name="build.js" location="${basedir}/build/js"/>
       <property name="build.js.src" location="${basedir}/build/js/src"/>
       <property name="build.jm.src" location="${basedir}/build/jm/src"/>
  +    <property name="build.clover.html" location="${build}/clover.html"/>
   
       <property name="dist" location="${basedir}/dist"/>
       <property name="build.docs" location="${build}/docs"/>
  @@ -40,6 +41,11 @@
       </path>
     </target>
   
  +  <target name="init.clover" if="build.clover.db">
  +    <taskdef resource="clovertasks"/>
  +    <clover-setup initString="${build.clover.db}"/>
  +  </target>
  +
     <target name="check.forrest.home" unless="forrest.home" depends="init">
       <echo>The property forrest.home is not set. This property should contain the</echo>
       <echo>location of the Apache Forrest distribution, which is required to</echo>
  @@ -187,6 +193,15 @@
       <antcall target="site"/>
     </target>
   
  +  <target name="forrestwar" depends="init,check.forrest.home">
  +    <mkdir dir="${build.docs.src.documentation}"/>
  +    <copy todir="${build.docs.src.documentation}">
  +      <fileset dir="${src.documentation}" excludes="manual/**/*"/>
  +    </copy>
  +    <property name="project.home" location="${build.docs}"/>
  +    <antcall target="war"/>
  +  </target>
  +
     <target name="docbook.html" depends="init,check.docbookxsl.home,check.docbook.home">
   	<delete dir="{build.manual}"/>
   	<mkdir dir="${build.manual}"/>
  @@ -214,10 +229,22 @@
     </target>
   
     <target name="test">
  -    <ant antfile="buildapi.xml" target="all" inheritall="false" inheritrefs="false"/>
  +    <ant antfile="buildapi.xml" target="test" inheritall="false" inheritrefs="false"/>
       <ant antfile="buildxs.xml" target="test" inheritall="false" inheritrefs="false"/>
  -    <ant antfile="buildjs.xml" target="all" inheritall="false" inheritrefs="false"/>
  +    <ant antfile="buildjs.xml" target="test" inheritall="false" inheritrefs="false"/>
       <ant antfile="buildjm.xml" target="test" inheritall="false" inheritrefs="false"/>
       <ant antfile="buildpm.xml" target="test" inheritall="false" inheritrefs="false"/>
  +  </target>
  +
  +  <target name="clover.html" depends="init">
  +    <clover-report>
  +      <current outfile="${build.clover.html}">
  +         <format type="html"/> 
  +      </current>	 
  +    </clover-report>
  +  </target>
  +
  +  <target name="clover.swing" depends="init">
  +    <clover-view/>
     </target>
   </project>
  
  
  
  1.5       +11 -2     ws-jaxme/buildpm.xml
  
  Index: buildpm.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/buildpm.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- buildpm.xml	20 Oct 2003 20:32:43 -0000	1.4
  +++ buildpm.xml	1 Jan 2004 17:51:00 -0000	1.5
  @@ -4,7 +4,7 @@
          depend on init. Would be nice, if Ant could do that for us.
          All the properties below could as well be set in
          ${user.home}/.jaxme.properties or ${basedir}/jaxme.properties -->
  -  <target name="init">
  +  <target name="init" depends="init.clover">
   	<property name="jaxme.properties.location.1" location="${user.home}/.jaxme.properties"/>
   	<property name="jaxme.properties.location.2" location="${basedir}/jaxme.properties"/>
       <available file="${jaxme.properties.location.1}" property="jaxme.properties.location" value="${jaxme.properties.location.1}"/>
  @@ -49,6 +49,15 @@
       </path>
     </target>
   
  +  <target name="init.clover" if="build.clover.db">
  +    <taskdef resource="clovertasks"/>
  +    <clover-setup initString="${build.clover.db}">
  +      <files>
  +        <exclude name="**/test/**/*.java"/>
  +      </files>
  +    </clover-setup>
  +  </target>
  +
     <target name="clean" depends="init">
       <delete dir="${build}"/>
       <delete>
  @@ -125,7 +134,7 @@
           <pathelement location="${build.test.classes}"/>
         </classpath>
         <formatter type="plain" />
  -      <batchtest fork="no" todir="${build.reports}">
  +      <batchtest todir="${build.reports}">
           <fileset dir="${src}" includes="org/apache/ws/jaxme/pm/junit/**/*Test.java"/>
         </batchtest>
       </junit>
  
  
  
  1.2       +9 -2      ws-jaxme/buildapi.xml
  
  Index: buildapi.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/buildapi.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- buildapi.xml	23 Sep 2003 12:29:09 -0000	1.1
  +++ buildapi.xml	1 Jan 2004 17:51:00 -0000	1.2
  @@ -47,7 +47,7 @@
    * SUCH DAMAGE.
   -->
   <project name="JaxMeAPI" default="all">
  -  <target name="init">
  +  <target name="init" depends="init.clover">
       <property name="build" location="${basedir}/build/api"/>
       <property name="dist" location="${basedir}/dist"/>
       <property name="debug" value="true"/>
  @@ -60,6 +60,11 @@
   	</path>
     </target>
   
  +  <target name="init.clover" if="build.clover.db">
  +    <taskdef resource="clovertasks"/>
  +    <clover-setup initString="${build.clover.db}"/>
  +  </target>
  +
     <target name="clean" depends="init">
       <delete dir="${build}"/>
       <delete dir="${dist}"/>
  @@ -69,7 +74,7 @@
       <mkdir dir="${build.classes}"/>
       <mkdir dir="${dist}"/>
       <javac srcdir="${src}" destdir="${build.classes}" debug="${debug}"
  -        optimize="${optimize}}" classpathref="jaxmeapi.class.path"/>
  +        optimize="${optimize}" classpathref="jaxmeapi.class.path"/>
     </target>
   
     <target name="jar" depends="init,compile">
  @@ -79,4 +84,6 @@
     </target>
   
     <target name="all" depends="init,compile,jar"/>
  +
  +  <target name="test" depends="init.clover,all"/>
   </project>
  
  
  
  1.2       +27 -3     ws-jaxme/src/webapp/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/webapp/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml	27 Dec 2003 22:09:02 -0000	1.1
  +++ build.xml	1 Jan 2004 17:51:00 -0000	1.2
  @@ -3,7 +3,7 @@
          depend on init. Would be nice, if Ant could do that for us.
          All the properties below could as well be set in
          ${user.home}/.jaxme.properties or ${basedir}/jaxme.properties -->
  -  <target name="init">
  +  <target name="init" depends="init">
   	<property name="jaxme.properties.location.1" location="${user.home}/.jaxme.properties"/>
   	<property name="jaxme.properties.location.2" location="${basedir}/jaxme.properties"/>
       <available file="${jaxme.properties.location.1}" property="jaxme.properties.location" value="${jaxme.properties.location.1}"/>
  @@ -30,6 +30,11 @@
   	</path>
     </target>
   
  +  <target name="init.clover" if="build.clover.db">
  +    <taskdef resource="clovertasks"/>
  +    <clover-setup initString="${build.clover.db}"/>
  +  </target>
  +
     <target name="clean" depends="init">
       <delete dir="${build}"/>
       <delete dir="${dist}/jaxme.war"/>
  @@ -63,8 +68,27 @@
       <copy todir="${tomcat.home}/webapps/jaxme/WEB-INF/lib">
         <fileset dir="${dist}" includes="jaxme*.jar"/>
       </copy>
  -    <copy todir="${tomcat.home}/webapps/jaxme/WEB-INF" overwrite="true">
  -      <fileset dir="${basedir}" includes="web.xml"/>
  +    <copy file="${basedir}/web.xml" todir="${tomcat.home}/webapps/jaxme/WEB-INF" overwrite="true">
  +      <filterset>
  +        <filter token="work.dir" value="${tomcat.home}/work"/>
  +        <filter token="http.proxyHost" value="${http.proxyHost}"/>
  +        <filter token="http.proxyPort" value="${http.proxyPort}"/>
  +      </filterset>
  +    </copy>
  +  </target>
  +
  +  <target name="war" depends="all">
  +    <copy todir="${build}" file="${basedir}/web.xml">
  +      <filterset>
  +        <filter token="work.dir" value=""/>
  +        <filter token="http.proxyHost" value=""/>
  +        <filter token="http.proxyPort" value=""/>
  +      </filterset>
       </copy>
  +    <war destfile="${dist}/jaxme.war" webxml="${build}/web.xml">
  +      <classes dir="${build.classes}"/>
  +      <fileset dir="${basedir}" includes="*.jsp"/>
  +      <lib dir="${dist}" includes="jaxme*.jar"/>
  +    </war>
     </target>
   </project>
  
  
  
  1.4       +10 -1     ws-jaxme/src/test/jaxb/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/test/jaxb/build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml	10 Dec 2003 11:46:52 -0000	1.3
  +++ build.xml	1 Jan 2004 17:51:00 -0000	1.4
  @@ -5,7 +5,7 @@
   
   -->
   <project name="test.jaxb" default="all">
  -  <target name="init">
  +  <target name="init" depends="init.clover">
       <condition property="params.available">
         <and>
           <isset property="build"/>
  @@ -25,6 +25,15 @@
           </not>
         </and>
       </condition>
  +  </target>
  +
  +  <target name="init.clover" if="build.clover.db">
  +    <taskdef resource="clovertasks"/>
  +    <clover-setup initString="${build.clover.db}">
  +      <files>
  +        <exclude name="**/test/**/*.java"/>
  +      </files>
  +    </clover-setup>
     </target>
   
     <target name="check.params" unless="params.available" depends="init">
  
  
  
  1.8       +5 -0      ws-jaxme/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- site.xml	21 Nov 2003 06:13:33 -0000	1.7
  +++ site.xml	1 Jan 2004 17:51:00 -0000	1.8
  @@ -33,6 +33,7 @@
     <developers label="Developer Resources">
       <release label="How to create a release" href="release.html"/>
       <todo label="Missing features" href="features.html"/>
  +    <misc label="Miscellaneous" href="misc.html"/>
     </developers>
   
     <external-refs>
  @@ -96,6 +97,10 @@
       <www.softwareag.com href="http://www.softwareag.com/">
         <tamino href="tamino/"/>
       </www.softwareag.com>
  +    <www.thecortex.net href="http://www.thecortex.net/">
  +      <clover href="clover/"/>
  +      <cloverkey href="clover/dl.jsp?key=0e65b4c0eea09ff233b124771"/>
  +    </www.thecortex.net>
       <sourceforge.net href="http://sourceforge.net/">
         <jaxmeproject href="projects/jaxme/"/>
         <jaxmedownloads href="project/showfiles.php?group_id=42590"/>
  
  
  
  1.1                  ws-jaxme/src/documentation/content/xdocs/misc.xml
  
  Index: misc.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd">
  <document> 
    <header> 
      <title>Miscellaneous</title> 
    </header> 
    <body>
      <p>This page contains miscellaneous informations for developers.</p>
  
      <section><title>Clover</title>
        <p><link href="site:clover">Clover</link> is a tool that allows to trace the
        	coverage of a test suite. In short, you compile your classes using clover,
        	run the unit tests and finally receive a report which tells you, which
        	methods and lines are covered by the unit tests and, more important,
        	which aren't.</p>
        <p>The nice thing with Clover is, that it is available at no cost for
        	open source projects like JaxMe. In other words, one can use it to
          determine the coverage of JaxMe's test suite. Here's how to do that:</p>
        <ol>
        	<li>To obtain a copy of Clover, you have to use the
        	  <link href="site:cloverkey">JaxMe license key</link>. After accepting
        	  the Clover license, you may download a ZIP file with "Clover for Ant".
        	  Extract the file and copy the file lib\clover.jar to the lib folder
        	  in your Ant home directory.</li>
        	<li>Choose a temporary directory. In what follows, I will assume /tmp/cloverdb.</li>
        	<li>Invoke the following Ant targets, in the same order</li>
        </ol>
        <source>
        	ant clean
        	ant -Dbuild.clover.db=/tmp/cloverdb all
        	ant -Dbuild.clover.db=/tmp/cloverdb test
        	ant -Dbuild.clover.db=/tmp/cloverdb test
        	ant -Dbuild.clover.db=/tmp/cloverdb clover.swing
        </source>
        <p>Don't ask me, why we have to call the "test" target twice. Alternatively
        	you may replace "clover.swing" with "clover.html": This will create a
        	set of HTML files with the same report.</p>
      </section>
    </body>
  </document>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org