Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5632

Optional tag in dependencyManagement not inherited - disallow and/or document

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.1.1, 3.2.1
    • None
    • None
    • None

    Description

      As explained in MNG-1630 adn MNG-4600, specifying

      <optional>true</optional>
      

      in dependencyManagement has no effect. "optional" only takes effect when specified directly in the "dependencies" section of the POM.

      However, this is not documented anywhere, and rather unexpected, because both version and scope can be set from dependencyManagement.

      If the current behaviour is intentional, it should be documented. Ideally, Maven should also disallow the use of "<optional>" in dependencyManagement (or at least issue a warning).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sleske Sebastian Leske
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: