You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is extensible, one can add new property sources as needed.
Usage with Maven
There are 3 extensions: extension3 meant to be used with Maven 3 exclusively (does not work in Maven 4), then
extension4 meant to be used with Maven 4 exclusively (does not work in Maven 3), and finally extension, that
works in both, Maven 3 and Maven 4. Last is the recommended extension to be used. Use it like this:
Note: Nisse can be used as "plugin only" as well, but functionality in this case is limited ONLY to providing
properties for interpolation (within a project).
Nisse can serve as OS Detector drop in replacement, just add Nisse as extension to your project and
specify -Dnisse.compat.osDetector on CLI or better, in .mvn/maven.config file. If this option present,
Nisse will emit same properties as OS Detector did.
To check what Nisse injects, simplest command to use is Nisse dump:
$ mvn validate -N -Dnisse.dump
The -N is needed only if you are in root of some complex multi-module project.
Note that this only works when Nisse is declared as a "core extension"
(Maven 3 and 4) through .mvn/extensions.xml or as a "user-wide extension" (Maven 4 only) through ~/.m2/extensions.xml.
Otherwise, one may use dump-properties Mojo or the nisse.dump property of inject-properties Mojo.
Implemented Sources
There are 4 sources provided out of the box:
file-source: it reads up a Java Properties File from disk and publishes that
jgit-source: it uses Eclipse JGit to get some git related data
mvn-source: it provides major/minor/patch versions of currently used Maven (note: Maven 4 already provides this from core)
os-source: heavily inspired by OS Detector and made reusable