Versions Compared

Key

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

...

  • in build.gradle / shared.gradle:
    1. If not already, add snapshots repository to list of repositories so it looks like this:
    2. repositories {
      jcenter()
      mavenLocal()
      maven { url 'https://mifos.jfrog.io/mifos/libs-snapshot/' }
      }
    3. In list of plugins add plugin:

      id "com.jfrog.artifactory" version "4.9.5"

    4. In publishing → publications → projectnamePublification
      replace
        version project.version 
      with: 
        version project.findProperty('externalVersion') ?: project.version


    5. Underheath publishing block add instructions for the new plugin:
      artifactory {
      contextUrl = System.getenv("ARTIFACTORY_URL")
      publish {
      repository {
      repoKey = project.findProperty('artifactoryRepoKey')
      username = System.getenv("ARTIFACTORY_USER")
      password = System.getenv("ARTIFACTORY_PASSWORD")
      }

      defaults {
      publications (TODO) // add projectnamePublification here
      }
      }
      }
      artifactoryPublish.dependsOn('clean','publishToMavenLocal')


  • Into shared.gradle (if exists) add 

    task artifactoryPublish {
    group 'all'
    dependsOn gradle.includedBuild('api').task(':artifactoryPublish')
    dependsOn gradle.includedBuild('library').task(':artifactoryPublish')
    dependsOn gradle.includedBuild('test').task(':artifactoryPublish')
    // add other modules
    }
  • Add travis banner to top of README.md (replace reponame with correct value):
    [![Build Status](https://api.travis-ci.com/apache/fineract-cn-reponame.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-reponame)
  • Add travis.sh (copy-paste from other project that is already included)
  • Add .travis.yml - travis-ci.com looks for this file

    language: java
    sudo: false
    jdk:
    - openjdk8
    install: true
    script: "./travis.sh"
    env:
    global:
        - BUILD_SNAPSHOTS_BRANCH=travis  
    - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
    - ARTIFACTORY_USER=travis-ci1
    - secure: "see below chapter Encrypt Artifactory password"

...

  • Common Maven repository configuration is used - this means:
    • Snapshots are uploaded to "libs-snaptshots-local" and releases to "libs-release-local"
    • There are two virutal repositories libs-snapshots (includes libs-snapshots-local) and libs-release (includes libs-release-local)
  • Remote repositories are deleted (as we don't want the reposiotry to be a proxy for JCentral)
  • A user "travis-ci" has been configured who has rights to upload artifacts but it has no UI access
    • the password for this user is encrypted with travis public keys (travis creates a public key for each individual reposiotry) and set into .travis.yml
  • Anonymous access has been enabled for anyone to download the artifacts

...