• Arne Vandamme

  • CTO

As probably all software development companies we develop and maintain a number of proprietary libraries that we share across projects.  Today we migrated a set of our Java libraries to Bitbucket, so they are now available for the general public.  We have open sourced them under an Apache 2.0 license

Our common Java libraries (as we call them) have been used throughout several projects for many years, we obviously consider them production ready.  As they are mainly utility libraries they do not evolve that rapidly, but we will keep maintaining them and add all future code changes on the open source repository.

These libraries were primarily designed for Spring based applications and as such depend on Spring framework 3+.  We try to keep the amount of other dependencies as small as possible.

Documentation and website

Along with the source code that is available on our Bitbucket space, we are migrating everything to our public tool stack:

  • The Javadoc is the most up-to-date documentation right now 
  • Our Confluence space will contain tutorials and release notes
  • Use our public JIRA when you want to report a bug or request a feature

General documentation on the Confluence space is still in making.  For now your best bet is the Javadoc and source code (unit tests), or just dropping us a question.

An overview of the different libraries

Different utilities are packaged in separate libraries:

common-concurrent

Contains a number of concurrency related constructs.  Most important are the ObjectLockRepository and the DistributedLockRepository.  The former provides an easy way to link a lock to a domain object, the latter is a simple JDBC based implementation for creating distributed locks.

common-spring

A diverse set of small utilities:

common-test

Contains the MockedLoader implementation, an extension for Spring and Mockito unit testing that automatically generates mocks for all undefined bean dependencies.

common-web

Most notable are the ExceptionToMailResolver that automatically send mails with exception information, and the RequestLogInterceptor that tags every web request with a unique id for logging purposes

Maven dependency

The latest release of our libraries has been pushed to maven central and can be imported using:

<dependency>
	<groupId>com.foreach.libs</groupId>
	<artifactId>library-name</artifactId>
	<version>0.12</version>
</dependency>

By releasing our libraries to the general public we hope other projects can get some good use from them.  We will gladly help you out if you run into problems or need some advice, so feel free to leave your questions in the comments.  In the upcoming months we will also be publishing some tutorials on the features we use the most.

Verwante Artikels