Ivy
  1. Ivy
  2. IVY-736

makepom ignores artifact type in ivy.xml and hardcodes 'jar' in the output pom

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-beta-1
    • Fix Version/s: 2.2.0-RC1
    • Component/s: Ant, Maven Compatibility
    • Labels:
      None
    • Environment:

      Windows XP, Java 5

      Description

      I'm using <ivy:makepom> to generate pom files for a tarfile. Even though ivy.xml declares the package type as 'tar', the makepom task sets the packaging type to 'jar':

      Input ivy.xml file fragment:

      <info organisation="myorg" module="hello-package" revision="1.0"/>
      <publications>
      <artifact name="hello-package" type="tar" ext="tar"/>
      <artifact name="hello-package" type="pom" ext="pom"/>
      </publications>

      Output pom file fragment:

      <groupId>myorg</groupId>
      <artifactId>hello-package</artifactId>
      <packaging>jar</packaging>
      <version>1.0</version>

      Upon looking in the Ivy source, I found that the value is hardcoded in the method printModuleId in org.apache.ivy.plugins.parser.m2.PomModuleDescriptorWriter class:
      out.println(" <packaging>jar</packaging>");

      I did not see any easy way to fix this because it does not look like the type attribute is part of the module framework.

        Issue Links

          Activity

          Carlton Brown created issue -
          Xavier Hanin made changes -
          Field Original Value New Value
          Fix Version/s 2.0 [ 12312237 ]
          Xavier Hanin made changes -
          Fix Version/s 2.0 [ 12312237 ]
          Hide
          Aaron Hachez added a comment -

          Suggested patch for hard coded "jar"

          Show
          Aaron Hachez added a comment - Suggested patch for hard coded "jar"
          Aaron Hachez made changes -
          Link This issue relates to IVY-770 [ IVY-770 ]
          Hide
          Aaron Hachez added a comment - - edited

          This issue is also in 2.1.0 release.

          This particularly becomes frustrating when using Flex + Ant + Ivy

          Show
          Aaron Hachez added a comment - - edited This issue is also in 2.1.0 release. This particularly becomes frustrating when using Flex + Ant + Ivy
          Hide
          Maarten Coene added a comment -

          Fixed in trunk and it will be included in the upcoming 2.2.0-RC1 release.
          If possible, please give it a try.

          thanks!
          Maarten

          Show
          Maarten Coene added a comment - Fixed in trunk and it will be included in the upcoming 2.2.0-RC1 release. If possible, please give it a try. thanks! Maarten
          Maarten Coene made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Maarten Coene [ maartenc ]
          Fix Version/s 2.2.0-RC1 [ 12315013 ]
          Resolution Fixed [ 1 ]
          Maarten Coene made changes -
          Component/s Maven Compatibility [ 12312101 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development