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

Bean shell enforcer swallows message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-alpha-3
    • 1.0-alpha-4
    • Standard Rules
    • None

    Description

      The message does not display in the console, because the original EnforcerRuleException is wrapped into another one:

      throw new EnforcerRuleException( this.message );
      }
      }
      catch ( Exception e )

      { throw new EnforcerRuleException( "Unable to lookup a component", e ); }

      and the console does not display root causes (even with -e, the root cause does not show), living us with "Unable to lookup a component" as an explanation of the rule violation:

      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building xxx
      [INFO] task-segment: [clean, install]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [clean:clean]
      [INFO] Deleting directory xxx
      [INFO] [enforcer:enforce

      {execution: enforce-beanshell}

      ]
      [WARNING] Rule 0: org.apache.maven.plugin.enforcer.EvaluateBeanshell failed with message: Unable to lookup a component
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2 seconds
      [INFO] Finished at: Thu Oct 04 12:00:25 PDT 2007
      [INFO] Final Memory: 6M/12M
      [INFO] ------------------------------------------------------------------------

      Attachments

        Activity

          People

            brianf Brian E Fox
            ddossot David Dossot
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: