Björn Kautler created IVY-1624:
----------------------------------

             Summary: log4j-core is missing the log4j-api dependency when 
resolving
                 Key: IVY-1624
                 URL: https://issues.apache.org/jira/browse/IVY-1624
             Project: Ivy
          Issue Type: Bug
    Affects Versions: 2.5.0
            Reporter: Björn Kautler


Given the {{ivy.xml}}
{code:xml}
<ivy-module version="2.0">
    <info organisation="foo" module="bar"/>
    <dependencies>
        <dependency org="org.apache.logging.log4j" name="log4j-core" 
rev="2.14.0" conf="default"/>
    </dependencies>
</ivy-module>{code}
And the {{build.xml}}
{code:xml}
<project default="retrieve" xmlns:ivy="antlib:org.apache.ivy.ant">
    <target name="check-ivy">
        <available property="ivy.jar.present"
                   file="lib/ivy/ivy-2.5.0.jar"
                   type="file"/>
    </target>
    <target name="download-ivy"
            depends="check-ivy"
            unless="ivy.jar.present">
        <mkdir dir="lib/ivy"/>
        <get 
src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.0/ivy-2.5.0.jar";
             dest="lib/ivy/ivy-2.5.0.jar"
             usetimestamp="true"/>
    </target>
    <target name="init-ivy"
            depends="download-ivy">
        <property name="ivy.retrieve.pattern"
                  value="lib/[conf]/[artifact](-[classifier]).[ext]"/>
        <taskdef resource="org/apache/ivy/ant/antlib.xml"
                 classpath="lib/ivy/ivy-2.5.0.jar"
                 loaderref="ivy.loader"
                 uri="antlib:org.apache.ivy.ant"/>
    </target>
    <target name="retrieve"
            depends="init-ivy">
        <ivy:retrieve sync="true"/>
    </target>
</project>{code}
When you now execute Ant, you only get {{lib/default/log4j-core.jar}} while you 
should also get {{lib/default/log4j-api.jar}} which works fine in Maven and 
Gradle.

The problem is most probably that there is a second dependency on {{log4j-api}} 
 where a different (additional) artifact is depended upon in the {{test}} scope.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to