← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 231: Moved the lite package to trunk

 

------------------------------------------------------------
revno: 231
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Wed 2009-04-22 23:34:35 +0200
message:
  Moved the lite package to trunk
added:
  lite-package/
  lite-package/nb-configuration.xml
  lite-package/nbactions.xml
  lite-package/pom.xml
  lite-package/readme.txt
  lite-package/src/
  lite-package/src/main/
  lite-package/src/main/java/
  lite-package/src/main/java/org/
  lite-package/src/main/java/org/hisp/
  lite-package/src/main/java/org/hisp/dhis/
  lite-package/src/main/java/org/hisp/dhis/TrayApp.java
  lite-package/src/main/java/org/hisp/dhis/WebAppServer.java
  lite-package/src/main/resources/
  lite-package/src/main/resources/icons/
  lite-package/src/main/resources/icons/failed.png
  lite-package/src/main/resources/icons/running.png
  lite-package/src/main/resources/icons/starting.gif
  lite-package/src/main/resources/icons/stopped.png
  lite-package/src/main/resources/log4j.properties
  lite-package/src/test/
  lite-package/src/test/java/
  lite-package/src/test/java/org/
  lite-package/src/test/java/org/hisp/
  lite-package/src/test/java/org/hisp/dhis/
  lite-package/util/
  lite-package/util/startup.bat
  lite-package/util/startup.sh

=== added directory 'lite-package'
=== added file 'lite-package/nb-configuration.xml'
--- lite-package/nb-configuration.xml	1970-01-01 00:00:00 +0000
+++ lite-package/nb-configuration.xml	2009-04-22 21:34:35 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-shared-configuration>
+    <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->
+    <config-data xmlns="http://www.netbeans.org/ns/maven-config-data/1";>
+        <configurations/>
+    </config-data>
+</project-shared-configuration>

=== added file 'lite-package/nbactions.xml'
--- lite-package/nbactions.xml	1970-01-01 00:00:00 +0000
+++ lite-package/nbactions.xml	2009-04-22 21:34:35 +0000
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+        <action>
+            <actionName>run</actionName>
+            <goals>
+                <goal>process-classes</goal>
+                <goal>org.codehaus.mojo:exec-maven-plugin:1.1.1:exec</goal>
+            </goals>
+            <properties>
+                <exec.args>-classpath %classpath org.hisp.dhis.TrayApp</exec.args>
+                <exec.executable>java</exec.executable>
+            </properties>
+        </action>
+        <action>
+            <actionName>debug</actionName>
+            <goals>
+                <goal>process-classes</goal>
+                <goal>org.codehaus.mojo:exec-maven-plugin:1.1.1:exec</goal>
+            </goals>
+            <properties>
+                <exec.args>-Xdebug -Djava.compiler=none -Xnoagent -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.hisp.dhis.TrayApp</exec.args>
+                <jpda.listen>true</jpda.listen>
+                <exec.executable>java</exec.executable>
+            </properties>
+        </action>
+    </actions>

=== added file 'lite-package/pom.xml'
--- lite-package/pom.xml	1970-01-01 00:00:00 +0000
+++ lite-package/pom.xml	2009-04-22 21:34:35 +0000
@@ -0,0 +1,80 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.hisp.dhis</groupId>
+  <artifactId>dhis2-lite</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>dhis2-lite</name>
+  
+  <url>http://maven.apache.org</url>
+  
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <plugins>
+      <plugin>
+	    <artifactId>maven-assembly-plugin</artifactId>
+	    <version>2.2-beta-3</version> 
+	    <configuration>	  
+	      <descriptorRefs>
+	        <descriptorRef>jar-with-dependencies</descriptorRef>
+	      </descriptorRefs>
+	      <archive>
+	        <manifest>
+	          <mainClass>org.hisp.dhis.TrayApp</mainClass>
+	        </manifest>
+	      </archive>
+	    </configuration>
+      </plugin>    
+      <plugin>
+	    <artifactId>maven-compiler-plugin</artifactId>
+	    <version>2.0.2</version>
+	    <configuration>
+	      <debug>true</debug>
+	    </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty</artifactId>
+      <version>6.1.15</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jsp-2.1</artifactId>
+      <version>6.1.14</version>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <version>6.1.15</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>jetty</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.5-6.0.0</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.1</version>
+      <scope>compile</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>avalon-framework</groupId>
+          <artifactId>avalon-framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>logkit</groupId>
+          <artifactId>logkit</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+
+</project>

=== added file 'lite-package/readme.txt'
--- lite-package/readme.txt	1970-01-01 00:00:00 +0000
+++ lite-package/readme.txt	2009-04-22 21:34:35 +0000
@@ -0,0 +1,58 @@
+This  is a  first attempt  at  building a  lite version  of dhis.   It
+creates an  executable jar which  contains jetty server classes  and a
+simple tray icon controller. 
+
+mvn assembly:assembly
+
+to build the jar.  
+
+On Ubuntu (and other gnome-ish environments).  The java systemtray
+is not supported on fancy 3d enhanced window managers.  To work on
+ubuntu, first run:
+
+metacity --replace
+
+to get back to a vanilla WM.
+
+The application no longer depends on DHIS2_HOME being set. Rather the application
+looks for a dhis2.home system property that is being set by the lite jar.
+
+The expected structure looks like this:
+
+/ dhis2-lite.jar
+/ startup.bat (optional)
+/ conf /
+/ conf / hibernate.properties
+/ database /
+/ log /
+/ webapps /
+/ webapps / dhis
+/ webapps / birt
+
+After that you are away.  The application will install an icon in your
+system tray or equivalent).  The icons are currently crap but they can
+be changed.  If the server is stopped you get a blue one.  While it is
+starting it is orange.  When its running it goes green.
+
+The h2 database is created in the db directory and log file in the log directory.
+
+To exit - right click the icon and select Exit.
+
+A sample hibernate.properties configured for H2 looks like this:
+
+--------------------------------------------------------------------
+hibernate.dialect = org.hisp.dhis.dialect.H2Dialect
+hibernate.connection.driver_class = org.h2.Driver
+hibernate.connection.url = jdbc:h2:./database/dhis2;AUTO_SERVER=TRUE
+hibernate.connection.username = sa
+hibernate.connection.password =
+hibernate.hbm2ddl.auto = update
+--------------------------------------------------------------------
+
+TODO:
+1.  sort out proper logging!
+2.  make a nice "instrument panel" showing application status when you
+click on the tray icon
+3.  test with different databases.  Currently should work with mysql,
+postgres and h2, though the latter (and JavaDB) is targeted.
+4.  Put some nicer icons (animated gifs)

=== added directory 'lite-package/src'
=== added directory 'lite-package/src/main'
=== added directory 'lite-package/src/main/java'
=== added directory 'lite-package/src/main/java/org'
=== added directory 'lite-package/src/main/java/org/hisp'
=== added directory 'lite-package/src/main/java/org/hisp/dhis'
=== added file 'lite-package/src/main/java/org/hisp/dhis/TrayApp.java'
--- lite-package/src/main/java/org/hisp/dhis/TrayApp.java	1970-01-01 00:00:00 +0000
+++ lite-package/src/main/java/org/hisp/dhis/TrayApp.java	2009-04-22 21:34:35 +0000
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2004-2009, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.hisp.dhis;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.net.URL;
+import javax.swing.*;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mortbay.component.LifeCycle;
+
+/**
+ * Describe class <code>TrayApp</code> here.
+ *
+ * @author <a href="mailto:bobj@bobjolliffe@xxxxxxxxx";>Bob Jolliffe</a>
+ * @version $$Id$$
+ * @version 1.0
+ */
+public class TrayApp
+  implements LifeCycle.Listener
+{
+  private static final Log log = LogFactory.getLog( TrayApp.class );
+  private static final String CONFIG_DIR = "/conf";
+  
+  /**
+   * Describe variable <code>appServer</code> here.
+   *
+   */
+  protected WebAppServer appServer;
+
+  /**
+   * Describe variable <code>trayIcon</code> here.
+   *
+   */
+  protected TrayIcon trayIcon;
+
+  /**
+   * Describe variable <code>installDir</code> here.
+   *
+   */
+  private String installDir;
+
+  /**
+   * Creates a new <code>TrayApp</code> instance.
+   *
+   * @exception Exception if an error occurs
+   */
+  public TrayApp()
+    throws Exception
+  {
+    installDir = System.getProperty("user.dir");
+   
+    System.setProperty("dhis2.home", installDir + CONFIG_DIR);
+    System.setProperty("jetty.home", installDir);
+    
+    System.setProperty("birt.home", installDir + WebAppServer.BIRT_DIR);
+    System.setProperty("birt.context.path", WebAppServer.BIRT_CONTEXT_PATH);
+
+    SystemTray tray = SystemTray.getSystemTray();
+
+    Image image = createImage("/icons/stopped.png", "tray icon");
+
+    PopupMenu popup = new PopupMenu();
+    MenuItem defaultItem = new MenuItem("Exit");
+    popup.add(defaultItem);
+
+    trayIcon = new TrayIcon(image,"DHIS2 Lite", popup);
+    trayIcon.setImageAutoSize(true);
+
+    ActionListener listener = new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          String cmd = e.getActionCommand();
+          
+          if (cmd.equals("Exit"))
+          {
+            shutdown();
+          }
+        };
+      };
+
+    defaultItem.addActionListener(listener);
+
+    try {
+        tray.add(trayIcon);
+    } catch (AWTException ex) {
+        log.info("Oops: "+ex.toString());
+    }
+
+    appServer = new WebAppServer();
+    appServer.init(installDir,this);
+    try {
+        appServer.start();
+    } catch (Exception ex) {
+        String message = "Web server failed to start: \n"+ex.toString();
+        JOptionPane.showMessageDialog((JFrame)null, message);
+    }
+  }
+
+  /**
+   * Describe <code>shutdown</code> method here.
+   *
+   */
+  void shutdown()
+  {
+    log.info("Graceful shutdown...");
+    try {
+      appServer.stop();
+    }
+    catch (Exception ex) {
+      log.warn("Oops: "+ex.toString());
+    }
+    log.debug("Exiting...");
+    System.exit(0);
+  }
+
+  /**
+   * Describe <code>lifeCycleFailure</code> method here.
+   *
+   * @param arg0 a <code>LifeCycle</code> value
+   * @param arg1 a <code>Throwable</code> value
+   */
+  public void lifeCycleFailure(LifeCycle arg0, Throwable arg1) {
+    log.warn("Lifecycle: server failed");
+    trayIcon.setImage(createImage("/icons/failed.png", "Running icon"));
+    String message = "Web server failed to start - see logs for details";
+    JOptionPane.showMessageDialog((JFrame)null, message);
+    shutdown();
+  }
+
+  /**
+   * Describe <code>lifeCycleStarted</code> method here.
+   *
+   * @param arg0 a <code>LifeCycle</code> value
+   */
+  public void lifeCycleStarted(LifeCycle arg0) {
+    log.info("Lifecycle: server started");
+    String url = "http://localhost:"; + appServer.getConnectorPort();
+    trayIcon.displayMessage("Started","DHIS2 is running. Point your\nbrowser to " + url,TrayIcon.MessageType.INFO);
+    trayIcon.setToolTip("DHIS 2 Server running");
+    trayIcon.setImage(createImage("/icons/running.png", "Running icon"));
+  }
+
+  /**
+   * Describe <code>lifeCycleStarting</code> method here.
+   *
+   * @param arg0 a <code>LifeCycle</code> value
+   */
+  public void lifeCycleStarting(LifeCycle arg0) {
+    log.info("Lifecycle: server starting");
+    trayIcon.displayMessage("Starting","DHIS 2 is starting.\nPlease be patient.",TrayIcon.MessageType.INFO);
+    trayIcon.setImage(createImage("/icons/starting.gif", "Starting icon"));
+  }
+
+  /**
+   * Describe <code>lifeCycleStopped</code> method here.
+   *
+   * @param arg0 a <code>LifeCycle</code> value
+   */
+  public void lifeCycleStopped(LifeCycle arg0) {
+    log.info("Lifecycle: server stopped");
+    trayIcon.setImage(createImage("/icons/stopped.png", "Running icon"));
+  }
+
+  /**
+   * Describe <code>lifeCycleStopping</code> method here.
+   *
+   * @param arg0 a <code>LifeCycle</code> value
+   */
+  public void lifeCycleStopping(LifeCycle arg0) {
+    log.info("Lifecycle: server stopping");
+  }
+
+  /**
+   * Describe <code>createImage</code> method here.
+   *
+   * @param path a <code>String</code> value
+   * @param description a <code>String</code> value
+   * @return an <code>Image</code> value
+   */
+  protected static Image createImage(String path, String description) {
+    URL imageURL = TrayApp.class.getResource(path);
+
+    if (imageURL == null) {
+      log.warn("Resource not found: " + path);
+      return null;
+    } else {
+      return (new ImageIcon(imageURL, description)).getImage();
+    }
+  }
+
+  /**
+   * @param args the command line arguments
+   */
+  public static void main(String[] args)
+    throws Exception
+  {
+    log.info("Environment variable DHIS2_HOME: "+System.getenv("DHIS2_HOME"));
+    log.info("System property user.dir: "+System.getProperty("user.dir"));
+    if(!SystemTray.isSupported()) {
+      String message = "SystemTray not supported on this platform";
+      JOptionPane.showMessageDialog((JFrame)null, message);
+      System.exit(0);
+    }
+    
+    // ok - we're good to go ...
+    new TrayApp();
+  }
+}

=== added file 'lite-package/src/main/java/org/hisp/dhis/WebAppServer.java'
--- lite-package/src/main/java/org/hisp/dhis/WebAppServer.java	1970-01-01 00:00:00 +0000
+++ lite-package/src/main/java/org/hisp/dhis/WebAppServer.java	2009-04-22 21:34:35 +0000
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2004-2009, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ *
+ * @author Bob Jolliffe
+ * @version $$Id$$
+ */
+
+package org.hisp.dhis;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mortbay.component.LifeCycle;
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.ContextHandlerCollection;
+import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
+
+/**
+ *
+ * @author bobj
+ */
+public class WebAppServer 
+{
+  public static final String DHIS_DIR = "/webapps/dhis";
+  public static final String BIRT_DIR = "/webapps/birt";
+  public static final String BIRT_CONTEXT_PATH = "/birt";
+  
+  private static final Log log = LogFactory.getLog( WebAppServer.class );
+    
+  protected Server server;
+  protected Connector connector;
+
+  public WebAppServer() {
+    server = new Server();
+    connector = new SelectChannelConnector();
+  }
+
+  public void init(String installDir, LifeCycle.Listener serverListener)
+    throws Exception
+  {
+    connector.setPort(Integer.getInteger("jetty.port",8080).intValue());
+    server.setConnectors(new Connector[]{connector});
+
+    WebAppContext dhisWebApp = new WebAppContext();
+    dhisWebApp.setWar(installDir + DHIS_DIR);
+    log.info("Setting DHIS 2 web app context to: "+ installDir + DHIS_DIR);
+    
+    WebAppContext birtWebApp = new WebAppContext();
+    birtWebApp.setContextPath(BIRT_CONTEXT_PATH);
+    birtWebApp.setWar(installDir + BIRT_DIR);
+    log.info("Setting BIRT web app context to: "+ installDir + BIRT_DIR);
+    
+    ContextHandlerCollection handlers = new ContextHandlerCollection();
+    handlers.addHandler(dhisWebApp);
+    handlers.addHandler(birtWebApp);    
+    
+    server.setHandler(handlers);
+    server.addLifeCycleListener(serverListener);
+  }
+
+  public void start()
+    throws Exception
+  {
+    server.start();
+    server.join();
+  }
+
+  public void stop()
+    throws Exception
+  {
+    server.stop();
+  }
+  
+  public int getConnectorPort()
+  {
+    return connector.getPort();
+  }
+}

=== added directory 'lite-package/src/main/resources'
=== added directory 'lite-package/src/main/resources/icons'
=== added file 'lite-package/src/main/resources/icons/failed.png'
Binary files lite-package/src/main/resources/icons/failed.png	1970-01-01 00:00:00 +0000 and lite-package/src/main/resources/icons/failed.png	2009-04-22 21:34:35 +0000 differ
=== added file 'lite-package/src/main/resources/icons/running.png'
Binary files lite-package/src/main/resources/icons/running.png	1970-01-01 00:00:00 +0000 and lite-package/src/main/resources/icons/running.png	2009-04-22 21:34:35 +0000 differ
=== added file 'lite-package/src/main/resources/icons/starting.gif'
Binary files lite-package/src/main/resources/icons/starting.gif	1970-01-01 00:00:00 +0000 and lite-package/src/main/resources/icons/starting.gif	2009-04-22 21:34:35 +0000 differ
=== added file 'lite-package/src/main/resources/icons/stopped.png'
Binary files lite-package/src/main/resources/icons/stopped.png	1970-01-01 00:00:00 +0000 and lite-package/src/main/resources/icons/stopped.png	2009-04-22 21:34:35 +0000 differ
=== added file 'lite-package/src/main/resources/log4j.properties'
--- lite-package/src/main/resources/log4j.properties	1970-01-01 00:00:00 +0000
+++ lite-package/src/main/resources/log4j.properties	2009-04-22 21:34:35 +0000
@@ -0,0 +1,16 @@
+# Log to file setup
+log4j.appender.file = org.apache.log4j.RollingFileAppender
+log4j.appender.file.File = log/dhis.log
+log4j.appender.file.MaxFileSize = 100KB
+log4j.appender.file.MaxBackupIndex = 3
+log4j.appender.file.layout = org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern = * %-5p %d{ABSOLUTE} %m (%F [%t])%n
+
+# Log to console setup
+log4j.appender.console = org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout = org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern = * %-5p %d{ABSOLUTE} %m (%F [%t])%n
+
+# Categories (order: DEBUG, INFO, WARN, ERROR, FATAL)
+log4j.rootCategory = WARN, console
+log4j.category.org.hisp.dhis = INFO,file

=== added directory 'lite-package/src/test'
=== added directory 'lite-package/src/test/java'
=== added directory 'lite-package/src/test/java/org'
=== added directory 'lite-package/src/test/java/org/hisp'
=== added directory 'lite-package/src/test/java/org/hisp/dhis'
=== added directory 'lite-package/util'
=== added file 'lite-package/util/startup.bat'
--- lite-package/util/startup.bat	1970-01-01 00:00:00 +0000
+++ lite-package/util/startup.bat	2009-04-22 21:34:35 +0000
@@ -0,0 +1,12 @@
+@echo off
+
+if not "%JAVA_HOME%" == "" goto startup
+:abort
+echo DHIS 2 requires a Java Runtime Environment to be installed
+pause
+goto end
+:startup
+echo Starting DHIS 2...
+java -jar dhis2-lite.jar
+goto end
+:end

=== added file 'lite-package/util/startup.sh'
--- lite-package/util/startup.sh	1970-01-01 00:00:00 +0000
+++ lite-package/util/startup.sh	2009-04-22 21:34:35 +0000
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "${JAVA_HOME:+1}" = "1" ]
+then
+  echo "Starting DHIS 2..."
+  java -jar dhis2-lite.jar
+else
+  echo "DHIS 2 requires a Java Runtime Environment to be installed"
+fi



--
Trunk
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.