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

Ivy Publish Task Fails When XML Comments Exist Next to Dependency Declarations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0-beta-2
    • 2.0-RC1
    • Ant
    • None
    • Java 5.0, Eclipse 3.3.2, Ant 1.7.0

    Description

      When I have a dependency declared on the same line as a XML comment I receive the following error when attempting to call ivy:publish:

      "RuntimeException: bad ivy file in cache"

      Upon reviewing the generated "resolved descriptor" the line that causes this error looks like the following (see spring-aop line):

      <!-- Middleware - Spring Application Framework -->
      <dependency org="org.springframework" name="spring-core" rev="2.0.+" conf="runtime->default"/><!-- Core Module -->
      <dependency org="org.springframework" name="spring-jms" rev="2.0.+" conf="runtime->default;compile->*"/><!-- JMS Module -->
      <dependency org="org.springframework" name="spring-aop" rev="2.0.+" conf="runtime->default"<!-- AOP Module -->>

      the source ivy.xml file that generated this erroneous output contains a line as follows:

      <!-- Middleware - Spring Application Framework -->
      <dependency org="org.springframework" name="spring-core" rev="2.0.+" conf="runtime->default"/><!-- Core Module -->
      <dependency org="org.springframework" name="spring-jms" rev="2.0.+" conf="runtime->default;compile->*"/><!-- JMS Module -->
      <dependency org="org.springframework" name="spring-aop" rev="2.0.+" conf="runtime->default"><!-- AOP Module -->

      Now I am not sure if it is because of the XML comments or the greater than brackets inside the conf attributes. Moving the comments to different lines resolves the issue. Ivy tells me to clean my cache in order to resolve the issue, but this doesn't resolve the problem. Without the ivy publish task being used, everything else works fine (resolve/retrieve).

      Attachments

        Activity

          People

            maartenc Maarten Coene
            juliank Julian Klein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: