home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / cli.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  6.6 KB  |  122 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
  18.  
  19. <document>
  20.   <header>
  21.     <title>Offline Page Generation with the Command Line Interface</title>
  22.     <version>1.0</version>
  23.     <type>Technical document</type>
  24.     <authors><person name="Upayavira" email="upayavira@apache.org"/>
  25.     </authors>
  26.     <abstract>This document explains how to use the Cocoon Command Line Interface for offline page and site generation.</abstract>
  27.   </header>
  28.   <body>
  29.     <s1 title="Overview">
  30.       <p>The Command Line Interface provides access to Cocoon's offline generation capabilities.</p>
  31.       <p>This page gives details of how configure and use the CLI. Details of the concepts behind
  32.          offline page generation are given on the offline generation 
  33.          <link href="index.html">overview</link> page.</p>
  34.     </s1>
  35.     <s1 title="Invoking the CLI">
  36.       <p>The CLI can be invoked from the command line. Change to the root directory of your 
  37.          Cocoon distribution, and then, on Unix use: <code>./cocoon.sh cli <parameters></code> 
  38.          and on Windows use <code>cocoon.bat cli <parameters></code></p>
  39.       <p>The relevant parameters are detailed in the following sections.</p>
  40.     </s1>
  41.     <s1 title="Configuring the CLI">
  42.       <p>The CLI has two methods of configuration, with an <code>xconf</code> file, and using 
  43.          command line parameters.</p>
  44.       <p>The <code>xconf</code> method is the newer, and gives access to a wider range of 
  45.          features, and is thus explained first.</p>
  46.       <note>Whilst the xconf method provides access to more features, the command line 
  47.             parameter method is more stable, as there are currently plans to improve
  48.             the xconf format to allow greater flexibility. If you require a stable and
  49.             consistent method for accessing the CLI, it is recommended that you use the 
  50.             command line parameter method.</note>
  51.       <s2 title="Using an Xconf file">
  52.         <p>To start the CLI using an xconf file, on Unix do <code>./cocoon.sh cli -x <xconf file></code>
  53.            or on Windows: <code>cocoon cli -x <xconf file></code>.</p>
  54.         <p>For a sample xconf file, with comments describing each option, see the 
  55.            <link href="configuration.html">configuration</link> page.</p>
  56.       </s2>
  57.       <s2 title="Command Line Parameters">
  58.         <p>You can get a listing of the available parameters on unix with 
  59.         <code>./cocoon.sh cli -h</code> or on Windows with <code>cocoon cli -h</code>.
  60.         This should give a listing something like:</p>
  61.         <source>
  62. -------------------- Executing -----------------
  63. Main Class: org.apache.cocoon.Main
  64. usage: cocoon cli [options] [targets]
  65. ------------------------------------------------------------------------
  66. cocoon 2.1
  67. Copyright (c) 1999-2003 Apache Software Foundation. All rights reserved.
  68. ------------------------------------------------------------------------
  69.  -a,--userAgent            use given string for user-agent header
  70.  -e,--confirmExtensions    confirm that file extensions match mime-type of
  71.                            pages and amend filename accordingly (default is true)
  72.  -C,--configFile           specify alternate location of the configuration
  73.                            file (default is ${contextDir}/cocoon.xconf)
  74.  -D,--defaultFilename      specify a filename to be appended to a URI when
  75.                            the URI refers to a directory
  76.  -L,--loadClass            specify a class to be loaded at startup
  77.                            (specifically for use with JDBC). Can be used multiple times
  78.  -P,--precompileOnly       generate java code for xsp and xmap files
  79.  -V,--verbose              enable verbose messages to System.out
  80.  -b,--brokenLinkFile       send a list of broken links to a file (one URI
  81.                            per line)
  82.  -c,--contextDir           use given dir as context
  83.  -d,--destDir              use given dir as destination
  84.  -f,--uriFile              use a text file with uris to process (one URI
  85.                            per line)
  86.  -h,--help                 print this message and exit
  87.  -k,--logKitconfig         use given file for LogKit Management
  88.                            configuration
  89.  -l,--Logger               use given logger category as default logger for
  90.                            the Cocoon engine
  91.  -p,--accept               use given string for accept header
  92.  -r,--followLinks          process pages linked from starting page or not
  93.                            (boolean argument is expected, default is true)
  94.  -u,--logLevel             choose the minimum log level for logging
  95.                            (DEBUG, INFO, WARN, ERROR, FATAL_ERROR) for startup logging
  96.  -v,--version              print the version information and exit
  97.  -w,--workDir              use given dir as working directory
  98.  -x,--xconf                specify a file containing XML configuration
  99.                            details for the command line interface
  100. Note: the context directory defaults to './webapp'
  101.         </source>
  102.         <p>For details of the meaning of each specific parameter, see the <link href="index.html">overview</link>
  103.            page.</p>
  104.         <s3 title="Specifying Targets">
  105.           <p>The command line parameter method does not have access to all of Cocoon's URI handling features. However,
  106.              it is possible to specify multiple URIs to be crawled, all of which will be written to the same destination,
  107.              and that destination (specified by the <code>-d</code> or <code>--destDir</code> option, may be a file URI
  108.              or any other protocol for which a ModifiableSource exists (e.g. FTP).</p>
  109.         </s3>
  110.         <s3 title="URI Files">
  111.           <p>A URI file offers a simple way to specify multiple URIs. The file is treated as one URI per line.</p>
  112.         </s3>
  113.         <s3 title="Broken Link Handling">
  114.           <p>If a broken link file is specified, all broken links will be written to this file, in text format,
  115.              one URI per line.</p>
  116.         </s3>
  117.       </s2>
  118.     </s1>
  119.   </body>
  120. </document>
  121.  
  122.