3

I want to use DHIS-2 in my local system (localhost). i follow steps from here. And all files build in my system by following command

mvn install // on dhis-2 Dir and also /dhis-2/dhis-web

But i can't get this command work mvn jetty:run-war every time it give error.

Is there any step by step solution fro my problem? I want to run DHIS-2 in my local system using Eclipse. I am completely lost and want some guidelines.

Blu
  • 4,036
  • 6
  • 38
  • 65
  • Were you able to import the project into eclipse? I am have issue importing it into eclipse [my question](http://stackoverflow.com/questions/29958806/dhis2-eclipse-import-issue-using-bazaar) – user3141985 Apr 30 '15 at 04:06
  • 1
    i got its build file (war file) using cmd commands and then deploy to server. – Blu May 04 '15 at 06:22

2 Answers2

4

First navigate to dhis-2/dhis-web/dhis-web-portal and then run:

mvn jetty:run-war

You might get this exception:

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

If you do, edit your .bashrc or .bash_profile and add:

export _JAVA_OPTIONS="-Xmx7500m -Xms4000m -XX:MaxPermSize=500m -XX:PermSize=300m"
tokland
  • 66,169
  • 13
  • 144
  • 170
Muthoni
  • 41
  • 2
1

All web modules in DHIS 2 can be started as stand-alone web applications. With web modules I mean all Maven projects under dhis-2/dhis-web/. The modules under dhis-2/ are referred to as service modules. First build the service modules with "mvn install" like you have done. Then navigate to any of the web modules, e.g.:

cd dhis-2/dhis-web/dhis-web-reporting

From there you can execute the jetty plugin with:

mvn jetty:run

Notice that you should not use -war flag anymore.

lars
  • 640
  • 4
  • 10