Maven
  1. Maven
  2. MNG-2720

Multiproject dependencies not accurate for project.compileClasspathElements when run from root project

    Details

    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      In a plugin I wrote (jspc), needs the dependency jars. It asks for this with the request for the project.compileClasspathElements. In a multiproject environment, when each project is built individually, it seems correct. Example (when run with -X ina subproject dir) showing classpath:

      /Users/mbp/.m2/repository/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar
      /Users/mbp/.m2/repository/taglibs/standard/1.1.2/standard-1.1.2.jar
      /Users/mbp/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar
      /Users/mbp/.m2/repository/tldtestapp/testexttld/1/testexttld-1.jar <-----------------NOTICE HERE - THIS IS AN ARTIFACT FROM ANOTHER SUBPROJECT
      /Users/mbp/.m2/repository/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar]

      When it is run from the Top level/Root project...here is the output:

      Users/mbp/.m2/repository/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar
      /Users/mbp/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar
      /Users/mbp/.m2/repository/taglibs/standard/1.1.2/standard-1.1.2.jar
      /Users/mbp/Desktop/jsp-example/TestTldProject/target/classes <----------------NOTICE - THE JAR IS NOT BEING ASKED FOR, BUT A CLASSES DIR INSTEAD
      /Users/mbp/.m2/repository/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar]

      The second project has a dependency on the testexttld-1.jar because it contains tag libs which must be wrapped in a jar. When run from a top level, it uses the other project's classes directory instead of the JAR artifact. WIth JSPC and taglibs, this makes it so it cannot work. If I have a dependency on a jar, that jar should be the dependency as expected and not a classes directory. For full explanation and example see here:

      http://jira.codehaus.org/browse/MJSPC-4

        Issue Links

          Activity

          Jason van Zyl made changes -
          Field Original Value New Value
          Fix Version/s Reviewed [ 13555 ]
          Grégory Joseph made changes -
          Link This issue is related to MJSPC-4 [ MJSPC-4 ]
          Brett Porter made changes -
          Link This issue relates to MSHADE-42 [ MSHADE-42 ]
          Brett Porter made changes -
          Fix Version/s Reviewed Pending Version Assignment [ 13555 ]
          Fix Version/s 2.1.0-M3 [ 14588 ]
          John Casey made changes -
          Assignee John Casey [ jdcasey ]
          John Casey made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          John Casey made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          John Casey made changes -
          Fix Version/s 2.1.0-M2 [ 14587 ]
          Fix Version/s 2.1.0-M3 [ 14588 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Benjamin Bentmann made changes -
          Link This issue is duplicated by MNG-4032 [ MNG-4032 ]
          Benjamin Bentmann made changes -
          Fix Version/s 3.0-alpha-3 [ 14719 ]
          Brett Porter made changes -
          Link This issue is duplicated by MNG-3420 [ MNG-3420 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-2045 [ MNG-2045 ]
          Obi Ezechukwu made changes -
          Link This issue relates to MNG-4248 [ MNG-4248 ]
          Benjamin Bentmann made changes -
          Link This issue is duplicated by MNG-2151 [ MNG-2151 ]
          Benjamin Bentmann made changes -
          Link This issue is duplicated by MNG-4608 [ MNG-4608 ]

            People

            • Assignee:
              John Casey
              Reporter:
              jgenender jgenender
            • Votes:
              15 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: