An open API service indexing awesome lists of open source software.

https://github.com/kokuwaio/maven-parent


https://github.com/kokuwaio/maven-parent

maven parent

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# Maven Parent

[![License](https://img.shields.io/github/license/kokuwaio/maven-parent.svg?label=License)](https://github.com/kokuwaio/maven-parent/blob/main/LICENSE)
[![Maven Central](https://img.shields.io/maven-central/v/io.kokuwa.maven/maven-parent.svg?label=Maven%20Central)](https://central.sonatype.com/namespace/io.kokuwa.maven)
[![Build](https://img.shields.io/github/actions/workflow/status/kokuwaio/maven-parent/build.yaml?label=Build)](https://github.com/kokuwaio/maven-parent/actions/workflows/build.yaml)

## Goal

Provide a `pom.xml` with [intelligent defaults](https://en.wikipedia.org/wiki/Convention_over_configuration) for projects of Kokuwa.io project.
The default maven configuration is still based on [Java 5](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source) and platform dependent builds.

## KeyFacts

* java 11 (lts version)
* [junit jupiter](http://junit.org/junit5/docs/current/user-guide/) (junit 4 is [still supported](http://junit.org/junit5/docs/current/user-guide/#running-tests-junit-platform-runner) for legacy projects)
* Sonatype distribution repositories enabled
* fixed versions for common plugins (org.apache.maven.plugins & org.codehaus.mojo)
* default configurations, e.g. java 11, junit 5 provider
* configured maven reports and site

## Usage

Just add the following code to your `pom.xml` and insert the version:

```xml

io.kokuwa
maven-parent
${version}

```

For deployment and release build add the following lines to your `pom.xml` and replace the variables with your values:

```xml
https://github.com/kokuwaio/{repository}

https://github.com/kokuwaio/{repository}
scm:git:https://github.com/kokuwaio/{repository}.git
scm:git:https://github.com/kokuwaio/{repository}.git
HEAD

```

## Profiles

**check** (enabled by default):

* use [tidy-maven-plugin](http://www.mojohaus.org/tidy-maven-plugin/) to check pom structure
* enforce correct java version (accepts all versions equal or above property **maven.compiler.source**)
* enforce checkstyle rules

**site**: (enabled if env.CI is present)

* test instrumentation with jacoco for recording test coverage
* configures site deployment to [github.com/kokuwaio/maven-sites](https://github.com/kokuwaio/maven-sites)

**deploy**: (enabled if env.CI is present)

* add source jar
* add javadoc jar
* use [flatten-maven-plugin](http://www.mojohaus.org/tidy-maven-plugin/) to simplify pom

**deploy** with **release** (match Sonatype [requirements](https://central.sonatype.org/pages/requirements.html)):

* add source jar
* add javadoc jar
* use [flatten-maven-plugin](http://www.mojohaus.org/tidy-maven-plugin/) to simplify pom
* sign packages with gpg
* deploy to [oss.sonatype.org](https://oss.sonatype.org)