JSPWIKI-796: replace log4j with log4j2, routing all log4j and slf4j calls to log4j2
diff --git a/jspwiki-210-test-adaptees/pom.xml b/jspwiki-210-test-adaptees/pom.xml
index e5737fb..2ac8f40 100644
--- a/jspwiki-210-test-adaptees/pom.xml
+++ b/jspwiki-210-test-adaptees/pom.xml
@@ -39,6 +39,12 @@
       <artifactId>jspwiki-main</artifactId>
       <version>2.11.0.M6</version>
       <scope>provided</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <dependency>
@@ -47,6 +53,12 @@
       <type>test-jar</type>
       <version>2.11.0.M6</version>
       <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <dependency>
diff --git a/jspwiki-api/pom.xml b/jspwiki-api/pom.xml
index 15f49ea..98acfd3 100644
--- a/jspwiki-api/pom.xml
+++ b/jspwiki-api/pom.xml
@@ -43,8 +43,13 @@
     </dependency>
 
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
     </dependency>
 
     <dependency>
diff --git a/jspwiki-bootstrap/pom.xml b/jspwiki-bootstrap/pom.xml
index 68ef16d..4f0813c 100644
--- a/jspwiki-bootstrap/pom.xml
+++ b/jspwiki-bootstrap/pom.xml
@@ -55,8 +55,13 @@
     </dependency>
 
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
     </dependency>
 
 	<dependency>
diff --git a/jspwiki-event/pom.xml b/jspwiki-event/pom.xml
index e92d9df..5749256 100644
--- a/jspwiki-event/pom.xml
+++ b/jspwiki-event/pom.xml
@@ -31,8 +31,18 @@
 
   <dependencies>
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
     </dependency>
 
     <dependency>
diff --git a/jspwiki-kendra-searchprovider/pom.xml b/jspwiki-kendra-searchprovider/pom.xml
index 7fbfa6c..39df1e7 100644
--- a/jspwiki-kendra-searchprovider/pom.xml
+++ b/jspwiki-kendra-searchprovider/pom.xml
@@ -39,6 +39,11 @@
     </dependency>
 
     <dependency>
+      <groupId>com.amazonaws</groupId>
+      <artifactId>aws-java-sdk-kendra</artifactId>
+    </dependency>
+
+    <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>jspwiki-main</artifactId>
       <type>test-jar</type>
@@ -93,11 +98,5 @@
       <artifactId>stripes</artifactId>
       <scope>test</scope>
     </dependency>
-
-    <dependency>
-      <groupId>com.amazonaws</groupId>
-      <artifactId>aws-java-sdk-kendra</artifactId>
-    </dependency>
-
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/jspwiki-main/pom.xml b/jspwiki-main/pom.xml
index 49a610c..e48b812 100644
--- a/jspwiki-main/pom.xml
+++ b/jspwiki-main/pom.xml
@@ -94,6 +94,11 @@
       <groupId>net.sf.ehcache</groupId>
       <artifactId>ehcache</artifactId>
     </dependency>
+
+    <dependency> <!-- ehcache brings slf4j, so we route it to log4j2 -->
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
     
     <dependency>
       <groupId>oro</groupId>
@@ -106,13 +111,18 @@
     </dependency>
 
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
     </dependency>
 
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
     </dependency>
 
     <dependency>
diff --git a/jspwiki-markdown/pom.xml b/jspwiki-markdown/pom.xml
index 359d874..11e1374 100755
--- a/jspwiki-markdown/pom.xml
+++ b/jspwiki-markdown/pom.xml
@@ -62,8 +62,18 @@
     </dependency>
 
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
     </dependency>
 
     <dependency>
diff --git a/jspwiki-util/pom.xml b/jspwiki-util/pom.xml
index 3aff7c1..c67fbfe 100644
--- a/jspwiki-util/pom.xml
+++ b/jspwiki-util/pom.xml
@@ -57,8 +57,18 @@
     </dependency>
 
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
     </dependency>
 
     <dependency>