commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: jakarta-commons/launcher/xdocs example.xml navigation.xml
Date Sun, 25 Jul 2004 15:48:33 GMT
dirkv       2004/07/25 08:48:33

  Modified:    launcher/xdocs navigation.xml
  Added:       launcher/xdocs example.xml
  add example + wiki
  Revision  Changes    Path
  1.5       +2 -8      jakarta-commons/launcher/xdocs/navigation.xml
  Index: navigation.xml
  RCS file: /home/cvs/jakarta-commons/launcher/xdocs/navigation.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- navigation.xml	7 Mar 2004 11:05:22 -0000	1.4
  +++ navigation.xml	25 Jul 2004 15:48:33 -0000	1.5
  @@ -21,16 +21,10 @@
           <menu name="Commons&#xA0;Launcher">
               <item name="Overview"                      href="/index.html" />
  -<!--            <item name="Configuration"                 href="/configuration.html"
/> -->
               <item name="API&#xA0;Documentation"        href="/apidocs/index.html"/>
  -            <item name="Developers&#xA0;Guide"         href="/guide/index.html"
  -                <item name="Class&#xA0;Diagrams"       href="/guide/classdiagrams.html"/>
  -                <item name="Sequence&#xA0;Diagrams"    href="/guide/sequencediagrams.html"/>
  -            </item>
  -            <item name="Examples"                      href=""/>
  +            <item name="Example"                       href="/example.html"/>
               <item name="Downloads"                     href="/downloads.html"/>
  +            <item name="Wiki"                          href=""/>
  1.1                  jakarta-commons/launcher/xdocs/example.xml
  Index: example.xml
  <?xml version="1.0" encoding="ISO-8859-1"?>
     Copyright 2002-2004 The Apache Software Foundation
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
    <author email="">Commons Documentation Team</author>
  <section name="Introduction">
  The Commons-launcher project provides a smart way to start a Java application.
  In the facts, the CommonsLauncher provides a bootstrap class which starts a ant process.
  This ant process :
      <li>makes the needed pre execution tasks : create the needed classpath, check
resources, download resources ..</li>
      <li>invoke a launcher task which allows to start a java application</li>
  <section name="Example">
  We want to start a small Main class :
  package org.apache.launcher.example;
  import org.apache.commons.logging.LogFactory;
  public class Main {
      public static void main(String[] args) {
  We will name it "our application".
  <section name="Global distribution">
  <p>This runtime distribution includes:
    <li>bin/ : the unix user script to start our small Main class</li>
    <li>bin/demo.bat : the windows user script to start our small Main class</li>
    <li>bin/ : contains the other files used by the script</li>
    <li>etc/ : contains the configuration file (log4j configuration, ..)</li>
    <li>lib/launcher-demo.jar : contains the small Main class</li>
    <li>lib/ : contains the needed jar files to the application</li>
    <li>lib/launcher/ : contains the needed jar files to the commons launcher</li>
  <section name="Bin Directory">
  <p><b>User script</b></p>
  <p>The demo.(sh/bat) is the bootstrap script used by the user to start the application:
    java -cp . LauncherBootstrap -executablename launcher-demo demo
  <p><b>Launcher ant configuration</b></p>
  <p>Our launcher.xml is as simple as possible :
  <project name="Demo Launcher" default="demo" basedir=".">
      <property name="base.dir" value="${basedir}/.."/>
      <property name="etc.dir" value="${base.dir}/etc"/>
      <property name="lib.dir" value="${base.dir}/lib"/>
      <property name="log.dir" value="${base.dir}/log"/>
      <path id="base.class.path">
          <pathelement path="${etc.dir}"/>
          <fileset dir="${lib.dir}" includes="*.jar"/>
      <target name="demo">
          <mkdir dir="${log.dir}" />
          <launch classname="org.apache.launcher.example.Main">
              <classpath refid="base.class.path"/>
                  <sysproperty key="log.dir" file="${log.dir}"/>
  It creates the needed classpath, the log directory, sets the log.dir system 
  property for log4j and executes our Main class.
  <p><b>Other files</b></p>
      <li>LauncherBootstrap.class, commons-launcher.jar : the neede classes the CommonsLauncher</li>
      <li> : the bootstrap configuration (used to find the lib/launcher

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message