Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Import project into IntelliJ IDEA

  1. Open command prompt / terminal.
  2. Go to folder mifosng-provider.
  3. Fire the command ./gradlew -Penv=dev idea
  4. Once the command is done, IDEA project files will be created in the same folder.
  5. From Explorer/Finder open the file mifosng-provider.ipr
Info

Ensure your project's JVM SDK is 1.7. Note: To enable incremental compile like in Eclipse (File -> Settings -> Compiler(on the left pane) -> Select the "Make Project Automatically option")

Panel

On this page:

Table of Contents

Requirements

  • Install Java >= 1.8. Oracle JVMs have been tested.
  • Install MySQL 5.5. The default user is "root" and Password is "mysql".
  • Install npm and ruby.
  • Install bower and grunt using npm install -g bower and npm install -g grunt-cli

Clone Repositories

  1. Clone the Fineract 1.x repository https://github.com/apache/fineract
  2. Clone the Community-app https://github.com/openMF/community-app
Info

You can decide to fork the repositories before you clone.


Build and Run Fineract

To build Fineract, cd into fineract/fineract-provider folder and run the following command.

  1. ./gradlew createDB -PdbName=fineract_tenants
  2. ./gradlew createDB -PdbName=fineract_default

Image Added

You should have a Build Success, then use ./gradlew tomcatRunWAR to run fineract and ensure that you see Started Tomcat Server.

The Server is running at http://localhost:8080/fineract-provider

Image Added

Image Added

Build and Run Community-app

To build community-app, cd to the project root folder (community-app) and run the following command to pull the runtime and build-time dependencies.

  1. bower install
  2. npm install
  3. gem install bundler
  4. bundle install

Then finally use grunt serve to run the project.

Image Added

Login to the App

Image Added

  • Use "mifos" as Username and "password" as Password to login.
  • If you get an error while trying to login, open a new tab and type this chrome://flags/#allow-insecure-localhost and make sure the flag is Enabled.

Image Added

Importing Fineract 1.x in IntelliJ

  1. Launch IntelliJ IDEA, and click on import project.
  2. Navigate to fineract-provider folder and hit OK.
  3. Import project as Gradle and hit Finish.

Image Added

Image Added

Image Added

OPTIONAL: Apply Project preferences to IDEA

Go to File -> Settings -> Plugins(on the left pane) -> Install JetBrains Plugin -> Eclipse Code Formatter. See full documentation ->https://github.com/krasa/EclipseCodeFormatter#instructions

If the above plugin is not listed, it can be downloaded manually from https://plugins.jetbrains.com/plugin/6546 and installed from disk.

Go to File -> Settings -> Eclipse Code Formatter -> Select the "Use Eclipse Code Formatter" option and import the "Eclipse Java Formatter Config File" from MifosX Eclipse Preferences (Use ctrl + alt + l to format your code)

Run/Debug Mifos X

Run/Debug as Java application ServerWithMariaDB4jApplication to launch Mifos X with an embedded database (Separate installation of MySQL is not required) OR if you have installed MySQL in the previous step, run/debug ServerApplication as a Java application.

gradle.properties

The easiest way to run your IDE in developement mode is to add a gradle.properties right at the root mifosng-provider folder. The content should be:

Code Block
languagegroovy
releaseVersion=SNAPSHOT

Run Configuration

Create a new Run/Debug Configuration:

Image Added

Remove 'Make' form 'Before Launch' by selecting the value and push '-'

Add a new 'Before Launch' entry '+' and select 'Gradle task'.

Image Added

'-Penv=dev' is doing the trick by setting a Gradle project property that will include all needed classes and libraries to run in a development environment. ( Flag not used anymore)

Idea Shortcuts

https://www.catalysts.cc/en/wissenswertes/intellij-idea-and-eclipse-shortcuts/

http://www.jetbrains.com/idea/webhelp/keyboard-shortcuts-you-cannot-miss.html