Skip to content

microsphere-projects/microsphere-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsphere Build

Maven Build Maven License Average time to resolve an issue Percentage of issues still open

1. Introduction

Microsphere Build is a Java Maven parent POM with common build settings, plugins configuration, etc, which is used for Microsphere Projects, like Microsphere Java, Microsphere Spring, etc.

2. Features

Microsphere Build supports the following features:

  • Language Support
  • Plugins Management
  • Profiles Management
  • Project Settings

2.1 Language Support

Microsphere Build supports the Maven project building on Java 8+ TLS and Java 17+ TLS.

2.2 Plugins Management

2.2.1 Default Inherited Plugins

2.2.2 Profile-Specific Plugins

2.2.2.1 Maven Profile release Plugins
2.2.2.2 Maven Profile ci Plugins
2.2.2.3 Maven Profile test Plugins
2.2.2.4 Maven Profile coverage Plugins
2.2.2.5 Maven Profile docs Plugins

2.3 Profiles Management

  • release
  • ci
  • test
  • coverage
  • docs
  • java8+ (activated by jdk version)
  • java9+ (activated by jdk version)
  • java11 (activated by jdk version)
  • java9-15 (activated by jdk version)
  • java16+ (activated by jdk version)

2.4 Project Settings

2.4.1 Defaults Settings

2.4.1.1 Resources Settings
<resources>
    <resource>
        <directory>src/main/java</directory>
        <filtering>true</filtering>
        <includes>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
        </includes>
    </resource>
    <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
            <include>**/*</include>
        </includes>
    </resource>
</resources>

2.4.2 Profiles Settings

2.4.2.1 Maven Profile java8+ Settings

Maven JavaDoc Plugin will be added the options -Xdoclint:none.

2.4.2.2 Maven Profile java9+ Settings

Maven Compiler Plugin's property maven.compiler.release references on the another property ${java.version}.

2.4.2.3 Maven Profile java11 Settings

Maven JavaDoc Plugin will use the configuration source based on the property ${maven.compiler.source}.

2.4.2.4 Maven Profile java9-15 Settings

Maven Surefire Plugin will append the argument line --illegal-access=permit for accessing to internal classes

2.4.2.5 Maven Profile java16+ Settings

Maven Surefire Plugin will append the argument line --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED for accessing to JDK modules' classes.

3. Usage

3.1 Java 8+ Maven Project

The root project's pom.xml should set the parent as follows:

    <parent>
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-build</artifactId>
        <version>0.1.0</version>
    </parent>

3.2 Java 17+ Maven Project

The root project's pom.xml should set the parent as follows:

    <parent>
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-build</artifactId>
        <version>0.1.1</version>
    </parent>