Giter Club home page Giter Club logo

banno-sbt-plugin's Introduction

DISCLAIMER This is now open source under Apache License 2 (see LICENSE.txt for it). This still contains a few things that are specific to Banno, but it's not that bad.

banno-sbt-plugin

This is Banno's sbt plugin which provides a structured method of which all Banno sbt projects should abide by. It also includes many commonly used dependencies.

Installation

For sbt versions 0.13.x, please use the latest banno-sbt-plugin 1.3.x version.

In project/plugins.sbt, add

resolvers ++= Seq("Banno Snapshots Repo" at "http://nexus.banno.com/nexus/content/repositories/snapshots",
                  "Banno Releases Repo" at "http://nexus.banno.com/nexus/content/repositories/releases",
                  "Banno External Repo" at "http://nexus.banno.com/nexus/content/groups/external/")

addSbtPlugin("com.banno" % "banno-sbt-plugin" % "1.3.5")

and in the build.sbt, add

import com.banno._

name := "project-name"

BannoSettings.settings

It is also a good idea to configure which version of sbt you wish to use by designating in the project/build.properties: sbt.version=0.13.1

Things the banno-sbt-plugin can do

Publishing information

It handles the repositories for snapshots and releases. It also will publish to our maven repository using https://github.com/arktekk/sbt-aether-deploy

Common dependencies and exclusions

The banno-sbt-plugin will by default add some common dependencies: They are:

  • joda-time
  • slf4j-api
  • log4j-over-slf4j
  • jcl-over-slf4j
  • logback-core
  • logback-classic

It also will add many entries to the ivyXML setting that either interfere with the above or have been troublesome in the past.

Commonly used dependencies

banno-sbt-plugin has settings for many commonly used dependencies. They are

Most of them commonly follow overriding version with: Akka.version := "2.3.0" (change for dependency setting you're using)

Nice Banno dependencies

addBannoDependency will add a Banno library as a dependency for you very easily. It will also handle versioning from a SNAPSHOT to a released version while releasing. There is also addBannoDependencies for adding multiple of them.

Releases

banno-sbt-plugin mixes in the sbt-release plugin to do a standard release process:

  1. set the project version from SNAPSHOT to the next semver version
  2. update banno dependencies to released versions
  3. run tests
  4. package/publish
  5. tag
  6. set back to snapshot version
  7. push the changes.

Symlink-ing outside projects

It is easy to work accross libs/projects by symlinking in the external project underneath the working project with the same name as the banno dependency.

For example:

If I have addBannoDependency("banno-utils") in my working project and I want to work on banno-utils at the same time. If I have object Build extends com.banno.BannoBuild("api") or likewise in my project/Build.scala, I can symlink the banno-utils under my project with the name banno-utils. A reload and clean will ensure that it creates it as a submodule project.

Misc

There a few other things that the banno-sbt-plugin does do.

  • Fat jar deployments via Deployable.settings
  • standard compile options
  • sane memory defaults for run
  • prettier prompt
  • sbt-revolver support
  • ci task for test and publish
  • clear-local-banno-artifacts will clear any locally published and cached banno dependencies.

banno-sbt-plugin's People

Contributors

adamdecaf avatar guesswho311 avatar jwinder avatar lamdor avatar zcox avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.