prepare for 2.4.2 release prepare: update some dependencys
diff --git a/pom.xml b/pom.xml
index 47d9e98..ecb1c6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,12 +38,13 @@
<myfaces20.version>2.0.24</myfaces20.version>
<myfaces21.version>2.1.18</myfaces21.version>
<myfaces22.version>2.2.12</myfaces22.version>
+ <myfaces23.version>2.3.6</myfaces23.version>
<mojarra20.version>2.0.11-04</mojarra20.version>
<mojarra21.version>2.1.29-08</mojarra21.version>
<mojarra22.version>2.2.16</mojarra22.version>
- <slf4j.version>1.7.25</slf4j.version>
+ <slf4j.version>1.7.30</slf4j.version>
<logback.version>1.2.3</logback.version>
- <log4j.version>1.2.17</log4j.version>
+ <log4j.version>2.13.0</log4j.version>
<commons-io.version>2.4</commons-io.version>
<commons-lang.version>2.6</commons-lang.version>
<commons-logging.version>1.1.1</commons-logging.version>
@@ -493,9 +494,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.1.0</version>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
+ <version>1.2.2</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
@@ -728,7 +729,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.14</version>
+ <version>1.17</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
@@ -1028,7 +1029,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
- <version>3.3.2</version>
+ <version>5.2.2</version>
<configuration>
<failBuildOnCVSS>0</failBuildOnCVSS>
<suppressionFile>tobago/dependency-check-suppression-for-tobago-2.x.xml</suppressionFile>
diff --git a/tobago-core/pom.xml b/tobago-core/pom.xml
index be2f820..e78356c 100644
--- a/tobago-core/pom.xml
+++ b/tobago-core/pom.xml
@@ -180,6 +180,12 @@
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.3.0</version>
+ </dependency>
<!--dependency>
<groupId>com.google.caliper</groupId>
<artifactId>caliper</artifactId>
diff --git a/tobago-example/pom.xml b/tobago-example/pom.xml
index a1324e7..e706104 100644
--- a/tobago-example/pom.xml
+++ b/tobago-example/pom.xml
@@ -89,7 +89,7 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <version>9.2.13.v20150730</version><!-- Jetty 9.3 requires Java 1.8 -->
+ <version>9.4.26.v20200117</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
</configuration>
@@ -187,8 +187,8 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -221,8 +221,8 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -255,8 +255,42 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <id>myfaces-2.3</id>
+ <activation>
+ <property>
+ <name>jsf</name>
+ <value>myfaces-2.3</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${myfaces23.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${myfaces23.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -289,8 +323,8 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
@@ -318,8 +352,8 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
@@ -347,8 +381,8 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
diff --git a/tobago-example/tobago-example-addressbook-cdi/src/main/resources/log4j.xml b/tobago-example/tobago-example-addressbook-cdi/src/main/resources/log4j.xml
deleted file mode 100644
index fc2922e..0000000
--- a/tobago-example/tobago-example-addressbook-cdi/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration>
-
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Encoding" value="UTF-8"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
- value="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
- <!-- See http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html -->
- </layout>
- </appender>
-
- <category name="org.apache.myfaces.tobago.example.addressbook">
- <priority value="debug" />
- </category>
-
- <root>
- <priority value="info" />
- <appender-ref ref="console" />
- </root>
-
-</log4j:configuration>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp b/tobago-example/tobago-example-addressbook-cdi/src/main/resources/log4j2.xml
similarity index 64%
copy from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
copy to tobago-example/tobago-example-addressbook-cdi/src/main/resources/log4j2.xml
index 83998e9..347d7bd 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
+++ b/tobago-example/tobago-example-addressbook-cdi/src/main/resources/log4j2.xml
@@ -1,4 +1,5 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -13,15 +14,21 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<f:view>
- <tc:page>
- <f:facet name="layout">
- <tc:gridLayout/>
- </f:facet>
- <tc:out value="Hello World"/>
- </tc:page>
-</f:view>
\ No newline at end of file
+-->
+<Configuration>
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
+ </Console>
+ </Appenders>
+
+ <Loggers>
+
+ <Logger name="org.apache.myfaces.tobago.example.addressbook" level="debug"/>
+
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/tobago-example/tobago-example-addressbook/pom.xml b/tobago-example/tobago-example-addressbook/pom.xml
index 17d24aa..d2ef494 100644
--- a/tobago-example/tobago-example-addressbook/pom.xml
+++ b/tobago-example/tobago-example-addressbook/pom.xml
@@ -182,19 +182,21 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>compile</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.12.1.1</version>
@@ -221,8 +223,8 @@
</exclusions>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
diff --git a/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Log4jUtils.java b/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Log4jUtils.java
index aef47b1..0a73062 100644
--- a/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Log4jUtils.java
+++ b/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Log4jUtils.java
@@ -19,30 +19,35 @@
package org.apache.myfaces.tobago.example.addressbook;
-import org.apache.log4j.Appender;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.apache.log4j.spi.LoggerRepository;
import java.util.Enumeration;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.Configuration;
+
public class Log4jUtils {
public static Set<Appender> getAllAppenders() {
- return getAllAppenders(LogManager.getLoggerRepository());
+ return getAllAppenders(((LoggerContext) LogManager.getContext(false)).getConfiguration());
}
/**
* @return all appenders currently in use
+ * @param configuration
*/
- public static Set<Appender> getAllAppenders(final LoggerRepository repository) {
- final Enumeration loggers = repository.getCurrentLoggers();
- final Set<Appender> allAppenders = getAllAppenders(loggers);
- addAppenders(repository.getRootLogger(), allAppenders);
- return allAppenders;
+ public static Set<Appender> getAllAppenders(final Configuration configuration) {
+ Map<String, Appender> appenders = configuration.getAppenders();
+ return new HashSet<Appender>(appenders.values());
+// final Enumeration loggers = configuration.getCurrentLoggers();
+// final Set<Appender> allAppenders = getAllAppenders(loggers);
+// addAppenders(configuration.getRootLogger(), allAppenders);
+// return allAppenders;
}
public static Set<Appender> getAllAppenders(final Enumeration loggers) {
@@ -55,26 +60,26 @@
}
private static void addAppenders(final Logger logger, final Set<Appender> allAppenders) {
- final Enumeration appenders = logger.getAllAppenders();
- while (appenders.hasMoreElements()) {
- final Appender appender = (Appender) appenders.nextElement();
- allAppenders.add(appender);
- }
+// final Enumeration appenders = logger.getAllAppenders();
+// while (appenders.hasMoreElements()) {
+// final Appender appender = (Appender) appenders.nextElement();
+// allAppenders.add(appender);
+// }
}
- public static FileAppender getFileAppender(final String name, final LoggerRepository repository) {
- final Set allAppenders = getAllAppenders(repository);
- for (final Object allAppender : allAppenders) {
- final Appender appender = (Appender) allAppender;
- if (appender instanceof FileAppender) {
- final FileAppender fileAppender = (FileAppender) appender;
- if (fileAppender.getName() != null
- && fileAppender.getName().equals(name)) {
- return fileAppender;
- }
- }
- }
- return null;
- }
+// public static FileAppender getFileAppender(final String name, final LoggerRepository repository) {
+// final Set allAppenders = getAllAppenders(repository);
+// for (final Object allAppender : allAppenders) {
+// final Appender appender = (Appender) allAppender;
+// if (appender instanceof FileAppender) {
+// final FileAppender fileAppender = (FileAppender) appender;
+// if (fileAppender.getName() != null
+// && fileAppender.getName().equals(name)) {
+// return fileAppender;
+// }
+// }
+// }
+// return null;
+// }
}
diff --git a/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/AppenderModel.java b/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/AppenderModel.java
index 47ca2da..be38ff3 100644
--- a/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/AppenderModel.java
+++ b/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/AppenderModel.java
@@ -19,9 +19,10 @@
package org.apache.myfaces.tobago.example.addressbook.web;
-import org.apache.log4j.Appender;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.PatternLayout;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.Layout;
+import org.apache.logging.log4j.core.appender.FileAppender;
+import org.apache.logging.log4j.core.layout.PatternLayout;
public class AppenderModel {
@@ -41,11 +42,11 @@
public String getFile() {
return (appender instanceof FileAppender)
- ? ((FileAppender) appender).getFile() : "";
+ ? ((FileAppender) appender).getFileName() : "";
}
public String getLayout() {
- final org.apache.log4j.Layout layout = appender.getLayout();
+ final Layout layout = appender.getLayout();
if (layout instanceof PatternLayout) {
final PatternLayout patternLayout = (PatternLayout) layout;
return patternLayout.getConversionPattern();
diff --git a/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/CategoryModel.java b/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/CategoryModel.java
index 3521f6f..dea37a6 100644
--- a/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/CategoryModel.java
+++ b/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/CategoryModel.java
@@ -19,18 +19,19 @@
package org.apache.myfaces.tobago.example.addressbook.web;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.config.LoggerConfig;
public class CategoryModel {
- private Logger logger;
+ private LoggerConfig logger;
private String level;
- public CategoryModel(final Logger logger) {
+ public CategoryModel(final LoggerConfig logger) {
this.logger = logger;
}
- public Logger getLogger() {
+ public LoggerConfig getLogger() {
return logger;
}
@@ -56,7 +57,7 @@
private String getLevelFromLogger() {
return isInherited()
- ? logger.getEffectiveLevel().toString()
+ ? LogManager.getRootLogger().getLevel().toString()
: logger.getLevel().toString();
}
diff --git a/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/LoggingController.java b/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/LoggingController.java
index 0978798..c77cb35 100644
--- a/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/LoggingController.java
+++ b/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/LoggingController.java
@@ -19,17 +19,9 @@
package org.apache.myfaces.tobago.example.addressbook.web;
-import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Appender;
-import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
import org.apache.myfaces.tobago.component.UIIn;
import org.apache.myfaces.tobago.example.addressbook.Log4jUtils;
import org.apache.myfaces.tobago.model.SelectItem;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
@@ -39,10 +31,22 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
-import java.util.Enumeration;
import java.util.List;
+import java.util.Map;
import java.util.Set;
+import org.apache.commons.io.IOUtils;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
@Component("logging")
@Scope("session")
public class LoggingController {
@@ -76,21 +80,21 @@
}
private void initCategories() {
- categories.clear();
- final Enumeration enumeration = LogManager.getCurrentLoggers();
- while (enumeration.hasMoreElements()) {
- final org.apache.log4j.Logger logger = (org.apache.log4j.Logger) enumeration.nextElement();
- categories.add(new CategoryModel(logger));
- }
- categories.add(new CategoryModel(LogManager.getRootLogger()));
+ categories.clear();
+ Configuration configuration = ((LoggerContext) LogManager.getContext(false)).getConfiguration();
+ Map<String, LoggerConfig> loggers = configuration.getLoggers();
+ for (LoggerConfig loggerConfig : loggers.values()) {
+ categories.add(new CategoryModel(loggerConfig));
+ }
+ categories.add(new CategoryModel(configuration.getRootLogger()));
- Collections.sort(categories, new Comparator<CategoryModel>() {
- public int compare(final CategoryModel c1, final CategoryModel c2) {
- final org.apache.log4j.Logger l1 = c1.getLogger();
- final org.apache.log4j.Logger l2 = c2.getLogger();
- return l1.getName().compareTo(l2.getName());
- }
- });
+ Collections.sort(categories, new Comparator<CategoryModel>() {
+ public int compare(final CategoryModel c1, final CategoryModel c2) {
+ final LoggerConfig l1 = c1.getLogger();
+ final LoggerConfig l2 = c2.getLogger();
+ return l1.getName().compareTo(l2.getName());
+ }
+ });
}
private void initAppenders() {
@@ -117,24 +121,32 @@
boolean update = false;
for (final CategoryModel category : categories) {
if (category.isLevelUpdated()) {
- final org.apache.log4j.Logger logger = getLogger(category.getName());
+ final LoggerConfig logger = getLogger(category.getName());
logger.setLevel(Level.toLevel(category.getLevel()));
update = true;
}
}
if (update) {
- initCategories();
+ ((LoggerContext) LogManager.getContext(false)).updateLoggers();
+ initCategories();
}
return null;
}
public String addCategory() {
- LOG.debug("debug");
- LOG.trace("trace");
- final org.apache.log4j.Logger logger = getLogger(category);
- logger.setLevel(Level.toLevel(level));
- initCategories();
- return null;
+ LOG.debug("debug");
+ LOG.trace("trace");
+ Configuration configuration = ((LoggerContext) LogManager.getContext(false)).getConfiguration();
+ final LoggerConfig loggerConfig = getLogger(category);
+ LoggerConfig specificConfig = loggerConfig;
+ if (!loggerConfig.getName().equals(category)) {
+ specificConfig = new LoggerConfig(category, Level.toLevel(level, (Level) null), true);
+ specificConfig.setParent(loggerConfig);
+ configuration.addLogger(category, specificConfig);
+ }
+ ((LoggerContext) LogManager.getContext(false)).updateLoggers();
+ initCategories();
+ return null;
}
public String selectCategory() {
@@ -143,10 +155,11 @@
return null;
}
- private org.apache.log4j.Logger getLogger(final String category) {
- return ("root".equals(category))
- ? LogManager.getRootLogger()
- : LogManager.getLogger(category);
+ private LoggerConfig getLogger(final String category) {
+ Configuration configuration = ((LoggerContext) LogManager.getContext(false)).getConfiguration();
+ return ("root".equals(category))
+ ? configuration.getRootLogger()
+ : configuration.getLoggerConfig(category);
}
public List<AppenderModel> getAppenders() {
diff --git a/tobago-example/tobago-example-addressbook/src/main/resources/log4j.xml b/tobago-example/tobago-example-addressbook/src/main/resources/log4j.xml
deleted file mode 100644
index fc2922e..0000000
--- a/tobago-example/tobago-example-addressbook/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration>
-
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Encoding" value="UTF-8"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
- value="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
- <!-- See http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html -->
- </layout>
- </appender>
-
- <category name="org.apache.myfaces.tobago.example.addressbook">
- <priority value="debug" />
- </category>
-
- <root>
- <priority value="info" />
- <appender-ref ref="console" />
- </root>
-
-</log4j:configuration>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp b/tobago-example/tobago-example-addressbook/src/main/resources/log4j2.xml
similarity index 64%
copy from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
copy to tobago-example/tobago-example-addressbook/src/main/resources/log4j2.xml
index 83998e9..347d7bd 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
+++ b/tobago-example/tobago-example-addressbook/src/main/resources/log4j2.xml
@@ -1,4 +1,5 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -13,15 +14,21 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<f:view>
- <tc:page>
- <f:facet name="layout">
- <tc:gridLayout/>
- </f:facet>
- <tc:out value="Hello World"/>
- </tc:page>
-</f:view>
\ No newline at end of file
+-->
+<Configuration>
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
+ </Console>
+ </Appenders>
+
+ <Loggers>
+
+ <Logger name="org.apache.myfaces.tobago.example.addressbook" level="debug"/>
+
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/tobago-example/tobago-example-blank/pom.xml b/tobago-example/tobago-example-blank/pom.xml
index 678ee27..51af4af 100644
--- a/tobago-example/tobago-example-blank/pom.xml
+++ b/tobago-example/tobago-example-blank/pom.xml
@@ -33,17 +33,25 @@
<dependencies>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>runtime</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+
+
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
diff --git a/tobago-example/tobago-example-blank/src/main/resources/log4j.xml b/tobago-example/tobago-example-blank/src/main/resources/log4j.xml
deleted file mode 100644
index 4478c9e..0000000
--- a/tobago-example/tobago-example-blank/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration>
-
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Encoding" value="UTF-8" />
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
- value="%d{yyyy-MM-dd HH:mm:ss} %-5p - %c:%L - %m%n"/>
- <!--
- %d{...} date pattern
- %p priority
- %m log message
- %n newline
- -5 fill with spaces (5)
-
- For more options see class org.apache.log4j.PatternLayout.
- -->
- </layout>
- </appender>
-
- <root>
- <priority value="info" />
- <appender-ref ref="console" />
- </root>
-
-</log4j:configuration>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp b/tobago-example/tobago-example-blank/src/main/resources/log4j2.xml
similarity index 64%
copy from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
copy to tobago-example/tobago-example-blank/src/main/resources/log4j2.xml
index 83998e9..347d7bd 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
+++ b/tobago-example/tobago-example-blank/src/main/resources/log4j2.xml
@@ -1,4 +1,5 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -13,15 +14,21 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<f:view>
- <tc:page>
- <f:facet name="layout">
- <tc:gridLayout/>
- </f:facet>
- <tc:out value="Hello World"/>
- </tc:page>
-</f:view>
\ No newline at end of file
+-->
+<Configuration>
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
+ </Console>
+ </Appenders>
+
+ <Loggers>
+
+ <Logger name="org.apache.myfaces.tobago.example.addressbook" level="debug"/>
+
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp b/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
similarity index 75%
rename from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
rename to tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
index 83998e9..08d2700 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
+++ b/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
@@ -1,4 +1,6 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -13,15 +15,17 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<f:view>
- <tc:page>
+-->
+
+<f:view xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:tx="http://myfaces.apache.org/tobago/extension"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<tc:page>
<f:facet name="layout">
<tc:gridLayout/>
</f:facet>
<tc:out value="Hello World"/>
</tc:page>
-</f:view>
\ No newline at end of file
+</f:view>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/index.jsp b/tobago-example/tobago-example-blank/src/main/webapp/index.jsp
index 68ca755..c3cff2d 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/index.jsp
+++ b/tobago-example/tobago-example-blank/src/main/webapp/index.jsp
@@ -14,4 +14,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
--%>
-<jsp:forward page="faces/helloWorld.jsp" />;
+<jsp:forward page="faces/helloWorld.xhtml" />;
diff --git a/tobago-example/tobago-example-demo/pom.xml b/tobago-example/tobago-example-demo/pom.xml
index 59107f8..7ef88b6 100644
--- a/tobago-example/tobago-example-demo/pom.xml
+++ b/tobago-example/tobago-example-demo/pom.xml
@@ -117,13 +117,19 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>runtime</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>oro</groupId>
diff --git a/tobago-example/tobago-example-demo/src/main/resources/log4j.xml b/tobago-example/tobago-example-demo/src/main/resources/log4j.xml
deleted file mode 100644
index 1a86791..0000000
--- a/tobago-example/tobago-example-demo/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration>
-
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Encoding" value="UTF-8"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
- value="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
- <!-- See http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html -->
- </layout>
- </appender>
-
-<!-- <category name="org.apache.commons">-->
-<!-- <priority value="info" />-->
-<!-- </category>-->
-
-<!-- <category name="org.apache.myfaces.tobago.example.demo">-->
-<!-- <priority value="debug" />-->
-<!-- </category>-->
-
-<!-- <category name="org.apache.myfaces.tobago.overview">-->
-<!-- <priority value="debug" />-->
-<!-- </category>-->
-
-<!--
- <category name="org.apache.myfaces.tobago.internal.layout.LayoutContext">
- <priority value="debug" />
- </category>
--->
-
-<!-- <category name="org.apache.catalina.core.ApplicationDispatcher">-->
-<!-- <priority value="debug" />-->
-<!-- </category>-->
-
- <!--<category name="org.apache.myfaces.tobago.overview">-->
- <!--<priority value="debug" />-->
- <!--</category>-->
-
-<!--
- <category name="org.apache.myfaces.tobago.internal.context.ResourceManagerImpl">
- <priority value="debug" />
- </category>
--->
-
-<!--
- <category name="org.apache.myfaces.tobago.event">
- <priority value="error" />
- </category>
-
- <category name="org.apache.myfaces.tobago.renderkit.CommandRendererBase">
- <priority value="error" />
- </category>
--->
-
-<!--
- <category name="org.apache.myfaces.tobago.internal.util.AccessKeyLogger">
- <priority value="debug" />
- </category>
--->
-
- <root>
- <priority value="info" />
- <appender-ref ref="console" />
- </root>
-
-</log4j:configuration>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp b/tobago-example/tobago-example-demo/src/main/resources/log4j2.xml
similarity index 64%
copy from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
copy to tobago-example/tobago-example-demo/src/main/resources/log4j2.xml
index 83998e9..347d7bd 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
+++ b/tobago-example/tobago-example-demo/src/main/resources/log4j2.xml
@@ -1,4 +1,5 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -13,15 +14,21 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<f:view>
- <tc:page>
- <f:facet name="layout">
- <tc:gridLayout/>
- </f:facet>
- <tc:out value="Hello World"/>
- </tc:page>
-</f:view>
\ No newline at end of file
+-->
+<Configuration>
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
+ </Console>
+ </Appenders>
+
+ <Loggers>
+
+ <Logger name="org.apache.myfaces.tobago.example.addressbook" level="debug"/>
+
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/tobago-example/tobago-example-portlet/src/main/resources/log4j.xml b/tobago-example/tobago-example-portlet/src/main/resources/log4j.xml
deleted file mode 100644
index 934115a..0000000
--- a/tobago-example/tobago-example-portlet/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration>
-
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Encoding" value="UTF-8" />
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
- value="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
- <!--
- %d{...} date pattern
- %p priority
- %m log message
- %n newline
- -5 fill with spaces (5)
-
- For more options see class org.apache.log4j.PatternLayout.
- http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html
- -->
- </layout>
- </appender>
-
- <root>
- <priority value="info" />
- <appender-ref ref="console" />
- </root>
-
-</log4j:configuration>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp b/tobago-example/tobago-example-portlet/src/main/resources/log4j2.xml
similarity index 64%
copy from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
copy to tobago-example/tobago-example-portlet/src/main/resources/log4j2.xml
index 83998e9..347d7bd 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
+++ b/tobago-example/tobago-example-portlet/src/main/resources/log4j2.xml
@@ -1,4 +1,5 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -13,15 +14,21 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<f:view>
- <tc:page>
- <f:facet name="layout">
- <tc:gridLayout/>
- </f:facet>
- <tc:out value="Hello World"/>
- </tc:page>
-</f:view>
\ No newline at end of file
+-->
+<Configuration>
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
+ </Console>
+ </Appenders>
+
+ <Loggers>
+
+ <Logger name="org.apache.myfaces.tobago.example.addressbook" level="debug"/>
+
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/tobago-example/tobago-example-sandbox/pom.xml b/tobago-example/tobago-example-sandbox/pom.xml
index 6c7bb9d..802e752 100644
--- a/tobago-example/tobago-example-sandbox/pom.xml
+++ b/tobago-example/tobago-example-sandbox/pom.xml
@@ -36,17 +36,25 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>runtime</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
+
+
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>javax.servlet.jsp.jstl-api</artifactId>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
diff --git a/tobago-example/tobago-example-sandbox/src/main/resources/log4j.xml b/tobago-example/tobago-example-sandbox/src/main/resources/log4j.xml
deleted file mode 100644
index fe0bf1d..0000000
--- a/tobago-example/tobago-example-sandbox/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration>
-
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Encoding" value="UTF-8" />
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
- value="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
- <!--
- %d{...} date pattern
- %p priority
- %m log message
- %n newline
- -5 fill with spaces (5)
-
- For more options see class org.apache.log4j.PatternLayout.
- http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html
- -->
- </layout>
- </appender>
-
- <!--<category name="org.apache.myfaces.tobago.internal.context.ResourceLocator">-->
- <!--<priority value="info"/>-->
- <!--</category>-->
-
- <root>
- <priority value="info" />
- <appender-ref ref="console" />
- </root>
-
-</log4j:configuration>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp b/tobago-example/tobago-example-sandbox/src/main/resources/log4j2.xml
similarity index 64%
copy from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
copy to tobago-example/tobago-example-sandbox/src/main/resources/log4j2.xml
index 83998e9..347d7bd 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
+++ b/tobago-example/tobago-example-sandbox/src/main/resources/log4j2.xml
@@ -1,4 +1,5 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -13,15 +14,21 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<f:view>
- <tc:page>
- <f:facet name="layout">
- <tc:gridLayout/>
- </f:facet>
- <tc:out value="Hello World"/>
- </tc:page>
-</f:view>
\ No newline at end of file
+-->
+<Configuration>
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
+ </Console>
+ </Appenders>
+
+ <Loggers>
+
+ <Logger name="org.apache.myfaces.tobago.example.addressbook" level="debug"/>
+
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/tobago-example/tobago-example-security/pom.xml b/tobago-example/tobago-example-security/pom.xml
index 0f2059c..65e1ee1 100644
--- a/tobago-example/tobago-example-security/pom.xml
+++ b/tobago-example/tobago-example-security/pom.xml
@@ -42,9 +42,19 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>runtime</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<properties>
diff --git a/tobago-example/tobago-example-test/pom.xml b/tobago-example/tobago-example-test/pom.xml
index 20f99d4..36333bd 100644
--- a/tobago-example/tobago-example-test/pom.xml
+++ b/tobago-example/tobago-example-test/pom.xml
@@ -173,16 +173,20 @@
</dependency>
<!-- END replace tomahawk20 excluded dependencies -->
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>runtime</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ <scope>provided</scope>
</dependency>
-<!--
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
--->
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
diff --git a/tobago-example/tobago-example-test/src/main/resources/log4j.xml b/tobago-example/tobago-example-test/src/main/resources/log4j.xml
deleted file mode 100644
index a66e5c8..0000000
--- a/tobago-example/tobago-example-test/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration>
-
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Encoding" value="UTF-8"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
- value="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
- <!-- See http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html -->
- </layout>
- </appender>
-
- <category name="org.apache.myfaces.tobago.example.test">
- <priority value="debug" />
- </category>
-
-<!--
- <category name="org.apache.myfaces.tobago.internal.layout.LayoutContext">
- <priority value="debug" />
- </category>
--->
-
- <root>
- <priority value="info" />
- <appender-ref ref="console" />
- </root>
-
-</log4j:configuration>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp b/tobago-example/tobago-example-test/src/main/resources/log4j2.xml
similarity index 64%
copy from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
copy to tobago-example/tobago-example-test/src/main/resources/log4j2.xml
index 83998e9..347d7bd 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.jsp
+++ b/tobago-example/tobago-example-test/src/main/resources/log4j2.xml
@@ -1,4 +1,5 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -13,15 +14,21 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<f:view>
- <tc:page>
- <f:facet name="layout">
- <tc:gridLayout/>
- </f:facet>
- <tc:out value="Hello World"/>
- </tc:page>
-</f:view>
\ No newline at end of file
+-->
+<Configuration>
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss} %-5p %-50.50c:%-20.20M:%-4.4L %m%n"/>
+ </Console>
+ </Appenders>
+
+ <Loggers>
+
+ <Logger name="org.apache.myfaces.tobago.example.addressbook" level="debug"/>
+
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/tobago-tool/tobago-theme-plugin/pom.xml b/tobago-tool/tobago-theme-plugin/pom.xml
index 3caaf9a..b65b0d1 100644
--- a/tobago-tool/tobago-theme-plugin/pom.xml
+++ b/tobago-tool/tobago-theme-plugin/pom.xml
@@ -51,12 +51,12 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
- <version>2.4.1</version>
+ <version>3.5.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>2.0.6</version>
+ <version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
diff --git a/tobago-tool/tobago-theme-plugin/src/main/java/org/apache/myfaces/tobago/maven/plugin/UnPackThemeMojo.java b/tobago-tool/tobago-theme-plugin/src/main/java/org/apache/myfaces/tobago/maven/plugin/UnPackThemeMojo.java
index caf13a4..cfe538d 100644
--- a/tobago-tool/tobago-theme-plugin/src/main/java/org/apache/myfaces/tobago/maven/plugin/UnPackThemeMojo.java
+++ b/tobago-tool/tobago-theme-plugin/src/main/java/org/apache/myfaces/tobago/maven/plugin/UnPackThemeMojo.java
@@ -25,8 +25,6 @@
import org.codehaus.plexus.archiver.UnArchiver;
import org.codehaus.plexus.archiver.manager.ArchiverManager;
import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
-import org.codehaus.plexus.archiver.zip.ZipEntry;
-import org.codehaus.plexus.archiver.zip.ZipFile;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.ReaderFactory;
@@ -44,6 +42,8 @@
import java.util.Iterator;
import java.util.Locale;
import java.util.Properties;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
/**
* @goal resources
@@ -87,7 +87,7 @@
ZipFile zip = null;
try {
zip = new ZipFile(jarFile);
- final Enumeration files = zip.getEntries();
+ final Enumeration files = zip.entries();
while (files.hasMoreElements()) {
final ZipEntry nextEntry = (ZipEntry) files.nextElement();
if (nextEntry == null || nextEntry.isDirectory()) {
diff --git a/tobago-tool/tobago-tool-apt/pom.xml b/tobago-tool/tobago-tool-apt/pom.xml
index bee877f..bfdce61 100644
--- a/tobago-tool/tobago-tool-apt/pom.xml
+++ b/tobago-tool/tobago-tool-apt/pom.xml
@@ -80,7 +80,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>2.0.6</version>
+ <version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>