Provide a pom.xml
with intelligent defaults for projects of Kokuwa.io project.
The default maven configuration is still based on Java 5 and platform dependent builds.
- java 11 (lts version)
- junit jupiter (junit 4 is still supported 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
Just add the following code to your pom.xml
and insert the version:
<parent>
<groupId>io.kokuwa</groupId>
<artifactId>maven-parent</artifactId>
<version>${version}</version>
<relativePath />
</parent>
For deployment and release build add the following lines to your pom.xml
and replace the variables with your values:
<url>https://github.com/kokuwaio/{repository}</url>
<scm>
<url>https://github.com/kokuwaio/{repository}</url>
<connection>scm:git:https://github.com/kokuwaio/{repository}.git</connection>
<developerConnection>scm:git:https://github.com/kokuwaio/{repository}.git</developerConnection>
<tag>HEAD</tag>
</scm>
check (enabled by default):
- use 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
deploy: (enabled if env.CI is present)
- add source jar
- add javadoc jar
- use flatten-maven-plugin to simplify pom
deploy with release (match Sonatype requirements):
- add source jar
- add javadoc jar
- use flatten-maven-plugin to simplify pom
- sign packages with gpg
- deploy to oss.sonatype.org