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/06/24 15:41:00 UTC
[jira] [Updated] (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 updated LOG4J2-2640:
----------------------------------
Description:
Master fails to build unless current 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}
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).
bq. <dependency>
bq. <groupId>com.github.ivandzf</groupId>
bq. <artifactId>log4j2-custom-layout</artifactId>
bq. <version>1.1.0</version>
bq. <scope>test</scope>
bq. </dependency>
bq.
Simplest fix is to add exclusion:
{{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>
}}
was:
Master fails to build unless current 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}
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).
{{ <dependency>
<groupId>com.github.ivandzf</groupId>
<artifactId>log4j2-custom-layout</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
}}
Simplest fix is to add exclusion:
{{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>
}}
> 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
> Priority: Major
>
> Master fails to build unless current 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}
> 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).
> bq. <dependency>
> bq. <groupId>com.github.ivandzf</groupId>
> bq. <artifactId>log4j2-custom-layout</artifactId>
> bq. <version>1.1.0</version>
> bq. <scope>test</scope>
> bq. </dependency>
> bq.
> Simplest fix is to add exclusion:
> {{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>
> }}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)