Using this slack library is easy.

Usage

Just add the following to your dependencies

<dependency>
    <groupid>io.github.slackapi4j</groupid>
    <artifactid>slackapi4j</artifactid>
    <version>0.0.2</version>
</dependency>

The artifact is hosted on maven central. Once you have included it its as simple as providing a configuration token and calling the api

public YourClass{
  String token = "some-slack-token";

  public YourClass(String token){
    this.token =token
  };

  public static main(String... args){
     SlackApi api = new SlackApi(token);
     api.sendMessage(Message message);
  }
}

Messages can be constructed with the builder

Message message =  Message.builder()
    .options()
    .build();

See the example-bot for more information.