You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Georg Kallidis <ge...@cedis.fu-berlin.de> on 2018/11/05 14:24:13 UTC
Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
just another thought: Why not better migrate to log4j2 ? Does anyone
object? This may be appropriate as we support per default servlet 3 now.
If we do this, we have to remove usage of property/domconfigurator, but we
get a (much) more flexible subsitution engine.
-Georg
Von: "Georg Kallidis" <ge...@cedis.fu-berlin.de>
An: "Turbine Developers List" <de...@turbine.apache.org>
Datum: 01.11.2018 15:39
Betreff: Re: Re: svn commit: r1845337 - in /turbine/core/trunk: ./
conf/ conf/test/ src/assembly/ src/changes/ src/java/org/apache/turbine/
src/java/org/apache/turbine/modules/screens/
src/test-cactus/testapp/WEB-INF/conf/ src/test/org/apache/turbine/test/
Hi Jeffery,
sorry, I only now realize, that I have to resolve the applicationroot in
xml. A system property would resolve things by itself, but we have to
configure it application speicifc (could be done by configuring webapproot
with Spring).
Bit if we just want to allow it happen in the same way as for the
log4j.properties file (using ${applicationroot}, we may just replace it in
code before providing input to the log4j domconfigurator.
If we do not want to replace the original, we should copy it e.g.
(log4j-gen.xml). Another option would be to activate watching, replace the
original, which I do not really like to do.
BTW: loggingRoot seems to be removed altogether, which should be reflected
in javadoc/code comments in Turbine.
Best regards, Georg
Von: Jeffery Painter <je...@jivecast.com>
An: dev@turbine.apache.org
Datum: 31.10.2018 17:27
Betreff: Re: svn commit: r1845337 - in /turbine/core/trunk: ./
conf/ conf/test/ src/assembly/ src/changes/ src/java/org/apache/turbine/
src/java/org/apache/turbine/modules/screens/
src/test-cactus/testapp/WEB-INF/conf/ src/test/org/apache/turbine/test/
Hi Georg,
I tried to change the archetype to use the log4j.xml but I was having
some trouble getting it working... if you have time to take a look at
it, that would be great.
I fixed some of the versioning info, but I left the log4j.properties as
it was (it seems to still be working as is with your latest commits). I
also updated the changes file. Thanks for adding the notes from my
changes in turbine/core :-)
I will try to remember to stay on top of that in the future.
Thanks!
Jeff
On 10/31/18 11:07 AM, gk@apache.org wrote:
> Author: gk
> Date: Wed Oct 31 15:07:41 2018
> New Revision: 1845337
>
> URL: http://svn.apache.org/viewvc?rev=1845337&view=rev
> Log:
> - Updating to Turbine Parent 5
> - fix cobertura single report
> - fix docLint for javadoc 3.x
> - fix CVE, exclude in pom
> - use log4j.xml
>
>
> Added:
> turbine/core/trunk/conf/log4j.xml (with props)
> turbine/core/trunk/conf/test/log4j.xml (with props)
> Modified:
> turbine/core/trunk/conf/test/CompleteTurbineResources.properties
> turbine/core/trunk/conf/test/TemplateService.properties
> turbine/core/trunk/conf/test/TestFulcrumComponents.properties
>
turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
> turbine/core/trunk/conf/test/usersettings.properties
> turbine/core/trunk/pom.xml
> turbine/core/trunk/src/assembly/binaries.xml
> turbine/core/trunk/src/changes/changes.xml
> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>
turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
>
> Added: turbine/core/trunk/conf/log4j.xml
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/conf/log4j.xml?rev=1845337&view=auto
>
==============================================================================
> --- turbine/core/trunk/conf/log4j.xml (added)
> +++ turbine/core/trunk/conf/log4j.xml Wed Oct 31 15:07:41 2018
> @@ -0,0 +1,81 @@
> +<?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 xmlns:log4j="http://jakarta.apache.org/log4j/">
> + <appender name="avalon" class="org.apache.log4j.FileAppender">
> + <param name="append" value="false"/>
> + <param name="file" value="${applicationRoot}/logs/avalon.log"/>
> + <layout class="org.apache.log4j.PatternLayout">
> + <param name="conversionPattern" value="%d [%t] %-5p %c -
%m%n"/>
> + </layout>
> + </appender>
> + <appender name="scheduler" class="org.apache.log4j.FileAppender">
> + <param name="append" value="false"/>
> + <param name="file"
value="${applicationRoot}/logs/scheduler.log"/>
> + <layout class="org.apache.log4j.PatternLayout">
> + <param name="conversionPattern" value="%d [%t] %-5p %c -
%m%n"/>
> + </layout>
> + </appender>
> + <appender name="torque" class="org.apache.log4j.FileAppender">
> + <param name="append" value="false"/>
> + <param name="file" value="${applicationRoot}/logs/torque.log"/>
> + <layout class="org.apache.log4j.PatternLayout">
> + <param name="conversionPattern" value="%d [%t] %-5p %c -
%m%n"/>
> + </layout>
> + </appender>
> + <appender name="turbine" class="org.apache.log4j.FileAppender">
> + <param name="append" value="false"/>
> + <param name="file"
value="${applicationRoot}/logs/turbine.log"/>
> + <layout class="org.apache.log4j.PatternLayout">
> + <param name="conversionPattern" value="%d [%t] %-5p %c -
%m%n"/>
> + </layout>
> + </appender>
> + <appender name="velocity" class="org.apache.log4j.FileAppender">
> + <param name="append" value="false"/>
> + <param name="file"
value="${applicationRoot}/logs/velocity.log"/>
> + <layout class="org.apache.log4j.PatternLayout">
> + <param name="conversionPattern" value="%d [%t] %-5p %c -
%m%n"/>
> + </layout>
> + </appender>
> + <logger name="avalon" additivity="false">
> + <level value="INFO"/>
> + <appender-ref ref="avalon"/>
> + </logger>
> + <logger name="org.apache.torque" additivity="false">
> + <level value="INFO"/>
> + <appender-ref ref="torque"/>
> + </logger>
> + <logger name="org.apache.turbine" additivity="false">
> + <level value="INFO"/>
> + <appender-ref ref="turbine"/>
> + </logger>
> + <logger name="scheduler" additivity="false">
> + <level value="INFO"/>
> + <appender-ref ref="scheduler"/>
> + </logger>
> + <logger name="velocity" additivity="false">
> + <level value="INFO"/>
> + <appender-ref ref="velocity"/>
> + </logger>
> + <root>
> + <level value="INFO"/>
> + <appender-ref ref="turbine"/>
> + </root>
> +</log4j:configuration>
> \ No newline at end of file
>
> Propchange: turbine/core/trunk/conf/log4j.xml
>
------------------------------------------------------------------------------
> svn:eol-style = native
>
> Modified:
turbine/core/trunk/conf/test/CompleteTurbineResources.properties
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/CompleteTurbineResources.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> --- turbine/core/trunk/conf/test/CompleteTurbineResources.properties
(original)
> +++ turbine/core/trunk/conf/test/CompleteTurbineResources.properties Wed
Oct 31 15:07:41 2018
> @@ -23,7 +23,7 @@ pipeline.default.descriptor = /conf/turb
> #
> # -------------------------------------------------------------------
>
> -log4j.file = Log4j.properties
> +log4j.file = log4j.xml
>
> # -------------------------------------------------------------------
> #
>
> Modified: turbine/core/trunk/conf/test/TemplateService.properties
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TemplateService.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> --- turbine/core/trunk/conf/test/TemplateService.properties (original)
> +++ turbine/core/trunk/conf/test/TemplateService.properties Wed Oct 31
15:07:41 2018
> @@ -15,7 +15,7 @@
> # specific language governing permissions and limitations
> # under the License.
>
> -log4j.file = Log4j.properties
> +log4j.file = log4j.xml
> #log4j.file = none
> # or resolve relatively e.g.
> #log4j.file = ../../conf/Log4j.properties
>
> Modified: turbine/core/trunk/conf/test/TestFulcrumComponents.properties
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TestFulcrumComponents.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> --- turbine/core/trunk/conf/test/TestFulcrumComponents.properties
(original)
> +++ turbine/core/trunk/conf/test/TestFulcrumComponents.properties Wed
Oct 31 15:07:41 2018
> @@ -21,7 +21,7 @@
> #
> # -------------------------------------------------------------------
>
> -log4j.file = Log4j.properties
> +log4j.file = log4j.xml
> # context path: cft. javax.servlet.ServletContext.getResource(String)
> pipeline.default.descriptor = conf/turbine-classic-pipeline.xml
>
>
> Modified:
turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> ---
turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
(original)
> +++
turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
Wed Oct 31 15:07:41 2018
> @@ -21,7 +21,7 @@
> #
> # -------------------------------------------------------------------
>
> -log4j.file = Log4j.properties
> +log4j.file = log4j.xml.properties
>
> # resource relative to context
> pipeline.default.descriptor = /conf/turbine-classic-pipeline.xml
>
> Added: turbine/core/trunk/conf/test/log4j.xml
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/log4j.xml?rev=1845337&view=auto
>
==============================================================================
> --- turbine/core/trunk/conf/test/log4j.xml (added)
> +++ turbine/core/trunk/conf/test/log4j.xml Wed Oct 31 15:07:41 2018
> @@ -0,0 +1,37 @@
> +<?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 debug="false" xmlns:log4j="
http://jakarta.apache.org/log4j/">
> + <appender name="logfile" class="org.apache.log4j.FileAppender">
> + <param name="append" value="false"/>
> + <param name="File" value="target/turbine.log"/>
> + <layout class="org.apache.log4j.PatternLayout">
> + <param name="conversionPattern" value="%d [%t] %-5p %c -
%m%n"/>
> + </layout>
> + </appender>
> + <logger name="org.apache.turbine" additivity="false">
> + <level value="DEBUG"/>
> + <appender-ref ref="logfile"/>
> + </logger>
> + <root>
> + <level value="ERROR"/>
> + <appender-ref ref="logfile"/>
> + </root>
> +</log4j:configuration>
> \ No newline at end of file
>
> Propchange: turbine/core/trunk/conf/test/log4j.xml
>
------------------------------------------------------------------------------
> svn:eol-style = native
>
> Modified: turbine/core/trunk/conf/test/usersettings.properties
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/usersettings.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> --- turbine/core/trunk/conf/test/usersettings.properties (original)
> +++ turbine/core/trunk/conf/test/usersettings.properties Wed Oct 31
15:07:41 2018
> @@ -1,4 +1,4 @@
> -log4j.file = Log4j.properties
> +log4j.file = log4j.xml
> # or resolve relatively
> #log4j.file = ../../conf/Log4j.properties
> module.cache=false
>
> Modified: turbine/core/trunk/pom.xml
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/pom.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> --- turbine/core/trunk/pom.xml (original)
> +++ turbine/core/trunk/pom.xml Wed Oct 31 15:07:41 2018
> @@ -823,6 +823,17 @@
> <aggregate>false</aggregate>
> </configuration>
> </plugin>
> + <plugin><!-- since 2.7 running the old report requires to
register it explicitely, otherwise the build may fail -->
> + <groupId>org.codehaus.mojo</groupId>
> + <artifactId>cobertura-maven-plugin</artifactId>
> + <reportSets>
> + <reportSet>
> + <reports>
> + <report>cobertura</report>
> + </reports>
> + </reportSet>
> + </reportSets>
> + </plugin>
> </plugins>
> </reporting>
>
> @@ -944,8 +955,17 @@
> <groupId>avalon-logkit</groupId>
> <artifactId>avalon-logkit</artifactId>
> </exclusion>
> + <exclusion> <!-- exclude this to exclude beanutils v1.8.0 ->
CVE-2014-0114 -->
> + <groupId>commons-configuration</groupId>
> + <artifactId>commons-configuration</artifactId>
> + </exclusion>
> </exclusions>
> </dependency>
> + <dependency> <!-- include more modern version just for
torque-runtime v4.0 -->
> + <groupId>commons-configuration</groupId>
> + <artifactId>commons-configuration</artifactId>
> + <version>1.10</version>
> + </dependency>
> <!-- using snapshot, until released -->
> <dependency>
> <groupId>org.apache.fulcrum</groupId>
> @@ -1098,8 +1118,8 @@
> <configuration>
> <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
> <descriptors>
> - <descriptor>src/assembly/binaries.xml</descriptor>
> - <descriptor>src/assembly/source.xml</descriptor>
> + <descriptor>./src/assembly/binaries.xml</descriptor>
> + <descriptor>./src/assembly/source.xml</descriptor>
> </descriptors>
> <tarLongFileFormat>gnu</tarLongFileFormat>
> </configuration>
> @@ -1110,14 +1130,13 @@
> </build>
> <properties>
> <dependency.check.skip>false</dependency.check.skip>
> + <doclint>none</doclint><!-- since javadoc v.3 this is the
reuqired instead of -Xdoclint:none, remove if turbine parent is correct
again using profile java8 -->
> </properties>
> </profile>
> </profiles>
>
> <properties>
> - <maven.compiler.source>1.8</maven.compiler.source>
> - <maven.compiler.target>1.8</maven.compiler.target>
> -
> + <!-- maven.compiler setting in turbine parent -->
> <!-- TODO: Change for release -->
> <turbine.site.path>turbine/turbine-5.0</turbine.site.path>
> <fulcrum.intake>2.0.0-SNAPSHOT</fulcrum.intake>
>
> Modified: turbine/core/trunk/src/assembly/binaries.xml
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/src/assembly/binaries.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> --- turbine/core/trunk/src/assembly/binaries.xml (original)
> +++ turbine/core/trunk/src/assembly/binaries.xml Wed Oct 31 15:07:41
2018
> @@ -71,6 +71,7 @@
> <include>roleConfiguration.xml</include>
> <include>turbine-classic-pipeline.xml</include>
> <include>Log4j.properties</include>
> + <include>log4j.xml</include>
> <include>TurbineResources.properties</include>
> </includes>
> </fileSet>
>
> Modified: turbine/core/trunk/src/changes/changes.xml
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/src/changes/changes.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> --- turbine/core/trunk/src/changes/changes.xml (original)
> +++ turbine/core/trunk/src/changes/changes.xml Wed Oct 31 15:07:41 2018
> @@ -25,6 +25,9 @@
>
> <body>
> <release version="5.0" date="in Subversion">
> + <action type="update" dev="jp">
> + Update from lang to commons lang3
> + </action>
> <action type="add" dev="tv">
> Add ServiceBroker.getApplicationRoot() to allow services to get
their root directory
> </action>
>
> Modified:
turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> --- turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
(original)
> +++ turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
Wed Oct 31 15:07:41 2018
> @@ -51,7 +51,7 @@ public interface TurbineConstants
> String LOG4J_CONFIG_FILE = "log4j.file";
>
> /** The default value for the Log4J File */
> - String LOG4J_CONFIG_FILE_DEFAULT =
"/WEB-INF/conf/Log4j.properties";
> + String LOG4J_CONFIG_FILE_DEFAULT =
"/WEB-INF/conf/log4j.xml";
>
> /** This is the default log file to be used for logging
*/
> String DEFAULT_LOGGER = "turbine";
>
> Modified:
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> ---
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
(original)
> +++
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
Wed Oct 31 15:07:41 2018
> @@ -22,8 +22,6 @@ package org.apache.turbine.modules.scree
> import java.io.OutputStreamWriter;
> import java.io.PrintWriter;
>
> -import javax.servlet.http.HttpServletRequest;
> -
> import org.apache.turbine.pipeline.PipelineData;
> import org.apache.turbine.util.RunData;
> import org.slf4j.Logger;
> @@ -101,14 +99,12 @@ public class PlainJSONScreen extends Raw
> protected void doOutput(PipelineData pipelineData) throws Exception
> {
> RunData data = getRunData(pipelineData);
> -
> - HttpServletRequest request = data.getRequest();
> // read in json!
> String charset = "UTF-8"; //request.getCharacterEncoding();
>
> String json_res =data.getMessage();
>
> - log.debug( "json_res output:" +json_res );
> + log.debug( "json_res output: {}", json_res );
> PrintWriter out = new PrintWriter(
> new
OutputStreamWriter(data.getResponse().getOutputStream(),charset));
> out.print(json_res.toString());
>
> Modified:
turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> ---
turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
(original)
> +++
turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
Wed Oct 31 15:07:41 2018
> @@ -31,7 +31,7 @@
> #
> # -------------------------------------------------------------------
>
> -log4j.file = /WEB-INF/conf/Log4j.properties
> +log4j.file = /WEB-INF/conf/log4j.xml
>
> # -------------------------------------------------------------------
> #
>
> Modified:
turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
> URL:
http://svn.apache.org/viewvc/turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
==============================================================================
> ---
turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
(original)
> +++
turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java Wed
Oct 31 15:07:41 2018
> @@ -41,8 +41,10 @@ import javax.servlet.ServletConfig;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import javax.servlet.http.HttpSession;
> +import javax.xml.parsers.FactoryConfigurationError;
>
> import org.apache.log4j.PropertyConfigurator;
> +import org.apache.log4j.xml.DOMConfigurator;
> import org.apache.turbine.TurbineConstants;
> import org.apache.turbine.pipeline.PipelineData;
> import org.apache.turbine.services.TurbineServices;
> @@ -63,25 +65,42 @@ import org.mockito.stubbing.Answer;
> */
> public abstract class BaseTestCase
> {
> - static File log4jFile = new File("conf/test/Log4j.properties");
> + static File log4jFile = new File("conf/test/log4j.xml");
>
> @BeforeClass
> public static void baseInit()
> throws Exception
> {
>
> - Properties p = new Properties();
> - try
> + if (log4jFile.getName().endsWith(".xml"))
> {
> - p.load(new FileInputStream(log4jFile));
> - p.setProperty(TurbineConstants.APPLICATION_ROOT_KEY, new
File(".").getAbsolutePath());
> - PropertyConfigurator.configure(p);
> -
> + // load XML type configuration
> + // NOTE: Only system property expansion available
> + try
> + {
> + DOMConfigurator.configure(log4jFile.getAbsolutePath());
> + }
> + catch (FactoryConfigurationError e)
> + {
> + System.err.println("Could not configure Log4J from
configuration file "
> + + log4jFile + ": ");
> + e.printStackTrace();
> + }
> }
> - catch (FileNotFoundException fnf)
> - {
> - System.err.println("Could not open Log4J configuration file
"
> - + log4jFile);
> + else {
> + Properties p = new Properties();
> + try
> + {
> + p.load(new FileInputStream(log4jFile));
> + p.setProperty(TurbineConstants.APPLICATION_ROOT_KEY,
new File(".").getAbsolutePath());
> + PropertyConfigurator.configure(p);
> +
> + }
> + catch (FileNotFoundException fnf)
> + {
> + System.err.println("Could not open Log4J configuration
file "
> + + log4jFile);
> + }
> }
> }
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
For additional commands, e-mail: dev-help@turbine.apache.org
Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Posted by Thomas Vandahl <tv...@apache.org>.
On 05.11.18 20:42, Thomas Vandahl wrote:
> On 05.11.18 15:24, Georg Kallidis wrote:
>> just another thought: Why not better migrate to log4j2 ? Does anyone
>> object? This may be appropriate as we support per default servlet 3 now.
>>
>> If we do this, we have to remove usage of property/domconfigurator, but we
>> get a (much) more flexible subsitution engine.
>
> +1, if we finally decide for *one* logging system. Right now, Turbine
> has dependencies on log4j, commons-logging and slf4j. If it is log4j2
> (which I'd prefer because of own dogfood and such), so be it. But please
> remove all the other stuff.
I forgot Avalon...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
For additional commands, e-mail: dev-help@turbine.apache.org
Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Posted by Thomas Vandahl <tv...@apache.org>.
On 05.11.18 15:24, Georg Kallidis wrote:
> just another thought: Why not better migrate to log4j2 ? Does anyone
> object? This may be appropriate as we support per default servlet 3 now.
>
> If we do this, we have to remove usage of property/domconfigurator, but we
> get a (much) more flexible subsitution engine.
+1, if we finally decide for *one* logging system. Right now, Turbine
has dependencies on log4j, commons-logging and slf4j. If it is log4j2
(which I'd prefer because of own dogfood and such), so be it. But please
remove all the other stuff.
Bye, Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
For additional commands, e-mail: dev-help@turbine.apache.org
Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Posted by Jeffery Painter <je...@jivecast.com>.
Awesome... I am continuing to work my way through fulcrum components as
I have time and fix the javadocs so mvn site can build cleanly... kind
of a pain, but I guess someone needs to do it :-)
-
Jeff
On 11/5/18 10:18 AM, Georg Kallidis wrote:
> Hi Jeffery,
>
> to allow for some more investigation I add for now, what I've tested
> already as a proposal. It might be some effort to change existing apps,
> from ${applicationRoot} to e.g. web:rootDir. Might do this in a second
> step after upcoming release,...
>
> Best regards, Georg
>
>
>
>
> Von: Jeffery Painter <je...@jivecast.com>
> An: Turbine Developers List <de...@turbine.apache.org>
> Datum: 05.11.2018 15:43
> Betreff: Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
>
>
>
> Hi Georg,
>
> I am ok if it is not too much effort. I would like to see us get
> Turbine-5.0 out as soon as we can as I am actively building against this
> code base, and I would prefer that the code I ship code to client isn't
> pointing at my local snapshot builds :-)
>
> My dev instances have been running for over a month now and the code
> base seems very stable.
>
> Thanks!
> Jeff
>
>
> On 11/5/18 9:24 AM, Georg Kallidis wrote:
>> just another thought: Why not better migrate to log4j2 ? Does anyone
>> object? This may be appropriate as we support per default servlet 3 now.
>> If we do this, we have to remove usage of property/domconfigurator, but
> we
>> get a (much) more flexible subsitution engine.
>>
>> -Georg
>>
>>
>>
>> Von: "Georg Kallidis" <ge...@cedis.fu-berlin.de>
>> An: "Turbine Developers List" <de...@turbine.apache.org>
>> Datum: 01.11.2018 15:39
>> Betreff: Re: Re: svn commit: r1845337 - in /turbine/core/trunk:
> ./
>> conf/ conf/test/ src/assembly/ src/changes/ src/java/org/apache/turbine/
>> src/java/org/apache/turbine/modules/screens/
>> src/test-cactus/testapp/WEB-INF/conf/ src/test/org/apache/turbine/test/
>>
>>
>>
>> Hi Jeffery,
>>
>> sorry, I only now realize, that I have to resolve the applicationroot in
>> xml. A system property would resolve things by itself, but we have to
>> configure it application speicifc (could be done by configuring
> webapproot
>> with Spring).
>>
>> Bit if we just want to allow it happen in the same way as for the
>> log4j.properties file (using ${applicationroot}, we may just replace it
> in
>> code before providing input to the log4j domconfigurator.
>>
>> If we do not want to replace the original, we should copy it e.g.
>> (log4j-gen.xml). Another option would be to activate watching, replace
> the
>> original, which I do not really like to do.
>>
>> BTW: loggingRoot seems to be removed altogether, which should be
> reflected
>> in javadoc/code comments in Turbine.
>>
>> Best regards, Georg
>>
>>
>>
>> Von: Jeffery Painter <je...@jivecast.com>
>> An: dev@turbine.apache.org
>> Datum: 31.10.2018 17:27
>> Betreff: Re: svn commit: r1845337 - in /turbine/core/trunk: ./
>> conf/ conf/test/ src/assembly/ src/changes/ src/java/org/apache/turbine/
>> src/java/org/apache/turbine/modules/screens/
>> src/test-cactus/testapp/WEB-INF/conf/ src/test/org/apache/turbine/test/
>>
>>
>>
>> Hi Georg,
>>
>> I tried to change the archetype to use the log4j.xml but I was having
>> some trouble getting it working... if you have time to take a look at
>> it, that would be great.
>>
>> I fixed some of the versioning info, but I left the log4j.properties as
>> it was (it seems to still be working as is with your latest commits). I
>> also updated the changes file. Thanks for adding the notes from my
>> changes in turbine/core :-)
>>
>> I will try to remember to stay on top of that in the future.
>>
>> Thanks!
>> Jeff
>>
>>
>>
>> On 10/31/18 11:07 AM, gk@apache.org wrote:
>>> Author: gk
>>> Date: Wed Oct 31 15:07:41 2018
>>> New Revision: 1845337
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1845337&view=rev
>>> Log:
>>> - Updating to Turbine Parent 5
>>> - fix cobertura single report
>>> - fix docLint for javadoc 3.x
>>> - fix CVE, exclude in pom
>>> - use log4j.xml
>>>
>>>
>>> Added:
>>> turbine/core/trunk/conf/log4j.xml (with props)
>>> turbine/core/trunk/conf/test/log4j.xml (with props)
>>> Modified:
>>> turbine/core/trunk/conf/test/CompleteTurbineResources.properties
>>> turbine/core/trunk/conf/test/TemplateService.properties
>>> turbine/core/trunk/conf/test/TestFulcrumComponents.properties
>>>
> turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>>> turbine/core/trunk/conf/test/usersettings.properties
>>> turbine/core/trunk/pom.xml
>>> turbine/core/trunk/src/assembly/binaries.xml
>>> turbine/core/trunk/src/changes/changes.xml
>>> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>>>
> turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
> turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>>> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
>>>
>>> Added: turbine/core/trunk/conf/log4j.xml
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/log4j.xml?rev=1845337&view=auto
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/conf/log4j.xml (added)
>>> +++ turbine/core/trunk/conf/log4j.xml Wed Oct 31 15:07:41 2018
>>> @@ -0,0 +1,81 @@
>>> +<?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 xmlns:log4j="http://jakarta.apache.org/log4j/">
>>> + <appender name="avalon" class="org.apache.log4j.FileAppender">
>>> + <param name="append" value="false"/>
>>> + <param name="file"
> value="${applicationRoot}/logs/avalon.log"/>
>>> + <layout class="org.apache.log4j.PatternLayout">
>>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
>> %m%n"/>
>>> + </layout>
>>> + </appender>
>>> + <appender name="scheduler" class="org.apache.log4j.FileAppender">
>>> + <param name="append" value="false"/>
>>> + <param name="file"
>> value="${applicationRoot}/logs/scheduler.log"/>
>>> + <layout class="org.apache.log4j.PatternLayout">
>>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
>> %m%n"/>
>>> + </layout>
>>> + </appender>
>>> + <appender name="torque" class="org.apache.log4j.FileAppender">
>>> + <param name="append" value="false"/>
>>> + <param name="file"
> value="${applicationRoot}/logs/torque.log"/>
>>> + <layout class="org.apache.log4j.PatternLayout">
>>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
>> %m%n"/>
>>> + </layout>
>>> + </appender>
>>> + <appender name="turbine" class="org.apache.log4j.FileAppender">
>>> + <param name="append" value="false"/>
>>> + <param name="file"
>> value="${applicationRoot}/logs/turbine.log"/>
>>> + <layout class="org.apache.log4j.PatternLayout">
>>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
>> %m%n"/>
>>> + </layout>
>>> + </appender>
>>> + <appender name="velocity" class="org.apache.log4j.FileAppender">
>>> + <param name="append" value="false"/>
>>> + <param name="file"
>> value="${applicationRoot}/logs/velocity.log"/>
>>> + <layout class="org.apache.log4j.PatternLayout">
>>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
>> %m%n"/>
>>> + </layout>
>>> + </appender>
>>> + <logger name="avalon" additivity="false">
>>> + <level value="INFO"/>
>>> + <appender-ref ref="avalon"/>
>>> + </logger>
>>> + <logger name="org.apache.torque" additivity="false">
>>> + <level value="INFO"/>
>>> + <appender-ref ref="torque"/>
>>> + </logger>
>>> + <logger name="org.apache.turbine" additivity="false">
>>> + <level value="INFO"/>
>>> + <appender-ref ref="turbine"/>
>>> + </logger>
>>> + <logger name="scheduler" additivity="false">
>>> + <level value="INFO"/>
>>> + <appender-ref ref="scheduler"/>
>>> + </logger>
>>> + <logger name="velocity" additivity="false">
>>> + <level value="INFO"/>
>>> + <appender-ref ref="velocity"/>
>>> + </logger>
>>> + <root>
>>> + <level value="INFO"/>
>>> + <appender-ref ref="turbine"/>
>>> + </root>
>>> +</log4j:configuration>
>>> \ No newline at end of file
>>>
>>> Propchange: turbine/core/trunk/conf/log4j.xml
>>>
> ------------------------------------------------------------------------------
>>> svn:eol-style = native
>>>
>>> Modified:
>> turbine/core/trunk/conf/test/CompleteTurbineResources.properties
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/CompleteTurbineResources.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/conf/test/CompleteTurbineResources.properties
>> (original)
>>> +++ turbine/core/trunk/conf/test/CompleteTurbineResources.properties
> Wed
>> Oct 31 15:07:41 2018
>>> @@ -23,7 +23,7 @@ pipeline.default.descriptor = /conf/turb
>>> #
>>> # -------------------------------------------------------------------
>>>
>>> -log4j.file = Log4j.properties
>>> +log4j.file = log4j.xml
>>>
>>> # -------------------------------------------------------------------
>>> #
>>>
>>> Modified: turbine/core/trunk/conf/test/TemplateService.properties
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TemplateService.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/conf/test/TemplateService.properties (original)
>>> +++ turbine/core/trunk/conf/test/TemplateService.properties Wed Oct 31
>> 15:07:41 2018
>>> @@ -15,7 +15,7 @@
>>> # specific language governing permissions and limitations
>>> # under the License.
>>>
>>> -log4j.file = Log4j.properties
>>> +log4j.file = log4j.xml
>>> #log4j.file = none
>>> # or resolve relatively e.g.
>>> #log4j.file = ../../conf/Log4j.properties
>>>
>>> Modified: turbine/core/trunk/conf/test/TestFulcrumComponents.properties
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TestFulcrumComponents.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/conf/test/TestFulcrumComponents.properties
>> (original)
>>> +++ turbine/core/trunk/conf/test/TestFulcrumComponents.properties Wed
>> Oct 31 15:07:41 2018
>>> @@ -21,7 +21,7 @@
>>> #
>>> # -------------------------------------------------------------------
>>>
>>> -log4j.file = Log4j.properties
>>> +log4j.file = log4j.xml
>>> # context path: cft. javax.servlet.ServletContext.getResource(String)
>>> pipeline.default.descriptor = conf/turbine-classic-pipeline.xml
>>>
>>>
>>> Modified:
> turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> ---
> turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>
>> (original)
>>> +++
> turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>
>> Wed Oct 31 15:07:41 2018
>>> @@ -21,7 +21,7 @@
>>> #
>>> # -------------------------------------------------------------------
>>>
>>> -log4j.file = Log4j.properties
>>> +log4j.file = log4j.xml.properties
>>>
>>> # resource relative to context
>>> pipeline.default.descriptor = /conf/turbine-classic-pipeline.xml
>>>
>>> Added: turbine/core/trunk/conf/test/log4j.xml
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/log4j.xml?rev=1845337&view=auto
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/conf/test/log4j.xml (added)
>>> +++ turbine/core/trunk/conf/test/log4j.xml Wed Oct 31 15:07:41 2018
>>> @@ -0,0 +1,37 @@
>>> +<?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 debug="false" xmlns:log4j="
>> http://jakarta.apache.org/log4j/">
>>> + <appender name="logfile" class="org.apache.log4j.FileAppender">
>>> + <param name="append" value="false"/>
>>> + <param name="File" value="target/turbine.log"/>
>>> + <layout class="org.apache.log4j.PatternLayout">
>>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
>> %m%n"/>
>>> + </layout>
>>> + </appender>
>>> + <logger name="org.apache.turbine" additivity="false">
>>> + <level value="DEBUG"/>
>>> + <appender-ref ref="logfile"/>
>>> + </logger>
>>> + <root>
>>> + <level value="ERROR"/>
>>> + <appender-ref ref="logfile"/>
>>> + </root>
>>> +</log4j:configuration>
>>> \ No newline at end of file
>>>
>>> Propchange: turbine/core/trunk/conf/test/log4j.xml
>>>
> ------------------------------------------------------------------------------
>>> svn:eol-style = native
>>>
>>> Modified: turbine/core/trunk/conf/test/usersettings.properties
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/usersettings.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/conf/test/usersettings.properties (original)
>>> +++ turbine/core/trunk/conf/test/usersettings.properties Wed Oct 31
>> 15:07:41 2018
>>> @@ -1,4 +1,4 @@
>>> -log4j.file = Log4j.properties
>>> +log4j.file = log4j.xml
>>> # or resolve relatively
>>> #log4j.file = ../../conf/Log4j.properties
>>> module.cache=false
>>>
>>> Modified: turbine/core/trunk/pom.xml
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/pom.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/pom.xml (original)
>>> +++ turbine/core/trunk/pom.xml Wed Oct 31 15:07:41 2018
>>> @@ -823,6 +823,17 @@
>>> <aggregate>false</aggregate>
>>> </configuration>
>>> </plugin>
>>> + <plugin><!-- since 2.7 running the old report requires to
>> register it explicitely, otherwise the build may fail -->
>>> + <groupId>org.codehaus.mojo</groupId>
>>> + <artifactId>cobertura-maven-plugin</artifactId>
>>> + <reportSets>
>>> + <reportSet>
>>> + <reports>
>>> + <report>cobertura</report>
>>> + </reports>
>>> + </reportSet>
>>> + </reportSets>
>>> + </plugin>
>>> </plugins>
>>> </reporting>
>>>
>>> @@ -944,8 +955,17 @@
>>> <groupId>avalon-logkit</groupId>
>>> <artifactId>avalon-logkit</artifactId>
>>> </exclusion>
>>> + <exclusion> <!-- exclude this to exclude beanutils v1.8.0 ->
>> CVE-2014-0114 -->
>>> + <groupId>commons-configuration</groupId>
>>> + <artifactId>commons-configuration</artifactId>
>>> + </exclusion>
>>> </exclusions>
>>> </dependency>
>>> + <dependency> <!-- include more modern version just for
>> torque-runtime v4.0 -->
>>> + <groupId>commons-configuration</groupId>
>>> + <artifactId>commons-configuration</artifactId>
>>> + <version>1.10</version>
>>> + </dependency>
>>> <!-- using snapshot, until released -->
>>> <dependency>
>>> <groupId>org.apache.fulcrum</groupId>
>>> @@ -1098,8 +1118,8 @@
>>> <configuration>
>>> <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
>>> <descriptors>
>>> - <descriptor>src/assembly/binaries.xml</descriptor>
>>> - <descriptor>src/assembly/source.xml</descriptor>
>>> + <descriptor>./src/assembly/binaries.xml</descriptor>
>>> + <descriptor>./src/assembly/source.xml</descriptor>
>>> </descriptors>
>>> <tarLongFileFormat>gnu</tarLongFileFormat>
>>> </configuration>
>>> @@ -1110,14 +1130,13 @@
>>> </build>
>>> <properties>
>>> <dependency.check.skip>false</dependency.check.skip>
>>> + <doclint>none</doclint><!-- since javadoc v.3 this is the
>> reuqired instead of -Xdoclint:none, remove if turbine parent is correct
>> again using profile java8 -->
>>> </properties>
>>> </profile>
>>> </profiles>
>>>
>>> <properties>
>>> - <maven.compiler.source>1.8</maven.compiler.source>
>>> - <maven.compiler.target>1.8</maven.compiler.target>
>>> -
>>> + <!-- maven.compiler setting in turbine parent -->
>>> <!-- TODO: Change for release -->
>>> <turbine.site.path>turbine/turbine-5.0</turbine.site.path>
>>> <fulcrum.intake>2.0.0-SNAPSHOT</fulcrum.intake>
>>>
>>> Modified: turbine/core/trunk/src/assembly/binaries.xml
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/assembly/binaries.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/src/assembly/binaries.xml (original)
>>> +++ turbine/core/trunk/src/assembly/binaries.xml Wed Oct 31 15:07:41
>> 2018
>>> @@ -71,6 +71,7 @@
>>> <include>roleConfiguration.xml</include>
>>> <include>turbine-classic-pipeline.xml</include>
>>> <include>Log4j.properties</include>
>>> + <include>log4j.xml</include>
>>> <include>TurbineResources.properties</include>
>>> </includes>
>>> </fileSet>
>>>
>>> Modified: turbine/core/trunk/src/changes/changes.xml
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/changes/changes.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> --- turbine/core/trunk/src/changes/changes.xml (original)
>>> +++ turbine/core/trunk/src/changes/changes.xml Wed Oct 31 15:07:41 2018
>>> @@ -25,6 +25,9 @@
>>>
>>> <body>
>>> <release version="5.0" date="in Subversion">
>>> + <action type="update" dev="jp">
>>> + Update from lang to commons lang3
>>> + </action>
>>> <action type="add" dev="tv">
>>> Add ServiceBroker.getApplicationRoot() to allow services to
> get
>> their root directory
>>> </action>
>>>
>>> Modified:
>> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> ---
> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>> (original)
>>> +++
> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>> Wed Oct 31 15:07:41 2018
>>> @@ -51,7 +51,7 @@ public interface TurbineConstants
>>> String LOG4J_CONFIG_FILE = "log4j.file";
>>>
>>> /** The default value for the Log4J File */
>>> - String LOG4J_CONFIG_FILE_DEFAULT =
>> "/WEB-INF/conf/Log4j.properties";
>>> + String LOG4J_CONFIG_FILE_DEFAULT =
>> "/WEB-INF/conf/log4j.xml";
>>> /** This is the default log file to be used for logging
>> */
>>> String DEFAULT_LOGGER = "turbine";
>>>
>>> Modified:
> turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> ---
> turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>
>> (original)
>>> +++
> turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>
>> Wed Oct 31 15:07:41 2018
>>> @@ -22,8 +22,6 @@ package org.apache.turbine.modules.scree
>>> import java.io.OutputStreamWriter;
>>> import java.io.PrintWriter;
>>>
>>> -import javax.servlet.http.HttpServletRequest;
>>> -
>>> import org.apache.turbine.pipeline.PipelineData;
>>> import org.apache.turbine.util.RunData;
>>> import org.slf4j.Logger;
>>> @@ -101,14 +99,12 @@ public class PlainJSONScreen extends Raw
>>> protected void doOutput(PipelineData pipelineData) throws
> Exception
>>> {
>>> RunData data = getRunData(pipelineData);
>>> -
>>> - HttpServletRequest request = data.getRequest();
>>> // read in json!
>>> String charset = "UTF-8"; //request.getCharacterEncoding();
>>>
>>> String json_res =data.getMessage();
>>>
>>> - log.debug( "json_res output:" +json_res );
>>> + log.debug( "json_res output: {}", json_res );
>>> PrintWriter out = new PrintWriter(
>>> new
>> OutputStreamWriter(data.getResponse().getOutputStream(),charset));
>>> out.print(json_res.toString());
>>>
>>> Modified:
> turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> ---
> turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>
>> (original)
>>> +++
> turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>
>> Wed Oct 31 15:07:41 2018
>>> @@ -31,7 +31,7 @@
>>> #
>>> # -------------------------------------------------------------------
>>>
>>> -log4j.file = /WEB-INF/conf/Log4j.properties
>>> +log4j.file = /WEB-INF/conf/log4j.xml
>>>
>>> # -------------------------------------------------------------------
>>> #
>>>
>>> Modified:
>> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
>>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>>
>>
> ==============================================================================
>>> ---
>> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
>> (original)
>>> +++
>> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
> Wed
>> Oct 31 15:07:41 2018
>>> @@ -41,8 +41,10 @@ import javax.servlet.ServletConfig;
>>> import javax.servlet.http.HttpServletRequest;
>>> import javax.servlet.http.HttpServletResponse;
>>> import javax.servlet.http.HttpSession;
>>> +import javax.xml.parsers.FactoryConfigurationError;
>>>
>>> import org.apache.log4j.PropertyConfigurator;
>>> +import org.apache.log4j.xml.DOMConfigurator;
>>> import org.apache.turbine.TurbineConstants;
>>> import org.apache.turbine.pipeline.PipelineData;
>>> import org.apache.turbine.services.TurbineServices;
>>> @@ -63,25 +65,42 @@ import org.mockito.stubbing.Answer;
>>> */
>>> public abstract class BaseTestCase
>>> {
>>> - static File log4jFile = new File("conf/test/Log4j.properties");
>>> + static File log4jFile = new File("conf/test/log4j.xml");
>>>
>>> @BeforeClass
>>> public static void baseInit()
>>> throws Exception
>>> {
>>>
>>> - Properties p = new Properties();
>>> - try
>>> + if (log4jFile.getName().endsWith(".xml"))
>>> {
>>> - p.load(new FileInputStream(log4jFile));
>>> - p.setProperty(TurbineConstants.APPLICATION_ROOT_KEY, new
>> File(".").getAbsolutePath());
>>> - PropertyConfigurator.configure(p);
>>> -
>>> + // load XML type configuration
>>> + // NOTE: Only system property expansion available
>>> + try
>>> + {
>>> + DOMConfigurator.configure(log4jFile.getAbsolutePath());
>>> + }
>>> + catch (FactoryConfigurationError e)
>>> + {
>>> + System.err.println("Could not configure Log4J from
>> configuration file "
>>> + + log4jFile + ": ");
>>> + e.printStackTrace();
>>> + }
>>> }
>>> - catch (FileNotFoundException fnf)
>>> - {
>>> - System.err.println("Could not open Log4J configuration
> file
>> "
>>> - + log4jFile);
>>> + else {
>>> + Properties p = new Properties();
>>> + try
>>> + {
>>> + p.load(new FileInputStream(log4jFile));
>>> + p.setProperty(TurbineConstants.APPLICATION_ROOT_KEY,
>> new File(".").getAbsolutePath());
>>> + PropertyConfigurator.configure(p);
>>> +
>>> + }
>>> + catch (FileNotFoundException fnf)
>>> + {
>>> + System.err.println("Could not open Log4J configuration
>> file "
>>> + + log4jFile);
>>> + }
>>> }
>>> }
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
>> For additional commands, e-mail: dev-help@turbine.apache.org
>>
>>
>>
>>
>
> [Anhang "signature.asc" gelöscht von Georg Kallidis/CeDiS/FU-Berlin/DE]
>
Re: Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Posted by Georg Kallidis <ge...@cedis.fu-berlin.de>.
Hi Jeffery,
to allow for some more investigation I add for now, what I've tested
already as a proposal. It might be some effort to change existing apps,
from ${applicationRoot} to e.g. web:rootDir. Might do this in a second
step after upcoming release,...
Best regards, Georg
Von: Jeffery Painter <je...@jivecast.com>
An: Turbine Developers List <de...@turbine.apache.org>
Datum: 05.11.2018 15:43
Betreff: Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Hi Georg,
I am ok if it is not too much effort. I would like to see us get
Turbine-5.0 out as soon as we can as I am actively building against this
code base, and I would prefer that the code I ship code to client isn't
pointing at my local snapshot builds :-)
My dev instances have been running for over a month now and the code
base seems very stable.
Thanks!
Jeff
On 11/5/18 9:24 AM, Georg Kallidis wrote:
> just another thought: Why not better migrate to log4j2 ? Does anyone
> object? This may be appropriate as we support per default servlet 3 now.
>
> If we do this, we have to remove usage of property/domconfigurator, but
we
> get a (much) more flexible subsitution engine.
>
> -Georg
>
>
>
> Von: "Georg Kallidis" <ge...@cedis.fu-berlin.de>
> An: "Turbine Developers List" <de...@turbine.apache.org>
> Datum: 01.11.2018 15:39
> Betreff: Re: Re: svn commit: r1845337 - in /turbine/core/trunk:
./
> conf/ conf/test/ src/assembly/ src/changes/ src/java/org/apache/turbine/
> src/java/org/apache/turbine/modules/screens/
> src/test-cactus/testapp/WEB-INF/conf/ src/test/org/apache/turbine/test/
>
>
>
> Hi Jeffery,
>
> sorry, I only now realize, that I have to resolve the applicationroot in
> xml. A system property would resolve things by itself, but we have to
> configure it application speicifc (could be done by configuring
webapproot
>
> with Spring).
>
> Bit if we just want to allow it happen in the same way as for the
> log4j.properties file (using ${applicationroot}, we may just replace it
in
>
> code before providing input to the log4j domconfigurator.
>
> If we do not want to replace the original, we should copy it e.g.
> (log4j-gen.xml). Another option would be to activate watching, replace
the
>
> original, which I do not really like to do.
>
> BTW: loggingRoot seems to be removed altogether, which should be
reflected
>
> in javadoc/code comments in Turbine.
>
> Best regards, Georg
>
>
>
> Von: Jeffery Painter <je...@jivecast.com>
> An: dev@turbine.apache.org
> Datum: 31.10.2018 17:27
> Betreff: Re: svn commit: r1845337 - in /turbine/core/trunk: ./
> conf/ conf/test/ src/assembly/ src/changes/ src/java/org/apache/turbine/
> src/java/org/apache/turbine/modules/screens/
> src/test-cactus/testapp/WEB-INF/conf/ src/test/org/apache/turbine/test/
>
>
>
> Hi Georg,
>
> I tried to change the archetype to use the log4j.xml but I was having
> some trouble getting it working... if you have time to take a look at
> it, that would be great.
>
> I fixed some of the versioning info, but I left the log4j.properties as
> it was (it seems to still be working as is with your latest commits). I
> also updated the changes file. Thanks for adding the notes from my
> changes in turbine/core :-)
>
> I will try to remember to stay on top of that in the future.
>
> Thanks!
> Jeff
>
>
>
> On 10/31/18 11:07 AM, gk@apache.org wrote:
>> Author: gk
>> Date: Wed Oct 31 15:07:41 2018
>> New Revision: 1845337
>>
>> URL: http://svn.apache.org/viewvc?rev=1845337&view=rev
>> Log:
>> - Updating to Turbine Parent 5
>> - fix cobertura single report
>> - fix docLint for javadoc 3.x
>> - fix CVE, exclude in pom
>> - use log4j.xml
>>
>>
>> Added:
>> turbine/core/trunk/conf/log4j.xml (with props)
>> turbine/core/trunk/conf/test/log4j.xml (with props)
>> Modified:
>> turbine/core/trunk/conf/test/CompleteTurbineResources.properties
>> turbine/core/trunk/conf/test/TemplateService.properties
>> turbine/core/trunk/conf/test/TestFulcrumComponents.properties
>>
>
turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>> turbine/core/trunk/conf/test/usersettings.properties
>> turbine/core/trunk/pom.xml
>> turbine/core/trunk/src/assembly/binaries.xml
>> turbine/core/trunk/src/changes/changes.xml
>> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>>
>
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>
turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
>>
>> Added: turbine/core/trunk/conf/log4j.xml
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/conf/log4j.xml?rev=1845337&view=auto
>
>
>
==============================================================================
>> --- turbine/core/trunk/conf/log4j.xml (added)
>> +++ turbine/core/trunk/conf/log4j.xml Wed Oct 31 15:07:41 2018
>> @@ -0,0 +1,81 @@
>> +<?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 xmlns:log4j="http://jakarta.apache.org/log4j/">
>> + <appender name="avalon" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file"
value="${applicationRoot}/logs/avalon.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <appender name="scheduler" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file"
> value="${applicationRoot}/logs/scheduler.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <appender name="torque" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file"
value="${applicationRoot}/logs/torque.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <appender name="turbine" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file"
> value="${applicationRoot}/logs/turbine.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <appender name="velocity" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file"
> value="${applicationRoot}/logs/velocity.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <logger name="avalon" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="avalon"/>
>> + </logger>
>> + <logger name="org.apache.torque" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="torque"/>
>> + </logger>
>> + <logger name="org.apache.turbine" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="turbine"/>
>> + </logger>
>> + <logger name="scheduler" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="scheduler"/>
>> + </logger>
>> + <logger name="velocity" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="velocity"/>
>> + </logger>
>> + <root>
>> + <level value="INFO"/>
>> + <appender-ref ref="turbine"/>
>> + </root>
>> +</log4j:configuration>
>> \ No newline at end of file
>>
>> Propchange: turbine/core/trunk/conf/log4j.xml
>>
>
------------------------------------------------------------------------------
>> svn:eol-style = native
>>
>> Modified:
> turbine/core/trunk/conf/test/CompleteTurbineResources.properties
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/CompleteTurbineResources.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> --- turbine/core/trunk/conf/test/CompleteTurbineResources.properties
> (original)
>> +++ turbine/core/trunk/conf/test/CompleteTurbineResources.properties
Wed
> Oct 31 15:07:41 2018
>> @@ -23,7 +23,7 @@ pipeline.default.descriptor = /conf/turb
>> #
>> # -------------------------------------------------------------------
>>
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml
>>
>> # -------------------------------------------------------------------
>> #
>>
>> Modified: turbine/core/trunk/conf/test/TemplateService.properties
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TemplateService.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> --- turbine/core/trunk/conf/test/TemplateService.properties (original)
>> +++ turbine/core/trunk/conf/test/TemplateService.properties Wed Oct 31
> 15:07:41 2018
>> @@ -15,7 +15,7 @@
>> # specific language governing permissions and limitations
>> # under the License.
>>
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml
>> #log4j.file = none
>> # or resolve relatively e.g.
>> #log4j.file = ../../conf/Log4j.properties
>>
>> Modified: turbine/core/trunk/conf/test/TestFulcrumComponents.properties
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TestFulcrumComponents.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> --- turbine/core/trunk/conf/test/TestFulcrumComponents.properties
> (original)
>> +++ turbine/core/trunk/conf/test/TestFulcrumComponents.properties Wed
> Oct 31 15:07:41 2018
>> @@ -21,7 +21,7 @@
>> #
>> # -------------------------------------------------------------------
>>
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml
>> # context path: cft. javax.servlet.ServletContext.getResource(String)
>> pipeline.default.descriptor = conf/turbine-classic-pipeline.xml
>>
>>
>> Modified:
>
turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> ---
>
turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>
> (original)
>> +++
>
turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>
> Wed Oct 31 15:07:41 2018
>> @@ -21,7 +21,7 @@
>> #
>> # -------------------------------------------------------------------
>>
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml.properties
>>
>> # resource relative to context
>> pipeline.default.descriptor = /conf/turbine-classic-pipeline.xml
>>
>> Added: turbine/core/trunk/conf/test/log4j.xml
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/log4j.xml?rev=1845337&view=auto
>
>
>
==============================================================================
>> --- turbine/core/trunk/conf/test/log4j.xml (added)
>> +++ turbine/core/trunk/conf/test/log4j.xml Wed Oct 31 15:07:41 2018
>> @@ -0,0 +1,37 @@
>> +<?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 debug="false" xmlns:log4j="
> http://jakarta.apache.org/log4j/">
>> + <appender name="logfile" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="File" value="target/turbine.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <logger name="org.apache.turbine" additivity="false">
>> + <level value="DEBUG"/>
>> + <appender-ref ref="logfile"/>
>> + </logger>
>> + <root>
>> + <level value="ERROR"/>
>> + <appender-ref ref="logfile"/>
>> + </root>
>> +</log4j:configuration>
>> \ No newline at end of file
>>
>> Propchange: turbine/core/trunk/conf/test/log4j.xml
>>
>
------------------------------------------------------------------------------
>> svn:eol-style = native
>>
>> Modified: turbine/core/trunk/conf/test/usersettings.properties
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/usersettings.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> --- turbine/core/trunk/conf/test/usersettings.properties (original)
>> +++ turbine/core/trunk/conf/test/usersettings.properties Wed Oct 31
> 15:07:41 2018
>> @@ -1,4 +1,4 @@
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml
>> # or resolve relatively
>> #log4j.file = ../../conf/Log4j.properties
>> module.cache=false
>>
>> Modified: turbine/core/trunk/pom.xml
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/pom.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> --- turbine/core/trunk/pom.xml (original)
>> +++ turbine/core/trunk/pom.xml Wed Oct 31 15:07:41 2018
>> @@ -823,6 +823,17 @@
>> <aggregate>false</aggregate>
>> </configuration>
>> </plugin>
>> + <plugin><!-- since 2.7 running the old report requires to
> register it explicitely, otherwise the build may fail -->
>> + <groupId>org.codehaus.mojo</groupId>
>> + <artifactId>cobertura-maven-plugin</artifactId>
>> + <reportSets>
>> + <reportSet>
>> + <reports>
>> + <report>cobertura</report>
>> + </reports>
>> + </reportSet>
>> + </reportSets>
>> + </plugin>
>> </plugins>
>> </reporting>
>>
>> @@ -944,8 +955,17 @@
>> <groupId>avalon-logkit</groupId>
>> <artifactId>avalon-logkit</artifactId>
>> </exclusion>
>> + <exclusion> <!-- exclude this to exclude beanutils v1.8.0 ->
> CVE-2014-0114 -->
>> + <groupId>commons-configuration</groupId>
>> + <artifactId>commons-configuration</artifactId>
>> + </exclusion>
>> </exclusions>
>> </dependency>
>> + <dependency> <!-- include more modern version just for
> torque-runtime v4.0 -->
>> + <groupId>commons-configuration</groupId>
>> + <artifactId>commons-configuration</artifactId>
>> + <version>1.10</version>
>> + </dependency>
>> <!-- using snapshot, until released -->
>> <dependency>
>> <groupId>org.apache.fulcrum</groupId>
>> @@ -1098,8 +1118,8 @@
>> <configuration>
>> <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
>> <descriptors>
>> - <descriptor>src/assembly/binaries.xml</descriptor>
>> - <descriptor>src/assembly/source.xml</descriptor>
>> + <descriptor>./src/assembly/binaries.xml</descriptor>
>> + <descriptor>./src/assembly/source.xml</descriptor>
>> </descriptors>
>> <tarLongFileFormat>gnu</tarLongFileFormat>
>> </configuration>
>> @@ -1110,14 +1130,13 @@
>> </build>
>> <properties>
>> <dependency.check.skip>false</dependency.check.skip>
>> + <doclint>none</doclint><!-- since javadoc v.3 this is the
> reuqired instead of -Xdoclint:none, remove if turbine parent is correct
> again using profile java8 -->
>> </properties>
>> </profile>
>> </profiles>
>>
>> <properties>
>> - <maven.compiler.source>1.8</maven.compiler.source>
>> - <maven.compiler.target>1.8</maven.compiler.target>
>> -
>> + <!-- maven.compiler setting in turbine parent -->
>> <!-- TODO: Change for release -->
>> <turbine.site.path>turbine/turbine-5.0</turbine.site.path>
>> <fulcrum.intake>2.0.0-SNAPSHOT</fulcrum.intake>
>>
>> Modified: turbine/core/trunk/src/assembly/binaries.xml
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/src/assembly/binaries.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> --- turbine/core/trunk/src/assembly/binaries.xml (original)
>> +++ turbine/core/trunk/src/assembly/binaries.xml Wed Oct 31 15:07:41
> 2018
>> @@ -71,6 +71,7 @@
>> <include>roleConfiguration.xml</include>
>> <include>turbine-classic-pipeline.xml</include>
>> <include>Log4j.properties</include>
>> + <include>log4j.xml</include>
>> <include>TurbineResources.properties</include>
>> </includes>
>> </fileSet>
>>
>> Modified: turbine/core/trunk/src/changes/changes.xml
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/src/changes/changes.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> --- turbine/core/trunk/src/changes/changes.xml (original)
>> +++ turbine/core/trunk/src/changes/changes.xml Wed Oct 31 15:07:41 2018
>> @@ -25,6 +25,9 @@
>>
>> <body>
>> <release version="5.0" date="in Subversion">
>> + <action type="update" dev="jp">
>> + Update from lang to commons lang3
>> + </action>
>> <action type="add" dev="tv">
>> Add ServiceBroker.getApplicationRoot() to allow services to
get
> their root directory
>> </action>
>>
>> Modified:
> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> ---
turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
> (original)
>> +++
turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
> Wed Oct 31 15:07:41 2018
>> @@ -51,7 +51,7 @@ public interface TurbineConstants
>> String LOG4J_CONFIG_FILE = "log4j.file";
>>
>> /** The default value for the Log4J File */
>> - String LOG4J_CONFIG_FILE_DEFAULT =
> "/WEB-INF/conf/Log4j.properties";
>> + String LOG4J_CONFIG_FILE_DEFAULT =
> "/WEB-INF/conf/log4j.xml";
>> /** This is the default log file to be used for logging
> */
>> String DEFAULT_LOGGER = "turbine";
>>
>> Modified:
>
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> ---
>
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>
> (original)
>> +++
>
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>
> Wed Oct 31 15:07:41 2018
>> @@ -22,8 +22,6 @@ package org.apache.turbine.modules.scree
>> import java.io.OutputStreamWriter;
>> import java.io.PrintWriter;
>>
>> -import javax.servlet.http.HttpServletRequest;
>> -
>> import org.apache.turbine.pipeline.PipelineData;
>> import org.apache.turbine.util.RunData;
>> import org.slf4j.Logger;
>> @@ -101,14 +99,12 @@ public class PlainJSONScreen extends Raw
>> protected void doOutput(PipelineData pipelineData) throws
Exception
>> {
>> RunData data = getRunData(pipelineData);
>> -
>> - HttpServletRequest request = data.getRequest();
>> // read in json!
>> String charset = "UTF-8"; //request.getCharacterEncoding();
>>
>> String json_res =data.getMessage();
>>
>> - log.debug( "json_res output:" +json_res );
>> + log.debug( "json_res output: {}", json_res );
>> PrintWriter out = new PrintWriter(
>> new
> OutputStreamWriter(data.getResponse().getOutputStream(),charset));
>> out.print(json_res.toString());
>>
>> Modified:
>
turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> ---
>
turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>
> (original)
>> +++
>
turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>
> Wed Oct 31 15:07:41 2018
>> @@ -31,7 +31,7 @@
>> #
>> # -------------------------------------------------------------------
>>
>> -log4j.file = /WEB-INF/conf/Log4j.properties
>> +log4j.file = /WEB-INF/conf/log4j.xml
>>
>> # -------------------------------------------------------------------
>> #
>>
>> Modified:
> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
>> URL:
>
http://svn.apache.org/viewvc/turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
>
==============================================================================
>> ---
> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
> (original)
>> +++
> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
Wed
> Oct 31 15:07:41 2018
>> @@ -41,8 +41,10 @@ import javax.servlet.ServletConfig;
>> import javax.servlet.http.HttpServletRequest;
>> import javax.servlet.http.HttpServletResponse;
>> import javax.servlet.http.HttpSession;
>> +import javax.xml.parsers.FactoryConfigurationError;
>>
>> import org.apache.log4j.PropertyConfigurator;
>> +import org.apache.log4j.xml.DOMConfigurator;
>> import org.apache.turbine.TurbineConstants;
>> import org.apache.turbine.pipeline.PipelineData;
>> import org.apache.turbine.services.TurbineServices;
>> @@ -63,25 +65,42 @@ import org.mockito.stubbing.Answer;
>> */
>> public abstract class BaseTestCase
>> {
>> - static File log4jFile = new File("conf/test/Log4j.properties");
>> + static File log4jFile = new File("conf/test/log4j.xml");
>>
>> @BeforeClass
>> public static void baseInit()
>> throws Exception
>> {
>>
>> - Properties p = new Properties();
>> - try
>> + if (log4jFile.getName().endsWith(".xml"))
>> {
>> - p.load(new FileInputStream(log4jFile));
>> - p.setProperty(TurbineConstants.APPLICATION_ROOT_KEY, new
> File(".").getAbsolutePath());
>> - PropertyConfigurator.configure(p);
>> -
>> + // load XML type configuration
>> + // NOTE: Only system property expansion available
>> + try
>> + {
>> + DOMConfigurator.configure(log4jFile.getAbsolutePath());
>> + }
>> + catch (FactoryConfigurationError e)
>> + {
>> + System.err.println("Could not configure Log4J from
> configuration file "
>> + + log4jFile + ": ");
>> + e.printStackTrace();
>> + }
>> }
>> - catch (FileNotFoundException fnf)
>> - {
>> - System.err.println("Could not open Log4J configuration
file
> "
>> - + log4jFile);
>> + else {
>> + Properties p = new Properties();
>> + try
>> + {
>> + p.load(new FileInputStream(log4jFile));
>> + p.setProperty(TurbineConstants.APPLICATION_ROOT_KEY,
> new File(".").getAbsolutePath());
>> + PropertyConfigurator.configure(p);
>> +
>> + }
>> + catch (FileNotFoundException fnf)
>> + {
>> + System.err.println("Could not open Log4J configuration
> file "
>> + + log4jFile);
>> + }
>> }
>> }
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
> For additional commands, e-mail: dev-help@turbine.apache.org
>
>
>
>
[Anhang "signature.asc" gelöscht von Georg Kallidis/CeDiS/FU-Berlin/DE]
Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Posted by Jeffery Painter <je...@jivecast.com>.
Actually Thomas,
Georg has already released the new parent POM as Turbine-5 - I don't see
any reason to go back now :-) I say we just move forward and make more
exciting changes in Turbine 6.
Georg - I am working through your old notes to me on preparing
releases. Looking at the dependency chain, I think we should actually
go with the following to start:
1. fulcrum-yaafi-crypto
2. fulcrum-yaafi (depends on 1)
3. fulcrum-testcontainer (depends on 2)
4. fulcrum-factory (depends on 2 and 3)
If you don't mind, I would like to attempt to prepare the release for
yaafi-crypto and work through the process. Let me know what you think.
Thanks!
Jeff
On 11/5/18 2:53 PM, Jeffery Painter wrote:
> Hi Thomas,
>
> I don't care what the version number is as long as we can push out some
> of the work done so far :-) I think we have made some notable
> improvements since the last release.
>
> Georg?
>
> -
> Jeff
>
>
>
>
> On 11/5/18 2:46 PM, Thomas Vandahl wrote:
>> On 05.11.18 15:42, Jeffery Painter wrote:
>>> Hi Georg,
>>>
>>> I am ok if it is not too much effort. I would like to see us get
>>> Turbine-5.0 out as soon as we can as I am actively building against this
>>> code base, and I would prefer that the code I ship code to client isn't
>>> pointing at my local snapshot builds :-)
>>>
>>> My dev instances have been running for over a month now and the code
>>> base seems very stable.
>> I'm a bit tight on cycle right now as you may have noticed. I actually
>> wanted to add some more "modern" stuff as for example WebSockets to
>> really justify a 5.0 release. I won't be able to help much in the near
>> future, though.
>>
>> Base line: What about 4.5?
>>
>> Bye, Thomas
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
> For additional commands, e-mail: dev-help@turbine.apache.org
>
Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Posted by Jeffery Painter <je...@jivecast.com>.
Hi Thomas,
I don't care what the version number is as long as we can push out some
of the work done so far :-) I think we have made some notable
improvements since the last release.
Georg?
-
Jeff
On 11/5/18 2:46 PM, Thomas Vandahl wrote:
> On 05.11.18 15:42, Jeffery Painter wrote:
>> Hi Georg,
>>
>> I am ok if it is not too much effort. I would like to see us get
>> Turbine-5.0 out as soon as we can as I am actively building against this
>> code base, and I would prefer that the code I ship code to client isn't
>> pointing at my local snapshot builds :-)
>>
>> My dev instances have been running for over a month now and the code
>> base seems very stable.
> I'm a bit tight on cycle right now as you may have noticed. I actually
> wanted to add some more "modern" stuff as for example WebSockets to
> really justify a 5.0 release. I won't be able to help much in the near
> future, though.
>
> Base line: What about 4.5?
>
> Bye, Thomas
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
For additional commands, e-mail: dev-help@turbine.apache.org
Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Posted by Thomas Vandahl <tv...@apache.org>.
On 05.11.18 15:42, Jeffery Painter wrote:
> Hi Georg,
>
> I am ok if it is not too much effort. I would like to see us get
> Turbine-5.0 out as soon as we can as I am actively building against this
> code base, and I would prefer that the code I ship code to client isn't
> pointing at my local snapshot builds :-)
>
> My dev instances have been running for over a month now and the code
> base seems very stable.
I'm a bit tight on cycle right now as you may have noticed. I actually
wanted to add some more "modern" stuff as for example WebSockets to
really justify a 5.0 release. I won't be able to help much in the near
future, though.
Base line: What about 4.5?
Bye, Thomas
Re: was: Re: Re: svn commit: r1845337 - migrate to log4j2
Posted by Jeffery Painter <je...@jivecast.com>.
Hi Georg,
I am ok if it is not too much effort. I would like to see us get
Turbine-5.0 out as soon as we can as I am actively building against this
code base, and I would prefer that the code I ship code to client isn't
pointing at my local snapshot builds :-)
My dev instances have been running for over a month now and the code
base seems very stable.
Thanks!
Jeff
On 11/5/18 9:24 AM, Georg Kallidis wrote:
> just another thought: Why not better migrate to log4j2 ? Does anyone
> object? This may be appropriate as we support per default servlet 3 now.
>
> If we do this, we have to remove usage of property/domconfigurator, but we
> get a (much) more flexible subsitution engine.
>
> -Georg
>
>
>
> Von: "Georg Kallidis" <ge...@cedis.fu-berlin.de>
> An: "Turbine Developers List" <de...@turbine.apache.org>
> Datum: 01.11.2018 15:39
> Betreff: Re: Re: svn commit: r1845337 - in /turbine/core/trunk: ./
> conf/ conf/test/ src/assembly/ src/changes/ src/java/org/apache/turbine/
> src/java/org/apache/turbine/modules/screens/
> src/test-cactus/testapp/WEB-INF/conf/ src/test/org/apache/turbine/test/
>
>
>
> Hi Jeffery,
>
> sorry, I only now realize, that I have to resolve the applicationroot in
> xml. A system property would resolve things by itself, but we have to
> configure it application speicifc (could be done by configuring webapproot
>
> with Spring).
>
> Bit if we just want to allow it happen in the same way as for the
> log4j.properties file (using ${applicationroot}, we may just replace it in
>
> code before providing input to the log4j domconfigurator.
>
> If we do not want to replace the original, we should copy it e.g.
> (log4j-gen.xml). Another option would be to activate watching, replace the
>
> original, which I do not really like to do.
>
> BTW: loggingRoot seems to be removed altogether, which should be reflected
>
> in javadoc/code comments in Turbine.
>
> Best regards, Georg
>
>
>
> Von: Jeffery Painter <je...@jivecast.com>
> An: dev@turbine.apache.org
> Datum: 31.10.2018 17:27
> Betreff: Re: svn commit: r1845337 - in /turbine/core/trunk: ./
> conf/ conf/test/ src/assembly/ src/changes/ src/java/org/apache/turbine/
> src/java/org/apache/turbine/modules/screens/
> src/test-cactus/testapp/WEB-INF/conf/ src/test/org/apache/turbine/test/
>
>
>
> Hi Georg,
>
> I tried to change the archetype to use the log4j.xml but I was having
> some trouble getting it working... if you have time to take a look at
> it, that would be great.
>
> I fixed some of the versioning info, but I left the log4j.properties as
> it was (it seems to still be working as is with your latest commits). I
> also updated the changes file. Thanks for adding the notes from my
> changes in turbine/core :-)
>
> I will try to remember to stay on top of that in the future.
>
> Thanks!
> Jeff
>
>
>
> On 10/31/18 11:07 AM, gk@apache.org wrote:
>> Author: gk
>> Date: Wed Oct 31 15:07:41 2018
>> New Revision: 1845337
>>
>> URL: http://svn.apache.org/viewvc?rev=1845337&view=rev
>> Log:
>> - Updating to Turbine Parent 5
>> - fix cobertura single report
>> - fix docLint for javadoc 3.x
>> - fix CVE, exclude in pom
>> - use log4j.xml
>>
>>
>> Added:
>> turbine/core/trunk/conf/log4j.xml (with props)
>> turbine/core/trunk/conf/test/log4j.xml (with props)
>> Modified:
>> turbine/core/trunk/conf/test/CompleteTurbineResources.properties
>> turbine/core/trunk/conf/test/TemplateService.properties
>> turbine/core/trunk/conf/test/TestFulcrumComponents.properties
>>
> turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>> turbine/core/trunk/conf/test/usersettings.properties
>> turbine/core/trunk/pom.xml
>> turbine/core/trunk/src/assembly/binaries.xml
>> turbine/core/trunk/src/changes/changes.xml
>> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>>
> turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
> turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
>>
>> Added: turbine/core/trunk/conf/log4j.xml
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/log4j.xml?rev=1845337&view=auto
>
>
> ==============================================================================
>> --- turbine/core/trunk/conf/log4j.xml (added)
>> +++ turbine/core/trunk/conf/log4j.xml Wed Oct 31 15:07:41 2018
>> @@ -0,0 +1,81 @@
>> +<?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 xmlns:log4j="http://jakarta.apache.org/log4j/">
>> + <appender name="avalon" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file" value="${applicationRoot}/logs/avalon.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <appender name="scheduler" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file"
> value="${applicationRoot}/logs/scheduler.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <appender name="torque" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file" value="${applicationRoot}/logs/torque.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <appender name="turbine" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file"
> value="${applicationRoot}/logs/turbine.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <appender name="velocity" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="file"
> value="${applicationRoot}/logs/velocity.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <logger name="avalon" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="avalon"/>
>> + </logger>
>> + <logger name="org.apache.torque" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="torque"/>
>> + </logger>
>> + <logger name="org.apache.turbine" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="turbine"/>
>> + </logger>
>> + <logger name="scheduler" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="scheduler"/>
>> + </logger>
>> + <logger name="velocity" additivity="false">
>> + <level value="INFO"/>
>> + <appender-ref ref="velocity"/>
>> + </logger>
>> + <root>
>> + <level value="INFO"/>
>> + <appender-ref ref="turbine"/>
>> + </root>
>> +</log4j:configuration>
>> \ No newline at end of file
>>
>> Propchange: turbine/core/trunk/conf/log4j.xml
>>
> ------------------------------------------------------------------------------
>> svn:eol-style = native
>>
>> Modified:
> turbine/core/trunk/conf/test/CompleteTurbineResources.properties
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/CompleteTurbineResources.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> --- turbine/core/trunk/conf/test/CompleteTurbineResources.properties
> (original)
>> +++ turbine/core/trunk/conf/test/CompleteTurbineResources.properties Wed
> Oct 31 15:07:41 2018
>> @@ -23,7 +23,7 @@ pipeline.default.descriptor = /conf/turb
>> #
>> # -------------------------------------------------------------------
>>
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml
>>
>> # -------------------------------------------------------------------
>> #
>>
>> Modified: turbine/core/trunk/conf/test/TemplateService.properties
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TemplateService.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> --- turbine/core/trunk/conf/test/TemplateService.properties (original)
>> +++ turbine/core/trunk/conf/test/TemplateService.properties Wed Oct 31
> 15:07:41 2018
>> @@ -15,7 +15,7 @@
>> # specific language governing permissions and limitations
>> # under the License.
>>
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml
>> #log4j.file = none
>> # or resolve relatively e.g.
>> #log4j.file = ../../conf/Log4j.properties
>>
>> Modified: turbine/core/trunk/conf/test/TestFulcrumComponents.properties
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TestFulcrumComponents.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> --- turbine/core/trunk/conf/test/TestFulcrumComponents.properties
> (original)
>> +++ turbine/core/trunk/conf/test/TestFulcrumComponents.properties Wed
> Oct 31 15:07:41 2018
>> @@ -21,7 +21,7 @@
>> #
>> # -------------------------------------------------------------------
>>
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml
>> # context path: cft. javax.servlet.ServletContext.getResource(String)
>> pipeline.default.descriptor = conf/turbine-classic-pipeline.xml
>>
>>
>> Modified:
> turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> ---
> turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>
> (original)
>> +++
> turbine/core/trunk/conf/test/TurbineNonPersistentSchedulerServiceTest.properties
>
> Wed Oct 31 15:07:41 2018
>> @@ -21,7 +21,7 @@
>> #
>> # -------------------------------------------------------------------
>>
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml.properties
>>
>> # resource relative to context
>> pipeline.default.descriptor = /conf/turbine-classic-pipeline.xml
>>
>> Added: turbine/core/trunk/conf/test/log4j.xml
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/log4j.xml?rev=1845337&view=auto
>
>
> ==============================================================================
>> --- turbine/core/trunk/conf/test/log4j.xml (added)
>> +++ turbine/core/trunk/conf/test/log4j.xml Wed Oct 31 15:07:41 2018
>> @@ -0,0 +1,37 @@
>> +<?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 debug="false" xmlns:log4j="
> http://jakarta.apache.org/log4j/">
>> + <appender name="logfile" class="org.apache.log4j.FileAppender">
>> + <param name="append" value="false"/>
>> + <param name="File" value="target/turbine.log"/>
>> + <layout class="org.apache.log4j.PatternLayout">
>> + <param name="conversionPattern" value="%d [%t] %-5p %c -
> %m%n"/>
>> + </layout>
>> + </appender>
>> + <logger name="org.apache.turbine" additivity="false">
>> + <level value="DEBUG"/>
>> + <appender-ref ref="logfile"/>
>> + </logger>
>> + <root>
>> + <level value="ERROR"/>
>> + <appender-ref ref="logfile"/>
>> + </root>
>> +</log4j:configuration>
>> \ No newline at end of file
>>
>> Propchange: turbine/core/trunk/conf/test/log4j.xml
>>
> ------------------------------------------------------------------------------
>> svn:eol-style = native
>>
>> Modified: turbine/core/trunk/conf/test/usersettings.properties
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/conf/test/usersettings.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> --- turbine/core/trunk/conf/test/usersettings.properties (original)
>> +++ turbine/core/trunk/conf/test/usersettings.properties Wed Oct 31
> 15:07:41 2018
>> @@ -1,4 +1,4 @@
>> -log4j.file = Log4j.properties
>> +log4j.file = log4j.xml
>> # or resolve relatively
>> #log4j.file = ../../conf/Log4j.properties
>> module.cache=false
>>
>> Modified: turbine/core/trunk/pom.xml
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/pom.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> --- turbine/core/trunk/pom.xml (original)
>> +++ turbine/core/trunk/pom.xml Wed Oct 31 15:07:41 2018
>> @@ -823,6 +823,17 @@
>> <aggregate>false</aggregate>
>> </configuration>
>> </plugin>
>> + <plugin><!-- since 2.7 running the old report requires to
> register it explicitely, otherwise the build may fail -->
>> + <groupId>org.codehaus.mojo</groupId>
>> + <artifactId>cobertura-maven-plugin</artifactId>
>> + <reportSets>
>> + <reportSet>
>> + <reports>
>> + <report>cobertura</report>
>> + </reports>
>> + </reportSet>
>> + </reportSets>
>> + </plugin>
>> </plugins>
>> </reporting>
>>
>> @@ -944,8 +955,17 @@
>> <groupId>avalon-logkit</groupId>
>> <artifactId>avalon-logkit</artifactId>
>> </exclusion>
>> + <exclusion> <!-- exclude this to exclude beanutils v1.8.0 ->
> CVE-2014-0114 -->
>> + <groupId>commons-configuration</groupId>
>> + <artifactId>commons-configuration</artifactId>
>> + </exclusion>
>> </exclusions>
>> </dependency>
>> + <dependency> <!-- include more modern version just for
> torque-runtime v4.0 -->
>> + <groupId>commons-configuration</groupId>
>> + <artifactId>commons-configuration</artifactId>
>> + <version>1.10</version>
>> + </dependency>
>> <!-- using snapshot, until released -->
>> <dependency>
>> <groupId>org.apache.fulcrum</groupId>
>> @@ -1098,8 +1118,8 @@
>> <configuration>
>> <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
>> <descriptors>
>> - <descriptor>src/assembly/binaries.xml</descriptor>
>> - <descriptor>src/assembly/source.xml</descriptor>
>> + <descriptor>./src/assembly/binaries.xml</descriptor>
>> + <descriptor>./src/assembly/source.xml</descriptor>
>> </descriptors>
>> <tarLongFileFormat>gnu</tarLongFileFormat>
>> </configuration>
>> @@ -1110,14 +1130,13 @@
>> </build>
>> <properties>
>> <dependency.check.skip>false</dependency.check.skip>
>> + <doclint>none</doclint><!-- since javadoc v.3 this is the
> reuqired instead of -Xdoclint:none, remove if turbine parent is correct
> again using profile java8 -->
>> </properties>
>> </profile>
>> </profiles>
>>
>> <properties>
>> - <maven.compiler.source>1.8</maven.compiler.source>
>> - <maven.compiler.target>1.8</maven.compiler.target>
>> -
>> + <!-- maven.compiler setting in turbine parent -->
>> <!-- TODO: Change for release -->
>> <turbine.site.path>turbine/turbine-5.0</turbine.site.path>
>> <fulcrum.intake>2.0.0-SNAPSHOT</fulcrum.intake>
>>
>> Modified: turbine/core/trunk/src/assembly/binaries.xml
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/assembly/binaries.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> --- turbine/core/trunk/src/assembly/binaries.xml (original)
>> +++ turbine/core/trunk/src/assembly/binaries.xml Wed Oct 31 15:07:41
> 2018
>> @@ -71,6 +71,7 @@
>> <include>roleConfiguration.xml</include>
>> <include>turbine-classic-pipeline.xml</include>
>> <include>Log4j.properties</include>
>> + <include>log4j.xml</include>
>> <include>TurbineResources.properties</include>
>> </includes>
>> </fileSet>
>>
>> Modified: turbine/core/trunk/src/changes/changes.xml
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/changes/changes.xml?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> --- turbine/core/trunk/src/changes/changes.xml (original)
>> +++ turbine/core/trunk/src/changes/changes.xml Wed Oct 31 15:07:41 2018
>> @@ -25,6 +25,9 @@
>>
>> <body>
>> <release version="5.0" date="in Subversion">
>> + <action type="update" dev="jp">
>> + Update from lang to commons lang3
>> + </action>
>> <action type="add" dev="tv">
>> Add ServiceBroker.getApplicationRoot() to allow services to get
> their root directory
>> </action>
>>
>> Modified:
> turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> --- turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
> (original)
>> +++ turbine/core/trunk/src/java/org/apache/turbine/TurbineConstants.java
> Wed Oct 31 15:07:41 2018
>> @@ -51,7 +51,7 @@ public interface TurbineConstants
>> String LOG4J_CONFIG_FILE = "log4j.file";
>>
>> /** The default value for the Log4J File */
>> - String LOG4J_CONFIG_FILE_DEFAULT =
> "/WEB-INF/conf/Log4j.properties";
>> + String LOG4J_CONFIG_FILE_DEFAULT =
> "/WEB-INF/conf/log4j.xml";
>> /** This is the default log file to be used for logging
> */
>> String DEFAULT_LOGGER = "turbine";
>>
>> Modified:
> turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> ---
> turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>
> (original)
>> +++
> turbine/core/trunk/src/java/org/apache/turbine/modules/screens/PlainJSONScreen.java
>
> Wed Oct 31 15:07:41 2018
>> @@ -22,8 +22,6 @@ package org.apache.turbine.modules.scree
>> import java.io.OutputStreamWriter;
>> import java.io.PrintWriter;
>>
>> -import javax.servlet.http.HttpServletRequest;
>> -
>> import org.apache.turbine.pipeline.PipelineData;
>> import org.apache.turbine.util.RunData;
>> import org.slf4j.Logger;
>> @@ -101,14 +99,12 @@ public class PlainJSONScreen extends Raw
>> protected void doOutput(PipelineData pipelineData) throws Exception
>> {
>> RunData data = getRunData(pipelineData);
>> -
>> - HttpServletRequest request = data.getRequest();
>> // read in json!
>> String charset = "UTF-8"; //request.getCharacterEncoding();
>>
>> String json_res =data.getMessage();
>>
>> - log.debug( "json_res output:" +json_res );
>> + log.debug( "json_res output: {}", json_res );
>> PrintWriter out = new PrintWriter(
>> new
> OutputStreamWriter(data.getResponse().getOutputStream(),charset));
>> out.print(json_res.toString());
>>
>> Modified:
> turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> ---
> turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>
> (original)
>> +++
> turbine/core/trunk/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
>
> Wed Oct 31 15:07:41 2018
>> @@ -31,7 +31,7 @@
>> #
>> # -------------------------------------------------------------------
>>
>> -log4j.file = /WEB-INF/conf/Log4j.properties
>> +log4j.file = /WEB-INF/conf/log4j.xml
>>
>> # -------------------------------------------------------------------
>> #
>>
>> Modified:
> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
>> URL:
> http://svn.apache.org/viewvc/turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java?rev=1845337&r1=1845336&r2=1845337&view=diff
>
>
> ==============================================================================
>> ---
> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java
> (original)
>> +++
> turbine/core/trunk/src/test/org/apache/turbine/test/BaseTestCase.java Wed
> Oct 31 15:07:41 2018
>> @@ -41,8 +41,10 @@ import javax.servlet.ServletConfig;
>> import javax.servlet.http.HttpServletRequest;
>> import javax.servlet.http.HttpServletResponse;
>> import javax.servlet.http.HttpSession;
>> +import javax.xml.parsers.FactoryConfigurationError;
>>
>> import org.apache.log4j.PropertyConfigurator;
>> +import org.apache.log4j.xml.DOMConfigurator;
>> import org.apache.turbine.TurbineConstants;
>> import org.apache.turbine.pipeline.PipelineData;
>> import org.apache.turbine.services.TurbineServices;
>> @@ -63,25 +65,42 @@ import org.mockito.stubbing.Answer;
>> */
>> public abstract class BaseTestCase
>> {
>> - static File log4jFile = new File("conf/test/Log4j.properties");
>> + static File log4jFile = new File("conf/test/log4j.xml");
>>
>> @BeforeClass
>> public static void baseInit()
>> throws Exception
>> {
>>
>> - Properties p = new Properties();
>> - try
>> + if (log4jFile.getName().endsWith(".xml"))
>> {
>> - p.load(new FileInputStream(log4jFile));
>> - p.setProperty(TurbineConstants.APPLICATION_ROOT_KEY, new
> File(".").getAbsolutePath());
>> - PropertyConfigurator.configure(p);
>> -
>> + // load XML type configuration
>> + // NOTE: Only system property expansion available
>> + try
>> + {
>> + DOMConfigurator.configure(log4jFile.getAbsolutePath());
>> + }
>> + catch (FactoryConfigurationError e)
>> + {
>> + System.err.println("Could not configure Log4J from
> configuration file "
>> + + log4jFile + ": ");
>> + e.printStackTrace();
>> + }
>> }
>> - catch (FileNotFoundException fnf)
>> - {
>> - System.err.println("Could not open Log4J configuration file
> "
>> - + log4jFile);
>> + else {
>> + Properties p = new Properties();
>> + try
>> + {
>> + p.load(new FileInputStream(log4jFile));
>> + p.setProperty(TurbineConstants.APPLICATION_ROOT_KEY,
> new File(".").getAbsolutePath());
>> + PropertyConfigurator.configure(p);
>> +
>> + }
>> + catch (FileNotFoundException fnf)
>> + {
>> + System.err.println("Could not open Log4J configuration
> file "
>> + + log4jFile);
>> + }
>> }
>> }
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
> For additional commands, e-mail: dev-help@turbine.apache.org
>
>
>
>