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

Generated ivy.xml from pom with multiple dependencies with different classifier does not contain the main dependency

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-rc1
    • Fix Version/s: 2.5.0
    • Component/s: Maven Compatibility
    • Labels:
      None

      Description

      Hi,

      Sorry for the title, it's a bit difficult to summerize the problem...

      So, since we updated our Eclipse environment to Ivy 2.5.0-rc1 (available via IvyDE), we encountered problems when resolving dependencies on our projects.

      Following a little investigation, it appear that the generated ivy.xml from the pom.xml of some dependencies differs from the previous version.

      I think the slf4j-log4j12 package is a good exemple to illustrate my point :

      Details :

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.25</version>
      </dependency>
      

      Pom.xml :

      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      
        <modelVersion>4.0.0</modelVersion>
      
        <parent>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-parent</artifactId>
          <version>1.7.25</version>
        </parent>
      
        <artifactId>slf4j-log4j12</artifactId>
      
        <packaging>jar</packaging>
        <name>SLF4J LOG4J-12 Binding</name>
        <description>SLF4J LOG4J-12 Binding</description>
        <url>http://www.slf4j.org</url>
      
        <dependencies>
          <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
          </dependency>
      
          <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </dependency>
          <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <type>test-jar</type>
            <version>${project.version}</version>
            <scope>test</scope>
          </dependency>
        </dependencies>
      
      </project>
      

      Generated Ivy.xml (dependency part) - 2.4.0

      <dependencies>
         <dependency org="org.slf4j" name="slf4j-api" rev="1.7.25" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
         <dependency org="org.slf4j" name="slf4j-api" rev="1.7.25" force="true" conf="test->runtime(*),master(*)">
            <artifact name="slf4j-api" type="test-jar" ext="jar" conf="" m:classifier="tests"/>
         </dependency>
         [...]
      </dependencies>
      

      Two differents dependency entries :

      • one for classic "jar"
      • one for the type "test-jar".

      In another hand :
      Generated Ivy.xml (dependency part) - 2.5.0-rc1

      <dependencies>
         <dependency org="org.slf4j" name="slf4j-api" rev="1.7.25" force="true" conf="compile->compile(*),master(*);runtime->runtime(*);test->runtime(*),master(*)">
            <artifact name="slf4j-api" type="test-jar" ext="jar" conf="" m:classifier="tests"/>
         </dependency>
         [...]
      </dependencies>
      

      Only one dependency with artifact test-jar.
      As a result for some of our projects to only get the dependency test-jar...

      I think this is a bug, but maybe i did'nt understand a subtlety.

      PS : Is it link to the correction of IVY-1484 ?

      Thanks for your time

        Attachments

        1. logback-classic-1.1.7-with-ivy-2.4.0.xml
          11 kB
          Daniele Catellani
        2. logback-classic-1.1.7-with-ivy-2.5.0-rc1.xml
          11 kB
          Daniele Catellani

          Issue Links

            Activity

              People

              • Assignee:
                jaikiran Jaikiran Pai
                Reporter:
                Antoine Précigout Antoine Précigout
              • Votes:
                4 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: