Uploaded image for project: '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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.5, 2.0.6, 2.0.7, 2.0.8
    • None
    • Reactor and Workspace
    • None
    • Patch

    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).

      Attachments

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

        Issue Links

          Activity

            People

              brett Brett Porter
              nrouge Nicolas Rougé
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: