How do I display the active profiles?
Author: Deron Eriksson
Description: This tutorial describes how to display the active profiles for a project.
Tutorial created using: Windows Vista || JDK 1.6.0_04 || Eclipse Web Tools Platform 2.0.1 (Eclipse 3.3.1)


The mavenSW "help:active-profiles" goal can be used to display the active profiles for a project. Here is an EclipseSW external tools configuration to perform the goal.

Name:mvn help~active-profiles
Location:C:\dev\apache-maven-2.0.8\bin\mvn.bat
Working Directory:${project_loc}
Arguments:help:active-profiles

Here is the external tools configuration window:

External Tool Configuration

To execute the goal, we can select the project and then the external tool configuration.

Executing External Tool Configuration

The console output is shown here.

Console output from 'mvn help:active-profiles'

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[INFO] Building mytest
[INFO]    task-segment: [help:active-profiles] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [help:active-profiles]
[INFO] 
Active Profiles for Project 'com.maventest:mytest:jar:1.0-SNAPSHOT': 

The following profiles are active:

 - my.1.6.profile (source: settings.xml)
 - a.profile (source: settings.xml)



[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Feb 09 23:55:34 PST 2008
[INFO] Final Memory: 2M/5M
[INFO] ------------------------------------------------------------------------

As you can see from the output, two profiles are currently active, "my.1.6.profile" and "a.profile".