Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Profile Display Extension

Maven core extension that lists every profile available to the build, and whether it is active, once per build and for the top-level project only.

It replaces a separate mvn -N help:all-profiles invocation, which costs a full Maven startup and, without -N, repeats the listing for every module of a multi-module project.

Output

[INFO] Listing Profiles for Project: com.flowlogix.plugins:container-deploy-plugin-root:pom:x-SNAPSHOT
[INFO]   Profile Id: coverage (Active: false, Source: pom)
[INFO]   Profile Id: skinny-war (Active: true, Source: pom)
[INFO]   Profile Id: server-local (Active: true, Source: settings.xml)

Profiles are gathered from the top-level pom and all of its parents, then from settings.xml. A profile id declared in more than one place is reported once, from the nearest pom.

Usage

As a core extension in .mvn/extensions.xml

Note: substitute LATEST with the actual latest version number
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.1.0">
    <extension>
        <groupId>com.flowlogix.plugins</groupId>
        <artifactId>profile-display-plugin</artifactId>
        <version>LATEST</version>
    </extension>
</extensions>

As a build extension in pom.xml

This form is inherited by child projects, so it can be declared once in a parent pom.

<build>
    <extensions>
        <extension>
            <groupId>com.flowlogix.plugins</groupId>
            <artifactId>profile-display-plugin</artifactId>
            <version>LATEST</version>
        </extension>
    </extensions>
</build>

Ad-hoc, without changing the project

mvn -Dmaven.ext.class.path=/path/to/profile-display-plugin.jar -Dprofile.display validate

Configuration

Property Description Default

profile.display

Enable the profile listing with -Dprofile.display or -Dprofile.display=true

false

Building

./mvnw package

Releases

Packages

Contributors

Languages