Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-736

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0-beta-1
    • 2.2.0-RC1
    • Ant, Maven Compatibility
    • None
    • 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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            maartenc Maarten Coene
            carltonb Carlton Brown
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment