[ 
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).

{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}

  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).

{quote}<dependency>
   <groupId>com.github.ivandzf</groupId>
   <artifactId>log4j2-custom-layout</artifactId>
   <version>1.1.0</version>
   <scope>test</scope>
</dependency>
{quote}
Simplest fix is to add exclusion:

{quote}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>
{quote}


> 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).
> {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)

Reply via email to