Versions Compared

Key

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

...

  1. clone the mifos head repository, as per Mifos Version Control Guide
  2. On the very first use of the new workspace (only), you'll need to do an mvn install in the (new) mifos-reporting-libs Maven module, either via mvn CLI in the reporting-libs directory or in mifos-report-libs project in Eclipse launch the mvn install launch configuration, to get the BIRT JARs which are not available on Maven central into your local Maven repo.
  3. If you have any existing projects, switch to an entirely new, clean workspace using File -> Switch Workspace.
  4. in your Eclipse IDE, menu File > Import > Existing Projects into Workspace → Import... → Maven, Existing Maven Projects
    1. Select root directory, Browse to where your git tree is
    2. Select All projects - there should be (at the time of writing this) about 16 of them (correctly set-up Eclipse .project & .classpath for all of them are in Git)
    3. do NOT check Copy projects into workspace (it's off/unchecked by default already)
  5. optional: In order to separate this set of projects from other projects in the workspace, it is best to use Eclipse working sets. Do this if you didn't Switch to a brand-new Workspace (above).
    1. in the Eclipse Package Explorer view, click that little downwards face (options) arrow icon
      1. change the Top Level Elements from Projects to Working Sets
      2. use Configure Working Sets to add a New... one named e.g. "Mifos", and Add → the mifos-* projects to its Working set content
    2. or, drag & drop the 16 or so mifos-* projects into/under the Working Set (unless during the creating of the working set already)
    3. or, it's possible to already do this directly during the Import > Existing Projects into Workspace wizard
  6. optional: connect eGit by marking all projects, right-clicking, Team > Share Project, Git, highlight/mark/check all the projects lines (they'll all have "Repository" column to '../.git', that's correct), Finish.
  7. if there is anything in red, do an F5 refresh of all the mifos-* projects
  8. if there are any "this or that JAR not found" issues in red, try right-click Maven > Update Dependencies (must have M2Eclipse installed)
    1. NEVER use right-click Maven > Update Project Configuration (revert and go back to the one in Git if you do so by mistake) - this would break the workspace, see Workspace 2.0 Eclipse Maven Settings
  9. make sure there are no red build errors on all mifos-* projects anymore
  10. start-up the Mifos web application via the e.g. Mifos START 8080.launch Eclipse launch configuration in the mifos-server project by right-clicking Debug As... (Starting directly as debug makes hot code replacement work)
  11. Mifos web application is now available at e.g. http://localhost:8080/mifos/ (make sure you don't by mistake use or copy/paste http://0.0.0.0:8080/mifos, as printed in the start-up logs INFO org.eclipse.jetty.util.log WebApp@25468780 at http://0.0.0.0:8080/mifos and INFO org.eclipse.jetty.util.log Started SocketConnector@0.0.0.0:8080)

...

Developers: set i18.messages.cacheSeconds=1 in your Local Properties File for instant reloading of i18n messages! See MIFOS-4557   4557    for details.

Coding Standards for Java Source Code Formatting

...

Note

This chapter documents how the Mifos Workspace 2.0 has been set-up. It is "background documentation" - you don't need to apply (or in-depth understand) what is described in this section to USE the new workspace.

MIFOS-4099   4099    sub-tasks has some information which may be of "historical interest" re. how it all came about.

...

Version 7 of Jetty is used instead of a Jetty v8. Jetty v7 turns out to actually support (what we need of) Servlet 3.0 already, is stable, and ready as container for deployments. Jetty v8 (the next version of Jetty, which will officially support the Servlet 3.0 API) isn’t yet available as GA at the time of writing this. It should be simple to switch the workspace embedded Jetty to v8 later.

Due to MIFOS-4768  4768   , min. Jetty v7.3.0 must be used to deploy a mifos.war; previous versions (7.2.0 and 7.2.2) cause soe ClassCircularityError in BIRT.

...

BTW, did you know that Mifos has been using OSGi for quite a while already? (wink) BIRT actually internally uses OSGi, and via some classloader tricks in a WAR starts up an embedded OSGi container. That's what all the stuff in mifos-reporting/src/main/resources/META-INF/resources/WEB-INF/platform is for; the many *.jar under mifos-reporting/src/main/resources/META-INF/resources/WEB-INF/platform/plugins are not on the Maven-based classpath - BIRT finds and sets-up all that via the servlet context when it starts up.

MIFOS-4429       4429        has blurb that may be of interest if you want the full background.

...