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: <dependency org="org.apache.logging.log4j" name="log4j-api" rev="2.9.0" /> 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
ivy.xml
Description: XML document
--------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org