Maven
  1. Maven
  2. MNG-3420

In a reactor, attached artifacts with classifier should be used when generating classpath, instead of the whole output directory of the related project

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.5, 2.0.6, 2.0.7, 2.0.8
    • Fix Version/s: None
    • Component/s: Reactor and workspace
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      In a reactor, when a project depends on attached artifacts with classifier of other projects (such as jar assemblies), the generated classpath includes all the output directory of the related projects.
      This can lead to problems for example if these attached artifacts contains only a subset of the output directory of the related project.

      I attached an example that shows this problem :
      1/ launch "mvn install" in the "test-classifier" directory (POM project basedir), you'll get a compilation failure for module3.
      2/ launch "mvn install" in the "module3" directory, it works.

      I also attached a patch (it affects only MavenProject class).

      1. MavenProject-patch.txt
        0.7 kB
        Nicolas Rougé
      2. test-classifier.tar.gz
        1 kB
        Nicolas Rougé

        Issue Links

          Activity

            People

            • Assignee:
              Brett Porter
              Reporter:
              Nicolas Rougé
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: