Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-558

Assembly does not include runtime-dependency if test-dependency with shorter path exists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.5.2
    • dependencySet
    • None

    Description

      In my project there's an artifact, which can be resolved by 2 different paths (scopes in brackets)

      a) Project->projA(compile)->projB(compile)->myArtifact(runtime)
      b) Project->projB(test)->myArtifact(runtime)
      

      The relevant part of the distribution descriptor is the following

      <formats>
        <format>zip</format>
      </formats>
      <dependencySets>
        <dependencySet>
          <outputDirectory>/lib</outputDirectory>
          <useProjectArtifact>true</useProjectArtifact>
          <unpack>false</unpack>
          <scope>runtime</scope>
        </dependencySet>
      </dependencySets>
      

      So when I run assembly:assembly I wonder, why myArtifact isn't included in my zip. I now think, that assembly favours the shorter path b) despite the test-scope over the longer but correct path a).

      Since test-scope dependencies should have nothing to do with distribution (if not included explicitly) myArtifact should have be included in my zip.

      Attachments

        Issue Links

          Activity

            People

              krosenvold Kristian Rosenvold
              fj Frank Jakop
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: