You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by cm...@apache.org on 2003/02/08 17:56:03 UTC

cvs commit: jakarta-cactus/documentation/docs/xdocs/integration/ant howto_ant_primer.xml howto_ant_cactus.xml

cmlenz      2003/02/08 08:56:03

  Modified:    documentation/docs/xdocs faq.xml
               documentation/docs/xdocs/integration/ant
                        howto_ant_primer.xml howto_ant_cactus.xml
  Log:
  - Adapted docs about taskdef-ing the Cactus tasks via the newly added 
    resource file
  - Added < and > to mentions of runservertests to make it clearer that
    it's an Ant task
  
  Revision  Changes    Path
  1.13      +12 -11    jakarta-cactus/documentation/docs/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/faq.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- faq.xml	1 Feb 2003 17:10:12 -0000	1.12
  +++ faq.xml	8 Feb 2003 16:56:03 -0000	1.13
  @@ -32,8 +32,8 @@
             requests?</jump>
           </li>
           <li>
  -          <jump anchor="faq5">The Ant runservertests task hangs when my server
  -          is started</jump>
  +          <jump anchor="faq5">The &lt;runservertests&gt; Ant task hangs when 
  +          my server is started</jump>
           </li>
           <li>
             <jump anchor="faq6">I'm getting a
  @@ -252,23 +252,24 @@
       </section>
   
       <anchor id="faq5"/>
  -    <section title="The Ant runservertests task hangs when my server is started">
  +    <section title="The &lt;runservertests&gt; Ant task hangs when my server is started">
   
         <section title="Question">
           <p>
  -          When I use the <code>runservertests</code> Cactus custom Ant task,
  -          it starts my server allright but then hangs and the tests are not
  -          executed. What is happening?
  +          When I use the <code>&lt;runservertests&gt;</code> Cactus custom Ant 
  +          task, it starts my server allright but then hangs and the tests are 
  +          not executed. What is happening?
           </p>
         </section>
         <section title="Solution">
           <p>
             It means that the <code>testURL</code> attribute you've specified
  -          in <code>runservertests</code> is not a valid URL. It must be a URL
  -          that is valid when the server is up. To diagnosis the problem simply
  -          open a browser once your server is started (i.e. when the task hangs)
  -          and type the URL in your browser. An alternative to debug is also to
  -          run Ant in debug mode (<code>ant -debug [your target]</code>).
  +          in <code>&lt;runservertests&gt;</code> is not a valid URL. It must 
  +          be a URL that is valid when the server is up. To diagnosis the 
  +          problem simply open a browser once your server is started (i.e. when 
  +          the task hangs) and type the URL in your browser. An alternative to 
  +          debug is also to run Ant in debug mode 
  +          (<code>ant -debug [your target]</code>).
           </p>
           <p>
             With Cactus 1.3, the correct URL to call is the following, which is
  
  
  
  1.2       +2 -2      jakarta-cactus/documentation/docs/xdocs/integration/ant/howto_ant_primer.xml
  
  Index: howto_ant_primer.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/integration/ant/howto_ant_primer.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- howto_ant_primer.xml	3 Feb 2003 10:52:38 -0000	1.1
  +++ howto_ant_primer.xml	8 Feb 2003 16:56:03 -0000	1.2
  @@ -568,8 +568,8 @@
           <filter token="version" value="${project.version}"/>
           <filter token="year" value="${year}"/>
   
  -        <!-- Initialize custom Ant task needed for running the server tests -->
  -        <taskdef name="runservertests" classname="org.apache.cactus.ant.RunServerTestsTask">
  +        <!-- Initialize custom Ant tasks needed for running the server tests -->
  +        <taskdef resource="cactus.tasks">
               <classpath>
                   <pathelement location="${cactus.ant.jar}"/>
                   <pathelement path="${java.class.path}"/>
  
  
  
  1.2       +18 -14    jakarta-cactus/documentation/docs/xdocs/integration/ant/howto_ant_cactus.xml
  
  Index: howto_ant_cactus.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/integration/ant/howto_ant_cactus.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- howto_ant_cactus.xml	3 Feb 2003 10:52:38 -0000	1.1
  +++ howto_ant_cactus.xml	8 Feb 2003 16:56:03 -0000	1.2
  @@ -49,9 +49,9 @@
          </ul>
          <p>
            Cactus provides a custom Ant task (called the
  -         <code>runservertests</code> task) that helps perform all these tasks.
  -         The rest of this tutorial will explain how to write an Ant build
  -         file (<code>build.xml</code>) that performs these tasks and use
  +         <code>&lt;runservertests&gt;</code> task) that helps perform all these
  +         tasks. The rest of this tutorial will explain how to write an Ant 
  +         build file (<code>build.xml</code>) that performs these tasks and use
            the Cactus custom Ant task.
          </p>
           <p>
  @@ -64,7 +64,7 @@
   
        </section>
   
  -     <section title="The 'runservertests' task">
  +     <section title="The &lt;runservertests&gt; task">
   
           <p>
             This task will perform several actions, in the following order:
  @@ -79,7 +79,7 @@
               If a server is not started, call the Ant target defined by the
               <code>startTarget</code> attribute (see the example below). This
               target is
  -            supposed to start your container. The <code>runservertests</code>
  +            supposed to start your container. The <code>&lt;runservertests&gt;</code>
               task will then constantly poll the server by calling the test URL
               until the server answers back,
             </li>
  @@ -95,18 +95,18 @@
               <code>testTarget</code> has finished executing), it will then
               call the Ant target defined by the <code>stopTarget</code>
               attribute (see the example below). This target is supposed to stop
  -            the container. The <code>runservertests</code>
  +            the container. The <code>&lt;runservertests&gt;</code>
               task will then constantly poll the server by calling the test URL
               until the server stops answering, at which point it will consider
               the server to be stopped. Note that the <code>stopTarget</code>
               will only get called if the server was not already started when
  -            the <code>runservertests</code> task began executing. This is to
  -            allow keeping running servers for intensive debugging phases.
  +            the <code>&lt;runservertests&gt;</code> task began executing. This
  +            is to allow keeping running servers for intensive debugging phases.
             </li>
           </ul>
           <p>
  -          The <code>runservertests</code> task is generic in the sense that
  -          you are free to implement the <code>startTarget</code>,
  +          The <code>&lt;runservertests&gt;</code> task is generic in the sense 
  +          that you are free to implement the <code>startTarget</code>,
             <code>testTarget</code> and <code>stopTarget</code> as you wish and
             they will get called at the right time.
           </p>
  @@ -137,8 +137,8 @@
   ]]></source>
   
          <p>
  -         Before you can execute the <code>runservertests</code> task, you
  -         need to define it for Ant as it is not a standard Ant task. A
  +         Before you can execute the <code>&lt;runservertests&gt;</code> task,
  +         you need to define it for Ant as it is not a standard Ant task. A
            good place to do this is in an <code>init</code> target.
          </p>
          <p>
  @@ -153,7 +153,7 @@
   -->
   <target name="init">
       [...]
  -    <taskdef name="runservertests" classname="org.apache.cactus.ant.RunServerTestsTask">
  +    <taskdef resource="cactus.tasks">
           <classpath>
               <pathelement location="${cactus.ant.jar}"/>
           </classpath>
  @@ -166,7 +166,11 @@
            where <code>${cactus.ant.jar}</code> is an Ant property that points
            to the <code>cactus-ant.jar</code> file found in the
            <code>lib/</code> directory where you unpacked the Cactus
  -         distribution.
  +         distribution. In this example, <em>&quot;cactus.tasks&quot;</em> 
  +         refers to a property file contained in the 
  +         <code>cactus-ant.jar</code>. This       property file lists the Ant 
  +         tasks provided by Cactus, so you don't need to specify the class name 
  +         that implements the task.
          </p>
   
          <note>
  
  
  

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