Maven
  1. Maven
  2. MNG-872

Allow defined dependencies to be related to certain types (attachments)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Currently, if you have attachments on a pom, both the main artifact and the attachments have the
      same dependencies.

      Use case 1:
      packaging ejb: there's an ejb jar and an ejb-client jar. The ejb-client jar only
      contains interfaces (actually, everything except the beans themselves), but no
      business logic. The business logic in the ejb beans themselves however can have
      a dependency that is not required for the ejb-client.

      Use case 2:
      POMS producing .jar, .dll and .so suffer from the same problem. If there are dependencies
      needed for just one or two types (either the jar or both .dll and .so), depending on
      the other type also includes those dependencies.

      Proposal: add a tag <forTypes> (better name!) to <dependency>; when absent, all types
      will have this dependency; when present, only the specified types will have these dependencies.

      Implications:

      • add 'getXXClasspath( type ); methods to MavenProject and let the plugins use those.
      • dependency resolution should pick foreign dependencies parameterized by the <type>
        or get them all and just group them by type (the first is preferred since the latter will cause
        unused dependencies to be resolved).

        Activity

        Kenney Westerhof created issue -
        Brett Porter made changes -
        Field Original Value New Value
        Fix Version/s 2.1 [ 11704 ]
        Brett Porter made changes -
        Component/s maven-artifact [ 11338 ]
        Vincent Massol made changes -
        Workflow Maven [ 39447 ] Maven New [ 47189 ]
        Jason van Zyl made changes -
        Fix Version/s 2.1.x [ 13142 ]
        Fix Version/s 2.1 [ 11704 ]
        Hide
        Brett Porter added a comment -

        would need a new proposal for this - not currently included in the artifact proposals

        Show
        Brett Porter added a comment - would need a new proposal for this - not currently included in the artifact proposals
        Brett Porter made changes -
        Fix Version/s 2.x [ 13145 ]
        Fix Version/s 2.1 [ 13142 ]
        Hide
        Anders Kristian Andersen added a comment -

        This is a feature request, not bug

        Show
        Anders Kristian Andersen added a comment - This is a feature request, not bug
        Show
        Jason van Zyl added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
        Hide
        Jason van Zyl added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Jason van Zyl added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.
        Jason van Zyl made changes -
        Resolution Incomplete [ 4 ]
        Status Open [ 1 ] Closed [ 6 ]
        Paul Benedict made changes -
        Fix Version/s Issues to be reviewed for 3.x [ 13145 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
        Mark Thomas made changes -
        Workflow jira [ 12712138 ] Default workflow, editable Closed status [ 12752091 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
        Mark Thomas made changes -
        Workflow jira [ 12953105 ] Default workflow, editable Closed status [ 12989000 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        3053d 10h 30m 1 Jason van Zyl 22/Jan/14 20:31

          People

          • Assignee:
            Unassigned
            Reporter:
            Kenney Westerhof
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development