-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Create a directory in which you want the cloned project to exist within: e.g. in directory c:/dev/githubrepos/
git clone [fork repository url]
For example:
[email protected]:USERNAME/mifosx.git
You should have a directory structure like the following:
mifosx:
- mifosng-db
- mifosng-provider
When a repository is cloned, it has a default remote called origin that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you need to add another remote named upstream:
git remote add upstream [email protected]:keithwoodlock/mifosx.git
git fetch upstream
Read more about this at http://help.github.com/fork-a-repo/
Download gradle from www.gradle.org, be sure to following instructions for installation at http://gradle.org/docs/current/userguide/installation.html
Test gradle installation:
gradle -version
This should output some information about version of gradle you are using. It must be the 1.0 release version at a minimum.
Important environment variables of interest:
GRADLE_HOME e.g. C:\dev\gradle-1.0
JAVA_HOME e.g. C:\dev\java\jdk6_u30
JAVA_OPTS e.g. -Xms512m -Xmx512m -XX:MaxPermSize=512m
Note: Do not put any remote debugging JVM parameters into JAVA_OPTS, Setting up remote debugging for both provider and individual lending app through gradle and eclipse will be documented later.
- Move into the mifosng-provider directory.
Execute the following:
gradle clean cleanEclipse eclipse
when this finishes do
gradle clean war
Note: gradle tasks
shows all tasks that can be executed in each directory.
Create a new directory for your eclipse workspace. e.g. c:/dev/eclipse-workspaces/mifosx-github
Start up Eclipse (assuming its already installed)
Use the workspace directory you just created.
When opened, in the package explorer of the java perspective, right-click->import->General->Existing projects into workspace. In the dialog that opens, specify the root directory option by browsing to and selecting the mifosx directory that was cloned e.g. c:/dev/githubrepos/mifosx
This show pick up on the mifosng-provider project you just 'eclipsified' in last step. Click Finish to import into workspace.
You may see eclipse warning to do with 'Serializable'. Goto Window->Preferences->Java->Compiler->Errors/Warnings
In the Potential programming problems section choose 'ignore' for 'Serializable class without serialVersionUID:' option.
Assuming you already have a version of MySql installed. To get started quickly you can just setup the latest demo database.
Mifos X has support for hosting multiple tenants.
Create schema/database named mifosplatform-tenants
Then apply file; mifosng-db/multi-tenant-demo-backups/0001-mifos-platform-shared-tenants.sql
mysql -u[user] -p[password] mifosplatform-tenants < mifosng-db/multi-tenant-demo-backups/0001-mifos-platform-shared-tenants.sql
Create schema/database named mifostenant-default.
create database mifostenant-default
Then apply file; mifosng-db/multi-tenant-demo-backups/mifostenant-default.backup.sql to this database;
mysql -u[user] -p[password] mifostenant-default < mifosng-db/multi-tenant-demo-backups/mifostenant-default.backup.sql
Note: When launching the platform from the command line for developement, the user/password used for the database is root/mysql. If your root user password for mysql is different, you should change the password in the file mifosng-provider/src/test/resources/META-INF/context.xml
Open up two terminals or command prompts.
On the first, move into the mifosng-provider directory and execute gradle clean tomcatRunWar
On the second, move into the mifosng-individual-lending-app directory and execute gradle clean tomcatRunWar
If all has gone well, the platform should be available at: https://localhost:8443/mifosng-provider/api/v1/offices
For client applications built on top of the platform see the mifosx-community-apps repository.
You should be able to log into platform with Username: mifos and Password: password.
If you get the java.net.BindException: Address already in use :8080 exception whilst running the gradle command inside the mifosng-individual-lending-app directory, you may need to kill the process which is already using 8080 (netstat -aon | grep 8080
).