repository

How to use a Maven repository library with SBT

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.17, “Using a Maven Repository Library with SBT.”

Problem

When working on a Scala project built with SBT, you want to use a Java library that’s in a Maven repository, but the library doesn’t include information about how to use it with Scala and SBT.

How to “publish” a Scala/SBT library

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.15, “Publishing an SBT Library.”

Problem

You’ve created a Scala project or library with SBT that you want to share with other users, creating all the files you need for an Ivy repository.

How to configure SBT to find a repository (working with resolvers)

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.11, “Telling SBT How to Find a Repository (Working with Resolvers).”

Problem

In a Scala SBT project, you want to add a managed dependency to your project from an Ivy repository that SBT doesn’t know about by default.

How to manage project dependencies with SBT (Simple Build Tool)

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.4, “How to manage dependencies with SBT (Simple Build Tool).”

Problem

You want to use one or more external libraries in your Scala/SBT projects.

Solution

You can use both managed and unmanaged dependencies in your SBT projects.

Tell Git not to track a file any more (remove from repo)

Git rm FAQ: How do I tell Git not to track a file (or files) any more? That is, I want to remove the file from the Git repo?

While working on an application named "sarah" yesterday (named for the house known as "SARAH" in the tv series Eureka), I accidentally checked some files into Git that I didn't mean to. These were were primarily binary files in my project's "bin" and "target" directories.

Git: How do I add an empty directory to a Git project/repository?

Git empty directories FAQ: How do I add an empty directory to a Git repository?

Short answer - you can't. (See below for the workaround.) The design of the Git staging area only accounts for files, as described in the Git FAQ, and other books like Pro Git.

Git empty directories FAQ

Here's the text from the Git FAQ section, "Can I add empty directories to a Git repository":

Private Git repository hosting services

Private Git hosting services FAQ: What companies offer Git hosting, in particular private Git hosting services?

I recently started looking for a private Git hosting service, and the obvious first place to look is GitHub. They provide free Git hosting for open source projects, and their service has been excellent. But when I looked at their private Git hosting service, I was really surprised by the cost of their plans. Their lowest price private Git hosting plan is $7/month, and that allows only five Git projects, and relatively little disk space. Since I want a private Git hosting service to store all my projects, I'd immediately need to go to one of their paid Git hosting plans, and their Git hosting prices go up quickly from there.

Update: Github has changed their policies significantly since I first wrote this article.