Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-225

Add rules for mutually-exclusive profiles and banned profiles

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.4
    • None
    • Rule API, Standard Rules
    • None
    • Patch

    Description

      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 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.

      Attachments

        1. site.patch
          6 kB
          Amardeep Sarkar
        2. enforcer-rules.patch
          28 kB
          Amardeep Sarkar

        Activity

          People

            rfscholte Robert Scholte
            asarkar Amardeep Sarkar
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: