This project kickstarts your work in a new JVM/Maven project. It should get you building as quickly as possible - with best practices and services baked in. It's designed for the Block Open Source Program, and may be adapted for other contexts.
- Multimodule Maven project structure with 2 built-in modules:
api
andimpl
. - Hermit managed environment (Java, Maven)
- GitHub Actions for Continuous Integration:
- Testing in both MacOS and Ubuntu environments
- Every commit to
main
published asSNAPSHOT
in Block Artifactory - Static Analysis (CodeQL)
- License scanning (FOSSA)
- Security Vulnerability detection for dependencies (FOSSA)
- Automatic dependency upgrades (Renovate)
- Release and Publishing to Maven Central
To build a project using this template as a base:
- Select
block/example-jvm-maven
as theRepository template
.
There are a few steps you'll need to take from this quickstart template to get your project ready for action.
This example has groupID
of xyz.block
and artifactId
s
of example-jvm-maven-*
. You'll need to update all pom.xml
files:
./pom.xml
./api/pom.xml
./impl/pom.xml
...to reflect your desired artifactId
s. Note that changing the groupId
may
render your project unable to publish into Maven Central; the account we use
to publish is cleared for the xyz.block
namespace.
Block employees may assistance by
opening an internal issue with the
Open Source Program Office if they need to use
a different groupId
.
The workflows on this project rely on GitHub Actions secrets, environment variables, to run the build. The Open Source Program Office team will, for security purposes, make these secrets available to your project. The variables in question are:
SONATYPE_USERNAME
- A token tied to the Block OSS Sonatype accountSONATYPE_PASSWORD
- Password for the aboveGPG_SECRET_KEY
- Key used for signing releasesGPG_SECRET_PASSPHRASE
- Passphrase for above
Your repo will also need access to the Artifactory repo for snapshot releases.
Block employees may request access to these by opening an internal issue with the Open Source Program Office.
Go get 'em. 🤘🏻🤘🏼🤘🏽🤘🏾🤘🏿
Instructions are in CONTRIBUTING.md
.
This is the part you adapt for your project's audience.
This stub is meant to help you form a strong community around your work. It's yours to adapt, and may diverge from this initial structure. Just keep the files seeded in this repo, and the rest is yours to evolve!
Orient users to the project here. This is a good place to start with an assumption that the user knows very little - so start with the Big Picture and show how this project fits into it.
Then maybe a dive into what this project does.
Diagrams and other visuals are helpful here. Perhaps code snippets showing usage.
Project leads should complete, alongside this README
:
- CODEOWNERS - set project lead(s)
- CONTRIBUTING.md - Fill out how to: install prereqs, build, test, run, access CI, chat, discuss, file issues
- Bug-report.md - Fill out
Assignees
add codeowners @names - config.yml - remove "(/add your discord channel..)" and replace the url with your Discord channel if applicable
The other files in this template repo may be used as-is:
Resource | Description |
---|---|
CODEOWNERS | Outlines the project lead(s) |
CODE_OF_CONDUCT.md | Expected behavior for project contributors, promoting a welcoming environment |
CONTRIBUTING.md | Developer guide to build, test, run, access CI, chat, discuss, file issues |
GOVERNANCE.md | Project governance |
LICENSE | Apache License, Version 2.0 |