Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-294

Unwanted transitive dependencies added to the WAR with dependency management and Maven 3.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 2.1.1, 2.3
    • more-investigation
    • None
    • None

    Description

      With Maven 3, unwanted libraries are added to the WEB-INF/lib folder of the packed web app in a multi-module build if:

      • The WAR module has a JAR dependency with provided scope.
      • The POM of the WAR module (or its parent POM) has a dependencyManagement section that defines the transitive dependencies of the JAR module.
      • The dependencies in the dependencyManagement section are not defined as dependencies of the WAR module.
      • The dependencies in the dependencyManagement section explicitly define compile or runtime scope.

      This leads to unwanted dependencies in the packaged web app or even duplicate dependencies when using overlays.

      When running the build with Maven 2.2.1, it works fine and doesn't add those unwanted dependencies to the web app.

      Attachments

        1. MWAR-294.zip
          3 kB
          Marc Rohlfs
        2. MWAR-294-updated.zip
          3 kB
          Marc Rohlfs

        Issue Links

          Activity

            People

              Unassigned Unassigned
              marc.rohlfs Marc Rohlfs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: