[ 
https://issues.apache.org/jira/browse/LOG4J2-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17110837#comment-17110837
 ] 

Ralph Goers edited comment on LOG4J2-2845 at 5/19/20, 4:31 AM:
---------------------------------------------------------------

That dependency is required for Log4j to build the API jar. The Maven 
definition for the provided scope is


{panel}
*provided*
This is much like compile, but indicates you expect the JDK or a container to 
provide the dependency at runtime. For example, when building a web application 
for the Java Enterprise Edition, you would set the dependency on the Servlet 
API and related Java EE APIs to scope provided because the web container 
provides those classes. _This scope is only available on the compilation and 
test classpath, and is not transitive._
{panel}

The emphasis on the last sentence was added by me. If Ivy is trying to include 
a transitive dependency with a scope of provided it is a bug in Ivy.

To be honest, I believe this is the first question I have seen mentioning Ivy 
here. Most users either use Maven or Gradle.



was (Author: [email protected]):
That dependency is required for Log4j to build the API jar. The Maven 
definition for the provided scope is


{panel}
*provided*
This is much like compile, but indicates you expect the JDK or a container to 
provide the dependency at runtime. For example, when building a web application 
for the Java Enterprise Edition, you would set the dependency on the Servlet 
API and related Java EE APIs to scope provided because the web container 
provides those classes. _This scope is only available on the compilation and 
test classpath, and is not transitive._
{panel}

The emphasis on the last sentence was added by me. If Ivy is trying to include 
a transitive dependency with a scope of provided it is a bug in Ivy.


> Can't install 2.13.3 with Ivy
> -----------------------------
>
>                 Key: LOG4J2-2845
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2845
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.13.3
>         Environment: macOS 10.15.4, Java 11 (openjdk-14.0.1.jdk)
>            Reporter: Rick Mann
>            Priority: Major
>
> This affects 2.13.3, but there's no Jira version for that.
> I'm trying to use Ant & Ivy to build against log4j. I've set up the 
> dependencies as indicated on the website 
> ([https://logging.apache.org/log4j/2.x/maven-artifacts.html):]
> <dependencies>
>    <dependency org="org.apache.logging.log4j" name="log4j-api" rev="2.13.3" />
>    <dependency org="org.apache.logging.log4j" name="log4j-core" rev="2.13.3" 
> />
>  </dependencies>
> However, those poms (e.g.: 
> [https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3.pom)]
>  eventually specify
>  
>  <dependency>
>    <groupId>org.apache.logging.log4j</groupId>
>    <artifactId>log4j-api-java9</artifactId>
>    <scope>provided</scope>
>    <type>zip</type>
>  </dependency>
>   
>  (and log4j-core-java9), and Ivy tries to download the, but they don't exist 
> in the repos. I'm  not sure why Ivy is trying to download a "provided" 
> artifact, but I'm not super clear on how these work.
> Googling, I find very little, seems like no one else has run into this 
> problem, but I'm not sure how they couldn't, unless no one uses log4j and Ivy 
> together.
> Something is wrong somewhere. Could be my installation, could be the Log4j 
> Ivy instructions, I'm not sure. I couldn't find a mailing list for log4j, so 
> here I am.
> Note that explicitly excluding the module allows compilation to proceed, not 
> sure if I'll be able to run yet: <exclude module="log4j-api-java9"/>



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

Reply via email to