Maven
  1. Maven
  2. MNG-2316

Add info to the poms for dependencies that implement an API or provide other dependencies

    Details

    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      e.g.

      geronimo implementation of javamail could say

      <provides>
        <dependency>
          <groupId>javax.mail</groupId>
          <artifactId>mail</artifactId>
          <version>...</version>
        </dependency>
      </provides>

      spring.jar pom could say

      <provides>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-webmvc</artifactId>
          <version>...</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-context</artifactId>
          <version>...</version>
        </dependency>
        ...
      </provides>

        Issue Links

          Activity

          Hide
          Tom Huybrechts added a comment -

          This would also be useful when building OSGi bundles, which are wired to each other using Export-Package and Import-Package headers in the manifest.

          Show
          Tom Huybrechts added a comment - This would also be useful when building OSGi bundles, which are wired to each other using Export-Package and Import-Package headers in the manifest.
          Hide
          Andrew Williams added a comment -

          How would you be able to use such information if it was available?

          Perhaps your example is bad, but javax.mail is not just an API - it is an implementation, so including it on it's own is perfect;y valid, no extra implementation is needed.
          If there was a purely api jar and you implement it with another artifact how would we know about it?

          Show
          Andrew Williams added a comment - How would you be able to use such information if it was available? Perhaps your example is bad, but javax.mail is not just an API - it is an implementation, so including it on it's own is perfect;y valid, no extra implementation is needed. If there was a purely api jar and you implement it with another artifact how would we know about it?
          Hide
          Carlos Sanchez added a comment -

          we can leave javax.* as placeholders and then have com.sun for the default one, org.apache.geronimo for geronimo one,...

          Show
          Carlos Sanchez added a comment - we can leave javax.* as placeholders and then have com.sun for the default one, org.apache.geronimo for geronimo one,...
          Hide
          Stephen Connolly added a comment -

          Another possible solution would be to add a new scope: implements

          That does not change the XML schema... the only issue is older maven clients... but we faced that issue adding the import scope... so I don't see a major issue with such a scope

          Show
          Stephen Connolly added a comment - Another possible solution would be to add a new scope: implements That does not change the XML schema... the only issue is older maven clients... but we faced that issue adding the import scope... so I don't see a major issue with such a scope

            People

            • Assignee:
              Unassigned
              Reporter:
              Carlos Sanchez
            • Votes:
              11 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated: