Versions Compared

Key

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

...

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 artifacts other fineract-cn-* dependencies from public repository.
Also in order for travis-ci to build some specific project it needs all the dependencies to be available. For this a JFrog

 JFrog Artifactory has been set up to host these artifactsartifacts 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:

  • libs-release - project releases (currently empty)
  • libs-snapshot - snapshot builds. These are updated every time something new is gets pushed to git.

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

...

copy the encrypted secure value to .travis.yml

Verify

  • If you push to "develop" branch the code is uploaded to https://mifos.jfrog.io/mifos/libs-snapshot-local/org/apache/fineract/cn/<projectname>/0.1.0-BUILD-SNAPSHOT/<projectname>-0.1.0-BUILD-SNAPSHOT.jar
  • If you push to any other branch then the code is uploaded to 
  • If you create a realease in Github (out of any branch) travis builds the code and uploads to https://mifos.jfrog.io/mifos/libs-release-local/org/apache/fineract/cn/<projectname>/1.2.0.0/<projectname>-1.2.0.0.jar


Design principles

  • travis.sh file should not hold any project-specific configuration (should be the same in every repo)

JFrog Artifactory configuration

Common Maven configuration this means:

  • Snapshots are uploaded to "libs-snaptshots-local" and releases to "libs-release-local"
  • There are two virutal repositories libs-snapshots that includes libs-snapshots-loca and libs-release that includes libs-release-local
  • Remote repositories are deleted (as we don't want to be a proxy for Maven Central)
  • A user travis-ci has been configured who has rights to upload artifacts
  • Anonymous access has been enabled