gruelbox / oss-archetype

An archetype for open source projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oss-archetype

Build Status

An opinionated archetype designed to set up a new open source library. Includes:

  • JUnit
  • Mockito
  • Hamcrest
  • Checkstyle
  • Findbugs
  • JaCoCo

Along with all configuration in place and instructions for setting up:

  • Publishing to Maven Central via OSSRH (including sources, Javadoc etc)
  • Build, test and deploy to OSSRH automatically from Travis CI
  • Source code analysis on Sonarcloud

And a README chock-full of lovely badges covering everything from test coverage to build status to Javadocs.

Usage

Create the project

To create your project, clone this repo, then:

mvn install
cd ..
mvn archetype:generate -DarchetypeGroupId=com.gruelbox -DarchetypeArtifactId=oss-archetype -DarchetypeVersion=0.0.2-SNAPSHOT

You can now open the project in your IDE and push it to GitHub.

Connect to Sonar

TODO detail

  • Add to account
  • Create key
  • Encrypt with travis ruby tool
  • Add to POM

Enable Travis build

TODO detail

  • Add to Travis
  • SHould just work

Publish to Maven Central

TODO, referencing https://www.phillip-kruger.com/post/continuous_integration_to_maven_central/

Credit

Large parts of this build heavily on the Travis script and POM in Alfa Systems Morf by Venushka Perera, which uses a toolset I am familiar with and use for all my projects. It in turn leans heavily on the approach in this great post by Phillip Krüger.

About

An archetype for open source projects

License:Apache License 2.0


Languages

Language:Java 100.0%