core

A collection of helper tools in the form of Java libraries optionally controlled through command line arguments.

License

License

GroupId

GroupId

com.github.secondbase
ArtifactId

ArtifactId

core
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

core
A collection of helper tools in the form of Java libraries optionally controlled through command line arguments.
Source Code Management

Source Code Management

http://github.com/secondbase/secondbase/tree/master/core

Download core

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.secondbase/core/ -->
<dependency>
    <groupId>com.github.secondbase</groupId>
    <artifactId>core</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.secondbase/core/
implementation 'com.github.secondbase:core:0.1.2'
// https://jarcasting.com/artifacts/com.github.secondbase/core/
implementation ("com.github.secondbase:core:0.1.2")
'com.github.secondbase:core:jar:0.1.2'
<dependency org="com.github.secondbase" name="core" rev="0.1.2">
  <artifact name="core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.secondbase', module='core', version='0.1.2')
)
libraryDependencies += "com.github.secondbase" % "core" % "0.1.2"
[com.github.secondbase/core "0.1.2"]

Dependencies

compile (3)

Group / Artifact Type Version
com.github.secondbase : flags jar 0.1.2
org.slf4j : slf4j-api jar 1.7.25
org.slf4j : jul-to-slf4j jar 1.7.25

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 2.8.47

Project Modules

There are no modules declared in this project.

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

  • consul classes for registering services in Consul
  • flags for command line argument parsing and secret fetching
    • secrets/s3-secrets dynamically fetch flags from S3
    • secrets/vault-secrets dynamically fetch flags from Vault
  • jsonlogging to wrap setting up json logging to stdout
  • webconsole to start a standalone webserver
    • prometheus-webconsole host a Prometheus metrics endpoint in webconsole

Examples

Versions

Version
0.1.2
0.1.1
0.1.0