Ivy
  1. Ivy
  2. IVY-1135

still use defaultconf when defaultconfmapping is defined

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0-RC1
    • Component/s: None
    • Labels:
      None

      Description

      Per this forum post:

      http://www.nabble.com/defaultconf-and-defaultconfmapping-td25582330.html#a25582330

      I think it would be possible (and more intuitive) if defaultconf and defaultconfmapping could be used at the same time.

      1. ivy-1135-doc.patch
        10 kB
        Jon Schneider
      2. ivy-1135.patch
        7 kB
        Jon Schneider

        Activity

        Hide
        Stephen Haberman added a comment -

        An example, if I had:

        <dependencies defaultconfmapping="A->a;B->b" defaultconf="A">

        I could list a dependency without a conf on it:

        <dependency org="foo" name="bar" rev="1" />

        And defaultconf, "A", would be used, then have the defaultconfmapping applied to it, so I'd end up with the foo.bar dependency's implied conf being "a" (via A->a).

        Show
        Stephen Haberman added a comment - An example, if I had: <dependencies defaultconfmapping="A->a;B->b" defaultconf="A"> I could list a dependency without a conf on it: <dependency org="foo" name="bar" rev="1" /> And defaultconf, "A", would be used, then have the defaultconfmapping applied to it, so I'd end up with the foo.bar dependency's implied conf being "a" (via A->a).
        Hide
        Jon Schneider added a comment - - edited

        I think you mean to say that foo.bar should have a conf of "A->a" not "a", which of course resolves the "a" conf in foo.bar's module descriptor. Furthermore, if defaultconfmapping="A->a;B->b" and defaultconf="A->b", I think that the conf of foo.bar should be inlined to "A->b".

        I agree that the combination of these properties makes a lot of sense. I also assumed this was the intended behavior until I read the docs more carefully.

        Show
        Jon Schneider added a comment - - edited I think you mean to say that foo.bar should have a conf of "A->a" not "a", which of course resolves the "a" conf in foo.bar's module descriptor. Furthermore, if defaultconfmapping="A->a;B->b" and defaultconf="A->b", I think that the conf of foo.bar should be inlined to "A->b". I agree that the combination of these properties makes a lot of sense. I also assumed this was the intended behavior until I read the docs more carefully.
        Hide
        Jon Schneider added a comment -

        Patch including fix and test case attached. I made one other change with this patch – add defaultconf as a valid attribute to the configurations element. That way, if several ivy.xml's are using a single common configurations file, the defaultconf can be defined in one place as well.

        I would be happy to submit a documentation patch as well if this is committed.

        Thanks!

        Show
        Jon Schneider added a comment - Patch including fix and test case attached. I made one other change with this patch – add defaultconf as a valid attribute to the configurations element. That way, if several ivy.xml's are using a single common configurations file, the defaultconf can be defined in one place as well. I would be happy to submit a documentation patch as well if this is committed. Thanks!
        Hide
        Maarten Coene added a comment -

        Jon,

        thanks a lot for the patch, I've applied it in SVN trunk.
        I'm leaving this issue open so you can attach your documentation patch

        Maarten

        Show
        Maarten Coene added a comment - Jon, thanks a lot for the patch, I've applied it in SVN trunk. I'm leaving this issue open so you can attach your documentation patch Maarten
        Hide
        Jon Schneider added a comment -

        Maarten,

        Attached is the doc patch. Thanks again!

        Show
        Jon Schneider added a comment - Maarten, Attached is the doc patch. Thanks again!
        Hide
        Maarten Coene added a comment -

        Documentation patch has been applied.
        Thanks again for the contribution!

        Maarten

        Show
        Maarten Coene added a comment - Documentation patch has been applied. Thanks again for the contribution! Maarten

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Stephen Haberman
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development