You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Filipp Gunbin (JIRA)" <ji...@apache.org> on 2019/07/08 23:49:00 UTC
[jira] [Closed] (LOG4J2-2640) Circular dependency in log4j-core
pom.xml
[ https://issues.apache.org/jira/browse/LOG4J2-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filipp Gunbin closed LOG4J2-2640.
---------------------------------
> Circular dependency in log4j-core pom.xml
> -----------------------------------------
>
> Key: LOG4J2-2640
> URL: https://issues.apache.org/jira/browse/LOG4J2-2640
> Project: Log4j 2
> Issue Type: Bug
> Reporter: Filipp Gunbin
> Assignee: Ralph Goers
> Priority: Major
> Fix For: 3.0.0
>
>
> Master fails to build unless current snapshot log4j-core version is already present in local maven repo:
> {quote}[ERROR] Failed to execute goal on project log4j-core: Could not resolve dependencies for project org.apache.logging.log4j:log4j-core:jar:3.0.0-SNAPSHOT: Could not find artifact org.apache.logging.log4j:log4j-core:jar:3.0.0-SNAPSHOT, try downloading from [https://logging.apache.org/log4j/2.x/download.html] -> [Help 1]
> {quote}
> To reproduce, execute {code} rm -r ~/.m2/repository/org/apache/logging/log4j{code} and invoke usual mvn clean install.
> This is because log4j-core has this dependency, which itself references log4j-core (with a defined version which gets correctly overriden by 3.0.0-SNAPSHOT).
> {code}
> <dependency>
> <groupId>com.github.ivandzf</groupId>
> <artifactId>log4j2-custom-layout</artifactId>
> <version>1.1.0</version>
> <scope>test</scope>
> </dependency>
> {code}
> Simplest fix is to add exclusion:
> {code}
> diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
> index 20063be15..2e15ca9a4 100644
> --- a/log4j-core/pom.xml
> +++ b/log4j-core/pom.xml
> @@ -324,6 +324,12 @@
> <artifactId>log4j2-custom-layout</artifactId>
> <version>1.1.0</version>
> <scope>test</scope>
> + <exclusions>
> + <exclusion>
> + <groupId>org.apache.logging.log4j</groupId>
> + <artifactId>log4j-core</artifactId>
> + </exclusion>
> + </exclusions>
> </dependency>
> </dependencies>
> <build>
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)