From log4j-user-return-29002-archive-asf-public=cust-asf.ponee.io@logging.apache.org Sat Jul 28 01:43:49 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A5886180657 for ; Sat, 28 Jul 2018 01:43:48 +0200 (CEST) Received: (qmail 37098 invoked by uid 500); 27 Jul 2018 23:43:47 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 37087 invoked by uid 99); 27 Jul 2018 23:43:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2018 23:43:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 003CBC101D for ; Fri, 27 Jul 2018 23:43:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.849 X-Spam-Level: ** X-Spam-Status: No, score=2.849 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_COUK=0.85, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id B2NE3JkKiXUp for ; Fri, 27 Jul 2018 23:43:45 +0000 (UTC) Received: from shada.worldsofwar.co.uk (shada.worldsofwar.co.uk [217.155.33.205]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 6A8355F180 for ; Fri, 27 Jul 2018 23:43:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by shada.worldsofwar.co.uk (Postfix) with ESMTP id 4C667A47BE9 for ; Sat, 28 Jul 2018 00:44:01 +0100 (BST) Received: from shada.worldsofwar.co.uk ([127.0.0.1]) by localhost (shada.worldsofwar.co.uk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id A_qEMbqeykb5 for ; Sat, 28 Jul 2018 00:44:00 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by shada.worldsofwar.co.uk (Postfix) with ESMTP id D60D9A4180F for ; Sat, 28 Jul 2018 00:44:00 +0100 (BST) X-Virus-Scanned: amavisd-new at shada.worldsofwar.co.uk Received: from shada.worldsofwar.co.uk ([127.0.0.1]) by localhost (shada.worldsofwar.co.uk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id c61co1eeqchJ for ; Sat, 28 Jul 2018 00:44:00 +0100 (BST) Received: from shada.worldsofwar.co.uk (shada.worldsofwar.co.uk [172.16.1.30]) by shada.worldsofwar.co.uk (Postfix) with ESMTP id B95CAA47BE9 for ; Sat, 28 Jul 2018 00:44:00 +0100 (BST) Date: Sat, 28 Jul 2018 00:44:00 +0100 (BST) From: Scott Neville To: log4j-user@logging.apache.org Message-ID: <172594969.13247.1532735040720.JavaMail.zimbra@worldsofwar.co.uk> Subject: Strange results using Apache Ivy MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_13243_1629335400.1532735040719" X-Originating-IP: [172.16.21.161] X-Mailer: Zimbra 8.7.11_GA_1854 (ZimbraWebClient - FF61 (Win)/8.7.11_GA_1854) Thread-Index: nGtGSfalH41smBO2HT0TUulN+P7Rag== Thread-Topic: Strange results using Apache Ivy ------=_Part_13243_1629335400.1532735040719 Content-Type: multipart/alternative; boundary="=_51f48feb-e80e-4b03-bb90-9ee65a9a0ecd" --=_51f48feb-e80e-4b03-bb90-9ee65a9a0ecd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, I am trying to add log4j2 to an existing project using Apache Ivy as the dependancy management tool, I get some very interesting results. Attached is the ivy.xml file that is used (note there is no ivysettings.xml, it just uses the standard ones that ivy ships with). This should bring in the log4j2 core lib. When you look at what this fetches though you see it gets: log4j-1.2.17.jar log4j-api-2.9.0-tests.jar log4j-core-2.9.0-tests.jar log4j-slf4j-impl-2.9.0.jar So the question is why does it fetch log4j 1.2.17? This is not required by any other module as if I remove the log4j-core line the jar is not fetched. Why are the test artifacts fetched but not the actual jars? My second problem is as I understand I need to also get log4j2 API as this is required for my application to be logging. When the following line is added in: You get the following error on all build enviroments: [ivy:retrieve] :: problems summary :: [ivy:retrieve] :::: WARNINGS [ivy:retrieve] module not found: org.apache.logging.log4j#log4j-api-java9;2.9.0 [ivy:retrieve] ==== local: tried [ivy:retrieve] /home/scott/.ivy2/local/org.apache.logging.log4j/log4j-api-java9/2.9.0/ivys/ivy.xml [ivy:retrieve] -- artifact org.apache.logging.log4j#log4j-api-java9;2.9.0!log4j-api-java9.zip: [ivy:retrieve] /home/scott/.ivy2/local/org.apache.logging.log4j/log4j-api-java9/2.9.0/zips/log4j-api-java9.zip [ivy:retrieve] ==== shared: tried [ivy:retrieve] /home/scott/.ivy2/shared/org.apache.logging.log4j/log4j-api-java9/2.9.0/ivys/ivy.xml [ivy:retrieve] -- artifact org.apache.logging.log4j#log4j-api-java9;2.9.0!log4j-api-java9.zip: [ivy:retrieve] /home/scott/.ivy2/shared/org.apache.logging.log4j/log4j-api-java9/2.9.0/zips/log4j-api-java9.zip [ivy:retrieve] ==== public: tried [ivy:retrieve] https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api-java9/2.9.0/log4j-api-java9-2.9.0.pom [ivy:retrieve] -- artifact org.apache.logging.log4j#log4j-api-java9;2.9.0!log4j-api-java9.zip: [ivy:retrieve] https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api-java9/2.9.0/log4j-api-java9-2.9.0.zip [ivy:retrieve] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:retrieve] :: UNRESOLVED DEPENDENCIES :: [ivy:retrieve] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:retrieve] :: org.apache.logging.log4j#log4j-api-java9;2.9.0: not found [ivy:retrieve] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:retrieve] [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS This is built using Java 1.8 (rather than Java 9): java -version java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode) Why does this now require a module that does not exist? How do I get round the fact it has a dependancy that does not exist? I have tried this on two different setups (both java 1.8 with different update versions) and on both setups you get the same error (one is Windows the other Linux), so I dont believe this is an enviromental problem with the build enviroment. Any help would be most apprciated. Many thanks. Scott --=_51f48feb-e80e-4b03-bb90-9ee65a9a0ecd Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,

I am trying to add log4j2 to an existing pr= oject using Apache Ivy as the dependancy management tool, I get some very i= nteresting results.  Attached is the ivy.xml file that is used (note t= here is no ivysettings.xml, it just uses the standard ones that ivy ships w= ith).

This should bring in the log4j2 core lib.  When you look at what thi= s fetches though you see it gets:

log4j-1.2.17.jar
log4j-api-2.9.0-tests.jar
log4j-c= ore-2.9.0-tests.jar
log4j-slf4j-impl-2.9= .0.jar

So the question is why does it fetch log4j 1.2.17?  This is not req= uired by any other module as if I remove the log4j-core line the jar is not= fetched.  Why are the test artifacts fetched but not the actual jars?=

My = second problem is as I understand I need to also get log4j2 API as this is = required for my application to be logging.  When the following line is= added in:

<dependency org=3D"org.apache.logging.log4j" name=3D"log4j-api" r= ev=3D"2.9.0" />

You get the following error on all build enviroments:

[ivy:retri= eve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retriev= e]          module not found: = org.apache.logging.log4j#log4j-api-java9;2.9.0
[ivy:retrieve]  =3D= =3D=3D=3D local: tried
[ivy:retrieve]    /home/scott/.ivy= 2/local/org.apache.logging.log4j/log4j-api-java9/2.9.0/ivys/ivy.xml
[ivy= :retrieve]    -- artifact org.apache.logging.log4j#log4j-api= -java9;2.9.0!log4j-api-java9.zip:
[ivy:retrieve]    /home= /scott/.ivy2/local/org.apache.logging.log4j/log4j-api-java9/2.9.0/zips/log4= j-api-java9.zip
[ivy:retrieve]  =3D=3D=3D=3D shared: tried
[ivy:= retrieve]    /home/scott/.ivy2/shared/org.apache.logging.log= 4j/log4j-api-java9/2.9.0/ivys/ivy.xml
[ivy:retrieve]    -= - artifact org.apache.logging.log4j#log4j-api-java9;2.9.0!log4j-api-java9.z= ip:
[ivy:retrieve]    /home/scott/.ivy2/shared/org.apache= .logging.log4j/log4j-api-java9/2.9.0/zips/log4j-api-java9.zip
[ivy:retri= eve]  =3D=3D=3D=3D public: tried
[ivy:retrieve]    h= ttps://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api-java9/2.9.= 0/log4j-api-java9-2.9.0.pom
[ivy:retrieve]    -- artifact= org.apache.logging.log4j#log4j-api-java9;2.9.0!log4j-api-java9.zip:
[iv= y:retrieve]    https://repo1.maven.org/maven2/org/apache/log= ging/log4j/log4j-api-java9/2.9.0/log4j-api-java9-2.9.0.zip
[ivy:retrieve= ]          :::::::::::::::::::= :::::::::::::::::::::::::::
[ivy:retrieve]     =      ::        =   UNRESOLVED DEPENDENCIES       &nb= sp; ::
[ivy:retrieve]        &nb= sp; ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] &= nbsp;        :: org.apache.logging.log4j= #log4j-api-java9;2.9.0: not found
[ivy:retrieve]    =       ::::::::::::::::::::::::::::::::::::::::::::= ::
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVE= L FOR MORE DETAILS


This is built using Java= 1.8 (rather than Java 9):

java -version
java version "1.8.0_101"
Java(TM= ) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit S= erver VM (build 25.101-b13, mixed mode)
=

Why= does this now require a module that does not exist?  How do I get rou= nd the fact it has a dependancy that does not exist?  I have tried thi= s on two different setups (both java 1.8 with different update versions) an= d on both setups you get the same error (one is Windows the other Linux), s= o I dont believe this is an enviromental problem with the build enviroment.=

Any= help would be most apprciated.

Many thanks.

Scott
--=_51f48feb-e80e-4b03-bb90-9ee65a9a0ecd-- ------=_Part_13243_1629335400.1532735040719 Content-Type: application/xml; name=ivy.xml Content-Disposition: attachment; filename=ivy.xml Content-Transfer-Encoding: base64 PGl2eS1tb2R1bGUgdmVyc2lvbj0iMi4wIj4NCiAgPGluZm8gb3JnYW5pc2F0aW9uPSJ1ay5jby53 b3JsZHNvZndhciIgbW9kdWxlPSJzaXBzb2MiLz4NCiAgPGRlcGVuZGVuY2llcz4NCiAgICA8ZGVw ZW5kZW5jeSBvcmc9Im9yZy5lY2xpcHNlLmpldHR5IiBuYW1lPSJqZXR0eS1odHRwIiByZXY9Ijku NC45LnYyMDE4MDMyMCIvPg0KICAgIDxkZXBlbmRlbmN5IG9yZz0ib3JnLmVjbGlwc2UuamV0dHki IG5hbWU9ImpldHR5LWFubm90YXRpb25zIiByZXY9IjkuNC45LnYyMDE4MDMyMCIgLz4NCiAgICA8 ZGVwZW5kZW5jeSBvcmc9Im9yZy5lY2xpcHNlLmpldHR5IiBuYW1lPSJqZXR0eS13ZWJhcHAiIHJl dj0iOS40LjkudjIwMTgwMzIwIiAvPg0KICAgIDxkZXBlbmRlbmN5IG9yZz0ib3JnLmZyZWVtYXJr ZXIiIG5hbWU9ImZyZWVtYXJrZXIiIHJldj0iMi4zLjI4IiAvPg0KICAgIDxkZXBlbmRlbmN5IG9y Zz0ib3JnLmdsYXNzZmlzaC5qZXJzZXkuY29yZSIgbmFtZT0iamVyc2V5LXNlcnZlciIgcmV2PSIy LjI3IiAvPg0KICAgIDxkZXBlbmRlbmN5IG9yZz0ib3JnLmdsYXNzZmlzaC5qZXJzZXkuY29udGFp bmVycyIgbmFtZT0iamVyc2V5LWNvbnRhaW5lci1zZXJ2bGV0IiByZXY9IjIuMjciIC8+DQogICAg PGRlcGVuZGVuY3kgb3JnPSJvcmcuZ2xhc3NmaXNoLmplcnNleS5tZWRpYSIgbmFtZT0iamVyc2V5 LW1lZGlhLWpzb24tamFja3NvbiIgcmV2PSIyLjI3IiAvPg0KICAgIDxkZXBlbmRlbmN5IG9yZz0i Y29tLmF1dGgwIiBuYW1lPSJqYXZhLWp3dCIgcmV2PSIzLjMuMCIgLz4NCiAgICA8ZGVwZW5kZW5j eSBvcmc9ImNvbS56YXh4ZXIiIG5hbWU9Ikhpa2FyaUNQIiByZXY9IjMuMS4wIiAvPg0KICAgIDxk ZXBlbmRlbmN5IG9yZz0ib3JnLnBvc3RncmVzcWwiIG5hbWU9InBvc3RncmVzcWwiIHJldj0iNDIu Mi4yIiAvPg0KICAgIDxkZXBlbmRlbmN5IG9yZz0ib3JnLmFwYWNoZS5sb2dnaW5nLmxvZzRqIiBu YW1lPSJsb2c0ai1zbGY0ai1pbXBsIiByZXY9IjIuOS4wIiAvPg0KICAgIDxkZXBlbmRlbmN5IG9y Zz0ib3JnLmFwYWNoZS5sb2dnaW5nLmxvZzRqIiBuYW1lPSJsb2c0ai1jb3JlIiByZXY9IjIuOS4w IiAvPg0KDQoNCg0KICAgIDxleGNsdWRlIG9yZz0iKiIgZXh0PSIqIiB0eXBlPSJzb3VyY2UiIC8+ DQogICAgPGV4Y2x1ZGUgb3JnPSIqIiBleHQ9IioiIHR5cGU9ImphdmFkb2MiIC8+DQogICAgPGV4 Y2x1ZGUgb3JnPSIqIiBleHQ9IioiIHR5cGU9InRlc3RzIiAvPg0KDQogIDwvZGVwZW5kZW5jaWVz Pg0KPC9pdnktbW9kdWxlPg== ------=_Part_13243_1629335400.1532735040719 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org ------=_Part_13243_1629335400.1532735040719--