Maven 2 & 3

Various enhancements to profiles

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0.4
  • Fix Version/s: 3.1
  • Component/s: Profiles
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

The current support for profiles is somewhat limited and this issue report proposes some enhancements to profiles for ease and flexibility of use.

Enhancement #1: Make it possible to have profiles that mutually exclude each other. A profile should be able to exclude one or more other profiles.

Example of usage: We have a couple of profiles for databas settings (MSSQL, PostgreSQL and Derby). Only one of these profiles should be able to be active at the same time. Today, we can't express this in the profiles section.

Enhancement #2: Make it possible to deactivate profiles from the command line.

Example of usage: User and/or project has a set of profiles that are activate per default. The user wants to temporary disable on or more of these (by temporary I mean for one execution).
Possible syntax might be: mvn -PsomeProfile=inactive|false|no or perhaps a separate command line switch.

Issue Links

Activity

Hide
Paul Gier added a comment -

Enhancement #2 should be resolved by MNG-3545

Show
Paul Gier added a comment - Enhancement #2 should be resolved by MNG-3545
Hide
Brett Porter added a comment -

I don't think this should be profiles deactivating others, but rather a better set of conditionals (particularly around 'environments'). The classic example is trying to do several combinations of cargo setups for different platform combinations. Mixins might help.

I prefer to push as much into properties and avoid profile combinations, but it isn't always possible if the declarations need to differ.

Show
Brett Porter added a comment - I don't think this should be profiles deactivating others, but rather a better set of conditionals (particularly around 'environments'). The classic example is trying to do several combinations of cargo setups for different platform combinations. Mixins might help. I prefer to push as much into properties and avoid profile combinations, but it isn't always possible if the declarations need to differ.

People

Vote (4)
Watch (4)

Dates

  • Created:
    Updated: