Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 1.92 KB

README.md

File metadata and controls

42 lines (36 loc) · 1.92 KB

Maven repository hosting the Synopsis sketch artifacts.

We follow an approach derived from here to host the artifacts.

How to use this repository in a build

These instructions are for Gradle. Similar properties are applicable to Maven as well.

  • Add a new repo
repositories {
        maven {
            url 'https://github.com/Project-Sustain/synopsis-sketch/raw/mvn-repository'
        }
}
  • Declare the dependency
dependencies {
    api 'sustain.synopsis:sketch:1.0'
}

Publish a new version

To publish a new version please follow the instructions given below.

Pre-requisites

  • Apache Maven 3

Instructions

  • Checkout the branch corresponding to the version from the repository and build the jar git checkout v1.0.1; gradle shadowJar
    Please note that we use shadowJar plugin to create a jar that embeds some if its dependencies.

  • Copy the jar
    cp $PROJECT_HOME/build/libs/sustain-synopsis-sketch-1.0.1-all.jar /tmp/

  • Checkout the mvn-repository branch
    git checkout mvn-repository

  • Take a copy of the pom from one of the existing releases and update the version property. Let's assume that the copy of this pom is available at /tmp/sketch-1.0.pom. It is not necessary to update the version in the file name.

  • Use the Maven install plugin to install the jar and the pom file into the repo
    mvn install:install-file -DgroupId=sustain.synopsis -DartifactId=sketch -Dversion=1.0.1 -Dfile=/tmp/sustain-synopsis-sketch-1.0.1-all.jar -Dpackaging=jar -DlocalRepositoryPath=. -DcreateChecksum=true -DpomFile=/tmp/sketch-1.0.pom
    Make sure to look at the version, file, and pomFile properties.

  • Add the updated and newly added files to Git, commit, and push to the mvn-respository branch.

  • Do not merge this branch with the master