Secondbase

CircleCI License

A collection of helper tools in the form of Java libraries optionally controlled through command line arguments. The main aim of this project is to provide lightweight integration behind a common flags implementation.

Install

SecondBase is deployed through Maven in The Central Repository.

Maven ‘all’

The all artifact has all the dependencies built into it and provides a convenience class for instantiating everything.

<dependency>
    <groupId>com.github.secondbase</groupId>
    <artifactId>all</artifactId>
</dependency>
import com.github.secondbase.core.SecondBase;
import com.github.secondbase.core.SecondBaseException;

public final class MyService {
    private MyService() {}
    public static void main(final String[] args) throws SecondBaseException {
        new SecondBase(args, new Flags().loadOpts(MyService.class));
    }
}

Maven ‘core’

The core artifact allows for choosing which modules you want. Any of which can be omitted if you do not need the features it provides. This will also lessen the dependency tree and need of dependency management.

<dependency>
    <groupId>com.github.secondbase</groupId>
    <artifactId>core</artifactId>
</dependency>
import com.github.secondbase.all.SecondBase;
import com.github.secondbase.core.SecondBaseException;

public final class MyService {
    private MyService() {}
    public static void main(final String[] args) throws SecondBaseException, IOException {
        final SecondBaseModule[] modules = {};
        new SecondBase(args, modules, new Flags().loadOpts(MyService.class));
    }
}

This Java application shows an example http service running SecondBase configured manually with all modules activated. The pom.xml file shows all the dependencies needed.

Below is the list of modules which can be used.

Modules

Examples