Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lundegaard/selective-build-maven-plugin
Selective Build Maven Plugin allows you to build and process only modules with changes in it.
https://github.com/lundegaard/selective-build-maven-plugin
java maven maven-plugin
Last synced: 18 days ago
JSON representation
Selective Build Maven Plugin allows you to build and process only modules with changes in it.
- Host: GitHub
- URL: https://github.com/lundegaard/selective-build-maven-plugin
- Owner: lundegaard
- Created: 2019-02-19T08:13:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-26T19:21:37.000Z (over 3 years ago)
- Last Synced: 2024-11-06T15:51:37.082Z (2 months ago)
- Topics: java, maven, maven-plugin
- Language: Java
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Selective Build Maven Plugin
Selective Build Maven Plugin allows you to build and process only modules with changes in it. It is dependent on git client installed on your system.
## Goal `changes`
This goal is used for selective builds (build only modules with changes).
It is used in three steps:
1. Configure the plugin in the root POM
2. Run the plugin and put the result into a environment variable
3. Run standard maven build with options from the variable### Root POM setup
To use this plugin first you should set it up in the root POM like this.
```xml
...
...
eu.lundegaard.maven
selective-build-maven-plugin
0.5.0
...
...```
### Get params for the build
The `changes` plugin outputs on _stdout_ parameters for the onward build. These parameters are based on current git status and can result into one of the following states:
1. Non-recursive build (build only root project) -- This happens mainly when there are no changes detected
2. Selective build (build only changed modules)
3. Full rebuild -- this happens when there are too much commits or when special files are changedTo obtain params one usually runs something like this:
```bash
MVN_RUN_OPTS=$(mvn -q -N selective-build:changes -Dsource=1234567890ABCDEF -Dtarget=FEDCBA0987654321)
```The `source` and `target` properties are either commits or branches between which the changes are detected.
### Run selective Maven build
To run the selective build afterwards is simple. Just run something like this:
```bash
mvn $MVN_RUN_OPTS clean verify
```