https://github.com/kokuwaio/maven-parent
https://github.com/kokuwaio/maven-parent
maven parent
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/kokuwaio/maven-parent
- Owner: kokuwaio
- License: apache-2.0
- Created: 2020-05-16T09:35:34.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:51:06.000Z (over 1 year ago)
- Last Synced: 2024-10-29T11:52:52.021Z (over 1 year ago)
- Topics: maven, parent
- Homepage: https://maven.kokuwa.io/maven-parent
- Size: 347 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Maven Parent
[](https://github.com/kokuwaio/maven-parent/blob/main/LICENSE)
[](https://central.sonatype.com/namespace/io.kokuwa.maven)
[](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)