https://github.com/meterware/multirelease-parent
A Parent POM to simplify unit testing and building multi-release jars
https://github.com/meterware/multirelease-parent
Last synced: 6 months ago
JSON representation
A Parent POM to simplify unit testing and building multi-release jars
- Host: GitHub
- URL: https://github.com/meterware/multirelease-parent
- Owner: meterware
- License: apache-2.0
- Created: 2018-04-03T14:25:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T13:01:13.000Z (over 3 years ago)
- Last Synced: 2025-07-04T22:50:22.968Z (about 1 year ago)
- Size: 18.6 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This POM simplifies the creation of multi-release jars.
## Setup
Make this your parent POM:
```
com.meterware
multirelease-parent
1.2.0
```
You must have a `toolchains.xml` defined in your maven configuration directory (`~/.m2/toolchains.xml` on OS X and Linux)
Code for the main jar (JDK 1.7-1.8) goes under `src/main/java` as usual.
Code additions for later JDKs, along with `module-info.jar` go under `src/main/java9`, `src/main/java10` or `src/main/java11`
## Unit Testing
`mvn clean test` will use the current JDK (the one running Maven)to run unit tests,
including the appropriate additional directories.
## Building the MR JAR
`mvn -Dmulti_release clean install` will create the multi-release JAR, using toolchains to select the appropriate
compiler for each jar. This will automatically happen when using the release plugin.
## Notes:
This parent POM inherits from `org.sonatype.oss:oss-parent:9` and brings with it all associated definitions.
By default, builds with this parent will use JDK 1.7 to build the main jar. You can change that by adding
```
1.8
```
to your `` section.