You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (Jira)" <ji...@apache.org> on 2021/07/25 08:40:00 UTC
[jira] [Closed] (MENFORCER-225) Add rules for mutually-exclusive
profiles and banned profiles
[ https://issues.apache.org/jira/browse/MENFORCER-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MENFORCER-225.
------------------------------------
Fix Version/s: (was: waiting-for-feedback)
Assignee: Robert Scholte
Resolution: Won't Fix
I think this is too complex to explain and use, hence also too complex for us to maintain. I'd suggest to maintain your own Enforcer Rule.
> Add rules for mutually-exclusive profiles and banned profiles
> -------------------------------------------------------------
>
> Key: MENFORCER-225
> URL: https://issues.apache.org/jira/browse/MENFORCER-225
> Project: Maven Enforcer Plugin
> Issue Type: New Feature
> Components: Rule API, Standard Rules
> Affects Versions: 1.4
> Reporter: Amardeep Sarkar
> Assignee: Robert Scholte
> Priority: Major
> Attachments: enforcer-rules.patch, site.patch
>
>
> I wrote 2 new enforces rules:
> * The ability to specify a set of mutually-exclusive profiles (p1,p2:p1,p3 would mean p1 can't be active with either p2 or p3). This has been discussed on [this thread|http://stackoverflow.com/questions/24855678/enforce-exactly-one-of-two-maven-profiles] on SO.
> * The ability to ban profiles (the contrary of {{requireActiveProfile}}). p1, p2 would mean neither p1 nor p2 can be active for this build.
> Both of these rules support wildcards and consider inherited profiles as well. I've attached a patch complete with unit test cases. {{mvn clean install}} passes in local. These are built on v1.4 of the rules.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)