https://github.com/spotify/foss-root
Maven POM that serves as a parent for Spotify FOSS projects
https://github.com/spotify/foss-root
java maven-pom
Last synced: 6 months ago
JSON representation
Maven POM that serves as a parent for Spotify FOSS projects
- Host: GitHub
- URL: https://github.com/spotify/foss-root
- Owner: spotify
- Created: 2016-09-28T14:09:00.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T10:58:08.000Z (over 1 year ago)
- Last Synced: 2025-04-05T17:13:40.560Z (6 months ago)
- Topics: java, maven-pom
- Homepage:
- Size: 66.4 KB
- Stars: 1
- Watchers: 9
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# foss-root

[](https://maven-badges.herokuapp.com/maven-central/com.spotify/foss-root)
A root pom for configuring common release related plugins for open source maven projects.
## Usage
There's still some boilerplate that has to go into your project `pom.xml`. Use the template below.
```xml
com.spotify
foss-root
LATEST-VERSION
YOUR_ARTIFACT_NAME
VERSION-SNAPSHOT
The Apache Software License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0.txt
repo
...
https://github.com/spotify/YOUR_REPO
scm:git:git@github.com:spotify/YOUR_REPO.git
scm:git:git@github.com:spotify/YOUR_REPO.git
HEAD
maven-checkstyle-plugin
maven-enforcer-plugin
maven-failsafe-plugin
```
By default your project will target Java 8. If you don't need Java 8 compatibility and you would like to target a later version of Java, set the
`java.version` property in your project, like so:```xml
11
```
After setting this up, you'll be able to
#### add license headers to all sources
```
mvn license:update-file-header
```#### deploy snapshots
```
mvn deploy
```#### deploy releases
```
mvn release:prepare
mvn release:perform
```#### Fail if no tests
By default, from version 16+ any project using `foss-root` will fail if there are not unit-tests.
You can override this behaviour by setting the property `unitTests.failIfNoTests` equal to `false`.
An equivalent `integrationTests.failIfNoTests` exists, but its default is set to `false`.