NB! This is still draft with work in progress!

Fineract-CN projects depend on each other. The simplest option is to build them all locally so artifacts are published to local maven repository and available from there.

Sometomes still there is need to only work with a single project and resolve the other fineract-cn-* dependencies from public repository.
Also in order for continous integration (travis-ci) to build a specific project it is needed that all the dependencies are available.

 JFrog Artifactory has been set up to host these artifacts since Maven Central is not suitable for the task (as it doesn't hold "work-in-progress" snapshots).

In this artifacotry there are two repositories:

In order to use snapshot builds one needs to have following line in repositories list:

repositories {
  jcenter()
  mavenLocal()
  maven { url 'https://mifos.jfrog.io/mifos/libs-snapshot/' }
}


How snapshots are built

All apache/fineract-cn-* repositories are configured to be built with Travis-CI. Whenever something is pushed to a repository travis tries to run gradle build on it. Travis also detects the current branch that the changes were pushed to.

If travis detects that the changes were pushed to "develop" branch and build doesn't fail then it uploads the new snapshot artifacts to the public repository.

Travis also builds all pull requests but for security reasons it doesn't upload any artifacts from pull requests.


If your branch is not named "develop"

Then the build script sets version name of your artifact to "branchname-". So if normally you would refer to lang like this:

dependencies {
compile(
[group: 'org.apache.fineract.cn', name: 'lang', version: '0.1.0-BUILD-SNAPSHOT']
)
)

To refer to the artifact built from branch "myfeature" you would  have to use something like this:

dependencies {
   compile(
      [group: 'org.apache.fineract.cn', name: 'lang', version: 'myfeature-SNAPSHOT']
   )
)


How releases work


Implementation

This is needed if you want to set up a new project or change existing setup.

Configure a new fineract-cn-* project to upload artifacts to artifactory


Encrypt Artifactory password


You need command line travis client.

travis encrypt --com -r apache/fineract-cn-reponame ARTIFACTORY_PASSWORD=enter-password-here

copy the encrypted secure value to .travis.yml

Verify


Design principles

JFrog Artifactory configuration

Common Maven configuration this means: