db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g.@apache.org
Subject svn commit: r1855923 [1/2] - in /db/torque/torque4/trunk: ./ torque-generator/ torque-generator/src/main/java/org/apache/torque/generator/configuration/ torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/ torque-generat...
Date Wed, 20 Mar 2019 16:19:40 GMT
Author: gk
Date: Wed Mar 20 16:19:39 2019
New Revision: 1855923

URL: http://svn.apache.org/viewvc?rev=1855923&view=rev
Log:
- Updated Owasp to 5.0.0-M2, due to checks updated guava and suppressions of groovy
- Upgraded to log4j2 with log4j 1.2 and commons adapters
- Use now commons-lang3 instead of commons.lang
- Replace commons-logging with log4j2-jcl
- NOT yet upgraded velocity from 1.7 to  2.0 - attribute inheritance issue in torque-templates TestProcessing html, xdoc
- Update Jdbc2SchemaTest test with timestamps.

Added:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Log4j2LoggingAdapter.java   (with props)
    db/torque/torque4/trunk/torque-generator/src/main/resources/org/apache/torque/generator/log4j2.xml   (with props)
    db/torque/torque4/trunk/torque-generator/src/test/resources/log4j2-test.xml   (with props)
    db/torque/torque4/trunk/torque-runtime/src/test/resources/log4j2-test.xml   (with props)
    db/torque/torque4/trunk/torque-templates/src/test/resources/log4j2-test.xml   (with props)
Modified:
    db/torque/torque4/trunk/pom.xml
    db/torque/torque4/trunk/suppression-owasp-fp.xml
    db/torque/torque4/trunk/torque-generator/pom.xml
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/AbstractConfigurationProvider.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/SaxHelper.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Output.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/ReflectionOutletSaxHandlerFactory.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/ConfigurableClassSaxHandler.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletResult.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/ModifySourcenameOutlet.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/Namespace.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/QualifiedName.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/PostprocessorDefinition.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceElementAttributePointer.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceTransformerDefinition.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformer.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/GetterSetterNameTransformer.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformer.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/groovy/TorqueGenGroovy.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/TorqueGenVelocity.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/BaseTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java
    db/torque/torque4/trunk/torque-runtime/pom.xml
    db/torque/torque4/trunk/torque-runtime/src/conf/Torque.properties
    db/torque/torque4/trunk/torque-templates/pom.xml
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformFactory.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/FieldHelper.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMTableAndViewTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLModelTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/SizedForBitDataSqlType.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/SqlType.java
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/derby/index.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/hsqldb/index.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/index.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/index.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/columnComment.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/index.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableComment.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/columnComment.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.groovy
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.groovy
    db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql

Modified: db/torque/torque4/trunk/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/pom.xml?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/pom.xml (original)
+++ db/torque/torque4/trunk/pom.xml Wed Mar 20 16:19:39 2019
@@ -312,10 +312,26 @@
 
   <dependencyManagement>
     <dependencies>
+
+      <dependency>
+        <groupId>org.apache.logging.log4j</groupId>
+        <artifactId>log4j-jcl</artifactId>
+        <version>${log4j2.version}</version>
+      </dependency>
       <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <version>1.2.17</version>
+        <groupId>org.apache.logging.log4j</groupId>
+        <artifactId>log4j-api</artifactId>
+        <version>${log4j2.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.logging.log4j</groupId>
+         <artifactId>log4j-core</artifactId>
+         <version>${log4j2.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.logging.log4j</groupId>
+        <artifactId>log4j-1.2-api</artifactId>
+        <version>${log4j2.version}</version>
       </dependency>
 
       <dependency>
@@ -355,12 +371,6 @@
       </dependency>
   
       <dependency>
-        <groupId>commons-logging</groupId>
-        <artifactId>commons-logging</artifactId>
-        <version>1.2</version>
-      </dependency>
-  
-      <dependency>
         <groupId>commons-io</groupId>
         <artifactId>commons-io</artifactId>
         <version>2.6</version>
@@ -491,6 +501,7 @@
           </systemProperties>
         </configuration>
       </plugin>
+      <!-- hint: mvn verify -Ddependency.check.skip=false -->
       <plugin>
         <groupId>org.owasp</groupId>
         <artifactId>dependency-check-maven</artifactId>
@@ -544,7 +555,7 @@
         <plugin>
           <groupId>org.owasp</groupId>
           <artifactId>dependency-check-maven</artifactId>
-          <version>3.3.2</version>
+          <version>5.0.0-M1</version>
         </plugin>
       </plugins>
     </pluginManagement>
@@ -576,9 +587,9 @@
     <maven.compiler.target>1.8</maven.compiler.target>  
     <dependency.check.skip>true</dependency.check.skip>
     
-    <junit.jupiter.version>5.3.2</junit.jupiter.version>
-    <junit.platform>1.3.2</junit.platform>
-        
+    <junit.jupiter.version>5.3.2</junit.jupiter.version>    
+    <log4j2.version>2.11.2</log4j2.version>
+    
   </properties>
   
   <profiles>

Modified: db/torque/torque4/trunk/suppression-owasp-fp.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/suppression-owasp-fp.xml?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/suppression-owasp-fp.xml (original)
+++ db/torque/torque4/trunk/suppression-owasp-fp.xml Wed Mar 20 16:19:39 2019
@@ -27,4 +27,12 @@
      <sha1>5af35056b4d257e4b64b9e8069c0746e8b08629f</sha1>
      <cve>CVE-2017-5645</cve>
   </suppress>
+  <!-- concerning Groovy LDAP API -->
+  <suppress>
+     <notes><![CDATA[
+     file name: groovy-templates-2.5.6.jar
+     ]]></notes>
+     <gav regex="true">^org\.codehaus\.groovy:groovy-.*:.*$</gav>
+     <cve>CVE-2016-6497</cve>
+  </suppress>
 </suppressions>
\ No newline at end of file

Modified: db/torque/torque4/trunk/torque-generator/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/pom.xml?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/pom.xml (original)
+++ db/torque/torque4/trunk/torque-generator/pom.xml Wed Mar 20 16:19:39 2019
@@ -50,13 +50,17 @@
       </exclusions>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
     </dependency>
+    
+    <!-- this is needed for velocity 2.0, it contains slf4j-api -->
+    <!--dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+      <version>${log4j2.version}</version>
+      <scope>runtime</scope>
+    </dependency-->
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
@@ -75,11 +79,15 @@
       <version>1.3</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.velocity</groupId>
+       <groupId>org.apache.velocity</groupId>
       <artifactId>velocity</artifactId>
       <version>1.7</version>
+      <!--groupId>org.apache.velocity</groupId>
+      <artifactId>velocity-engine-core</artifactId>
+      <version>2.0</version-->
     </dependency>
-    <!-- upgrading to at least 2.4.8 due to CVE-2015-3253 and http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-6814  -->
+    <!--  2.5.6:  https://nvd.nist.gov/vuln/detail/CVE-2016-6497 -< Groovy LDAP API
+    upgrading to at least 2.4.8 due to CVE-2015-3253 and http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-6814  -->
     <dependency>
         <groupId>org.codehaus.groovy</groupId>
         <artifactId>groovy-all</artifactId>
@@ -90,6 +98,71 @@
             <groupId>org.codehaus.groovy</groupId>
             <artifactId>groovy-testng</artifactId>
           </exclusion>
+          <!-- we do not use groovy sql, ecluding all which is not needed -->
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-sql</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-ant</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-json</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-jmx</artifactId>
+          </exclusion>          
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-datetime</artifactId>
+          </exclusion>                    
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-xml</artifactId>
+          </exclusion>    
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-docgenerator</artifactId>
+          </exclusion>    
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-test</artifactId>
+          </exclusion> 
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-nio</artifactId>
+          </exclusion>            
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-macro</artifactId>
+          </exclusion>  
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-swing</artifactId>
+          </exclusion>  
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-jsr223</artifactId>
+          </exclusion> 
+           <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-console</artifactId>
+          </exclusion> 
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-servlet</artifactId>
+          </exclusion> 
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-groovysh</artifactId>
+          </exclusion> 
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-groovydoc</artifactId>
+          </exclusion> 
         </exclusions>
     </dependency>
     <dependency>
@@ -129,6 +202,10 @@
         <version>10.14.2.0</version>
         <scope>test</scope>
     </dependency>
+    <dependency>
+        <groupId>org.apache.fulcrum</groupId>
+        <artifactId>fulcrum-testcontainer</artifactId>
+    </dependency>
   </dependencies>
 
   <build>

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/AbstractConfigurationProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/AbstractConfigurationProvider.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/AbstractConfigurationProvider.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/AbstractConfigurationProvider.java Wed Mar 20 16:19:39 2019
@@ -26,7 +26,7 @@ import org.apache.torque.generator.confi
 
 /**
  * A base class for all ConfigurationProvider implementations.
- * @version $Id: $
+ * @version $Id$
  */
 public abstract class AbstractConfigurationProvider
 implements ConfigurationProvider

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java Wed Mar 20 16:19:39 2019
@@ -29,7 +29,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.generator.configuration.paths.ProjectPaths;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/SaxHelper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/SaxHelper.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/SaxHelper.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/SaxHelper.java Wed Mar 20 16:19:39 2019
@@ -19,7 +19,7 @@ package org.apache.torque.generator.conf
  * under the License.
  */
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 

Added: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Log4j2LoggingAdapter.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Log4j2LoggingAdapter.java?rev=1855923&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Log4j2LoggingAdapter.java (added)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Log4j2LoggingAdapter.java Wed Mar 20 16:19:39 2019
@@ -0,0 +1,98 @@
+package org.apache.torque.generator.configuration.controller;
+
+/*
+ * 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.
+ */
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.core.config.Configurator;
+
+
+/**
+ * Allows reading and setting the current loglevel using log4j2.
+ * 
+ * @version $Id$
+ *
+ */
+public class Log4j2LoggingAdapter implements LoggingAdapter
+{
+    /** The logger. */
+    private static Logger log = LogManager.getLogger(Log4j2LoggingAdapter.class);
+
+    /** Map loglevel -> corresponding log4j level. */
+    private final Map<Loglevel, Level> log4jLevels;
+
+    public Log4j2LoggingAdapter()
+    {
+        Map<Loglevel, Level> levels = new HashMap<>();
+        levels.put(Loglevel.TRACE, Level.TRACE);
+        levels.put(Loglevel.DEBUG, Level.DEBUG);
+        levels.put(Loglevel.INFO, Level.INFO);
+        levels.put(Loglevel.WARN, Level.WARN);
+        levels.put(Loglevel.ERROR, Level.ERROR);
+        log4jLevels = Collections.unmodifiableMap(levels);
+    }
+
+    /**
+     * Returns the current loglevel by reading the loglevel of the root logger.
+     *
+     * @return the current loglevel, or INFO if the current loglevel cannot
+     *         be determined.
+     */
+    @Override
+    public Loglevel getCurrentLoglevel()
+    {
+        Level level = LogManager.getRootLogger().getLevel();
+        for (Map.Entry<Loglevel, Level> loglevel : log4jLevels.entrySet())
+        {
+            if (loglevel.getValue().equals(level))
+            {
+                return loglevel.getKey();
+            }
+        }
+        return Loglevel.INFO;
+    }
+
+    /**
+     * Sets the loglevel to the given loglevel
+     * by changing the level of the log4j root logger.
+     *
+     *  @param loglevel the loglevel to set, not null.
+     */
+    @Override
+    public void setLoglevel(final Loglevel loglevel)
+    {
+        if (loglevel == null)
+        {
+            return;
+        }
+        Level log4jLevel = log4jLevels.get(loglevel);
+        if (LogManager.getRootLogger().getLevel() != log4jLevels.get(loglevel))
+        {
+            log.info("apply() : Setting loglevel to " + loglevel);
+            // implementation
+            Configurator.setRootLevel(log4jLevel);
+        }
+    }
+}

Propchange: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Log4j2LoggingAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Output.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Output.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Output.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/controller/Output.java Wed Mar 20 16:19:39 2019
@@ -22,7 +22,7 @@ package org.apache.torque.generator.conf
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.control.existingtargetstrategy.ReplaceTargetFileStrategy;
 import org.apache.torque.generator.control.outputtype.UnknownOutputType;
 import org.apache.torque.generator.outlet.Outlet;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/ReflectionOutletSaxHandlerFactory.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/ReflectionOutletSaxHandlerFactory.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/ReflectionOutletSaxHandlerFactory.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/ReflectionOutletSaxHandlerFactory.java Wed Mar 20 16:19:39 2019
@@ -22,7 +22,7 @@ package org.apache.torque.generator.conf
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.generator.configuration.ConfigurationHandlers;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/ConfigurableClassSaxHandler.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/ConfigurableClassSaxHandler.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/ConfigurableClassSaxHandler.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/ConfigurableClassSaxHandler.java Wed Mar 20 16:19:39 2019
@@ -27,7 +27,7 @@ import java.util.ArrayList;
 
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.generator.configuration.ConfigurationProvider;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java Wed Mar 20 16:19:39 2019
@@ -31,11 +31,11 @@ import java.util.Set;
 import java.util.StringTokenizer;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 
 /**
  * Stores Checksums and dates of the checksums, keyed by a String.
- * @version $Id: $
+ * @version $Id$
  *
  */
 public class Checksums

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java Wed Mar 20 16:19:39 2019
@@ -31,11 +31,13 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.PropertyConfigurator;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
+import org.apache.logging.log4j.core.config.ConfigurationSource;
 import org.apache.torque.generator.GeneratorException;
 import org.apache.torque.generator.configuration.Configuration;
 import org.apache.torque.generator.configuration.ConfigurationException;
@@ -137,40 +139,43 @@ public class Controller
         final List<UnitConfiguration> unitConfigurations
         = configuration.getUnitConfigurations();
         final ControllerState controllerState = new ControllerState();
-        for (final UnitConfiguration unitConfiguration : unitConfigurations)
-        {
-            processGenerationUnit(
-                    controllerState,
-                    unitConfiguration);
-        }
+        unitConfigurations.stream().forEach( unitConfiguration -> {
+            try {
+                processGenerationUnit(
+                        controllerState,
+                        unitConfiguration);
+            } catch (GeneratorException e) {
+               log.error(e.getMessage());
+               throw new RuntimeException(e);
+            }
+        });
         controllerState.getVariableStore().endGeneration();
     }
 
     /**
      * Initializes the Logging.
+     * 
      */
     protected void initLogging()
     {
-        String log4jConfiguration = System.getProperty("log4j.configuration");
+        String log4jConfiguration = System.getProperty("log4j2.configuration");
         if (log4jConfiguration != null)
         {
-            log.info("Using external log4j configuration from " + log4jConfiguration);
+            log.info("Using external log4j2 configuration from " + log4jConfiguration);
             return;
         }
 
         final InputStream log4jStream
         = Controller.class.getClassLoader().getResourceAsStream(
-                "org/apache/torque/generator/log4j.properties");
-        final Properties log4jProperties = new Properties();
-        try
-        {
-            log4jProperties.load(log4jStream);
-        }
-        catch (final IOException e)
-        {
-            throw new RuntimeException(e);
+                "org/apache/torque/generator/log4j2.xml");
+        ConfigurationSource source;
+        try {
+            source = new ConfigurationSource(log4jStream);
+            LoggerContext lc = (LoggerContext) LogManager.getContext(false);
+            lc.start( ConfigurationFactory.getInstance().getConfiguration(lc, source));
+        } catch (IOException e) {
+            log.error(e.getMessage(),e);
         }
-        PropertyConfigurator.configure(log4jProperties);
     }
 
     /**
@@ -233,13 +238,18 @@ public class Controller
             }
         }
         final List<Output> outputList = unitConfiguration.getOutputList();
-        for (final Output output : outputList)
-        {
-            processOutput(
-                    output,
-                    controllerState,
-                    unitConfiguration);
-        }
+        outputList.stream().forEach( output -> {
+            try {
+                processOutput(
+                        output,
+                        controllerState,
+                        unitConfiguration);
+            } catch (GeneratorException e) {
+                log.error(e.getMessage(), e);
+                throw new RuntimeException(e);
+            }
+        });
+
         if (unitConfiguration.isRunOnlyOnSourceChange())
         {
             try

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java Wed Mar 20 16:19:39 2019
@@ -23,7 +23,7 @@ import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.configuration.UnitConfiguration;
 import org.apache.torque.generator.configuration.controller.OutletReference;
 import org.apache.torque.generator.configuration.controller.Output;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java Wed Mar 20 16:19:39 2019
@@ -30,7 +30,7 @@ import java.util.List;
 
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOCase;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletResult.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletResult.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletResult.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletResult.java Wed Mar 20 16:19:39 2019
@@ -21,8 +21,8 @@ package org.apache.torque.generator.outl
 
 import java.util.Arrays;
 
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.torque.generator.GeneratorException;
 
 /**

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java Wed Mar 20 16:19:39 2019
@@ -23,7 +23,7 @@ import java.util.HashSet;
 import java.util.Set;
 import java.util.StringTokenizer;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.GeneratorException;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.outlet.OutletImpl;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/ModifySourcenameOutlet.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/ModifySourcenameOutlet.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/ModifySourcenameOutlet.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/ModifySourcenameOutlet.java Wed Mar 20 16:19:39 2019
@@ -22,7 +22,7 @@ package org.apache.torque.generator.outl
 
 import java.io.File;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Logger;
 import org.apache.torque.generator.GeneratorException;
 import org.apache.torque.generator.control.ControllerState;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/Namespace.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/Namespace.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/Namespace.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/Namespace.java Wed Mar 20 16:19:39 2019
@@ -24,7 +24,7 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 
 /**
  * An instance of this class represents a hierarchical namespace. The hierarchy

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/QualifiedName.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/QualifiedName.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/QualifiedName.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/qname/QualifiedName.java Wed Mar 20 16:19:39 2019
@@ -19,7 +19,7 @@ package org.apache.torque.generator.qnam
  * under the License.
  */
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 
 
 /**

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/PostprocessorDefinition.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/PostprocessorDefinition.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/PostprocessorDefinition.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/PostprocessorDefinition.java Wed Mar 20 16:19:39 2019
@@ -19,15 +19,15 @@ package org.apache.torque.generator.sour
  * under the License.
  */
 
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.torque.generator.processor.string.StringProcessor;
 
 /**
  * All necessary informations for postprocessing the result.
  * Contains the postprocessor instance.
  *
- * $Id: SourceTransformerDefinition.java 1470235 2013-04-20 21:23:39Z tfischer $
+ * $Id$
  */
 public final class PostprocessorDefinition
 {

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceElementAttributePointer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceElementAttributePointer.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceElementAttributePointer.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceElementAttributePointer.java Wed Mar 20 16:19:39 2019
@@ -24,8 +24,8 @@ import org.apache.commons.jxpath.ri.QNam
 import org.apache.commons.jxpath.ri.compiler.NodeTest;
 import org.apache.commons.jxpath.ri.compiler.NodeTypeTest;
 import org.apache.commons.jxpath.ri.model.NodePointer;
-import org.apache.commons.lang.ObjectUtils;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
 
 /**
  * A node pointer pointing to an attribute of a SourceElement.
@@ -33,7 +33,7 @@ import org.apache.commons.lang.builder.H
  * @author Dmitri Plotnikov
  * @author Thomas Fox
  *
- * @version $Id: $
+ * @version $Id$
  */
 public class SourceElementAttributePointer extends NodePointer
 {

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceTransformerDefinition.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceTransformerDefinition.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceTransformerDefinition.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/SourceTransformerDefinition.java Wed Mar 20 16:19:39 2019
@@ -19,8 +19,8 @@ package org.apache.torque.generator.sour
  * under the License.
  */
 
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.torque.generator.source.transform.SourceTransformer;
 
 /**

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java Wed Mar 20 16:19:39 2019
@@ -35,7 +35,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.generator.jdbc.SchemaType;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java Wed Mar 20 16:19:39 2019
@@ -26,7 +26,7 @@ import java.util.LinkedHashSet;
 import java.util.Properties;
 import java.util.Set;
 
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.source.SourceElement;
 import org.apache.torque.generator.source.SourceException;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformer.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformer.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformer.java Wed Mar 20 16:19:39 2019
@@ -19,7 +19,7 @@ package org.apache.torque.generator.sour
  * under the License.
  */
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Logger;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.processor.string.Camelbacker;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/GetterSetterNameTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/GetterSetterNameTransformer.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/GetterSetterNameTransformer.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/GetterSetterNameTransformer.java Wed Mar 20 16:19:39 2019
@@ -19,7 +19,7 @@ package org.apache.torque.generator.sour
  * under the License.
  */
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Logger;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.processor.string.Camelbacker;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformer.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformer.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformer.java Wed Mar 20 16:19:39 2019
@@ -23,8 +23,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.generator.configuration.ConfigurationException;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/groovy/TorqueGenGroovy.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/groovy/TorqueGenGroovy.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/groovy/TorqueGenGroovy.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/groovy/TorqueGenGroovy.java Wed Mar 20 16:19:39 2019
@@ -22,7 +22,7 @@ package org.apache.torque.generator.temp
 import java.io.File;
 import java.util.Date;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.GeneratorException;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.variable.Variable;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/TorqueGenVelocity.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/TorqueGenVelocity.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/TorqueGenVelocity.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/TorqueGenVelocity.java Wed Mar 20 16:19:39 2019
@@ -22,8 +22,9 @@ package org.apache.torque.generator.temp
 import java.io.File;
 import java.util.Date;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.GeneratorException;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.source.SourceElement;
@@ -50,7 +51,7 @@ public class TorqueGenVelocity
     /**
      * A counter which can be used in velocity templates.
      */
-    private static int counter = 1;
+    private static AtomicInteger counter = new AtomicInteger(1);
 
     /**
      * Constructs a generator interface within the given controllerState.
@@ -344,16 +345,16 @@ public class TorqueGenVelocity
      *
      * @return the counter value.
      */
-    public static synchronized int getCounter()
+    public static int getCounter()
     {
-        return counter++;
+        return counter.incrementAndGet();
     }
 
     /**
      * Resets the counter accessible though <code>getCounter()</code> back to 1.
      */
-    public static synchronized void resetCounter()
+    public static  void resetCounter()
     {
-        counter = 1;
+        counter.set(1);
     }
 }

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java Wed Mar 20 16:19:39 2019
@@ -24,8 +24,8 @@ import java.io.Writer;
 import java.util.Properties;
 import java.util.Set;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.apache.torque.generator.GeneratorException;
 import org.apache.torque.generator.configuration.ConfigurationException;
 import org.apache.torque.generator.configuration.ConfigurationProvider;
@@ -71,7 +71,7 @@ public class VelocityOutlet extends Temp
     public static final String NULL_KEY_CONTEXT_NAME = "value";
 
     /** The log. */
-    private static Log log = LogFactory.getLog(VelocityOutlet.class);
+    private static Logger log = LogManager.getLogger(VelocityOutlet.class);
 
     /**
      * Whether the options should be put into the context.
@@ -193,6 +193,7 @@ public class VelocityOutlet extends Temp
 
     /**
      * Executes the generation process; the result is returned.
+     * 
      *
      * @param controllerState the current controller state.
      *
@@ -215,12 +216,29 @@ public class VelocityOutlet extends Temp
             try
             {
                 Properties properties = new Properties();
-                properties.put(
-                        RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
-                        Log4JLogChute.class.getName());
-                properties.put(
-                        RuntimeConstants.RUNTIME_LOG,
-                        "");
+                properties.put( RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
+                      Log4JLogChute.class.getName());
+                   
+                // test
+                properties.put(RuntimeConstants.EVALUATE_CONTEXT_CLASS, "org.apache.velocity.VelocityContext");   
+//                properties.put(
+//                        "runtime.conversion.handler",
+//                        "none");
+//                properties.put(
+//                        RuntimeConstants.SPACE_GOBBLING,
+//                        "bc");
+//                properties.put(
+//                        RuntimeConstants.CHECK_EMPTY_OBJECTS,
+//                        "false");
+                /*
+                 * may add props
+                 * 
+                 * runtime.conversion.handler = none
+                 * space.gobbling = bc
+                 * directive.if.emptycheck = false
+                 * 
+                 * cf. http://velocity.apache.org/engine/2.0/upgrading.html
+                 */
                 Velocity.init(properties);
             }
             catch (Exception e)

Added: db/torque/torque4/trunk/torque-generator/src/main/resources/org/apache/torque/generator/log4j2.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/resources/org/apache/torque/generator/log4j2.xml?rev=1855923&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/resources/org/apache/torque/generator/log4j2.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/main/resources/org/apache/torque/generator/log4j2.xml Wed Mar 20 16:19:39 2019
@@ -0,0 +1,45 @@
+<?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.
+-->
+<Configuration status="warn" name="Torque" packages="">
+     <Appenders>
+       <Console name="console" target="SYSTEM_OUT">
+          <PatternLayout pattern="%d [%t] %-5p | %c - %m%n"/>
+      </Console>
+      <File name="torque" fileName="./target/torque-gen/log/torque-gen.log">
+          <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
+        </File>
+        <File name="velocity" fileName="./target/torque-gen/log/velocity.log">
+          <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
+        </File>
+    </Appenders>
+    <Loggers>
+       <Logger name="org.apache.torque" additivity="false" level="ALL">
+          <AppenderRef ref="torque" level="DEBUG"/>
+         <AppenderRef ref="console" level="INFO"/>
+      </Logger>
+      <Logger name="org.apache.velocity" additivity="false" level="INFO">
+          <AppenderRef ref="velocity"/>
+          <AppenderRef ref="console"/>
+      </Logger>
+      <Root level="INFO"><!-- log4j 1.2 has DEBUG -->
+          <AppenderRef ref="console"/>
+      </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file

Propchange: db/torque/torque4/trunk/torque-generator/src/main/resources/org/apache/torque/generator/log4j2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/BaseTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/BaseTest.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/BaseTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/BaseTest.java Wed Mar 20 16:19:39 2019
@@ -1,5 +1,7 @@
 package org.apache.torque.generator;
 
+import org.apache.log4j.BasicConfigurator;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,7 +21,7 @@ package org.apache.torque.generator;
  * under the License.
  */
 
-import org.apache.log4j.BasicConfigurator;
+
 
 /**
  * Base class for all tests. Configures the logger.

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java Wed Mar 20 16:19:39 2019
@@ -19,8 +19,8 @@ package org.apache.torque.generator.conf
  * under the License.
  */
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 
 import java.io.File;
 import java.util.HashMap;
@@ -33,8 +33,9 @@ import org.apache.commons.io.IOUtils;
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.ProjectPaths;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
 
 /**
  * Tests for the class ClasspathConfigurationProvider.
@@ -46,7 +47,7 @@ public class ClasspathConfigurationProvi
     /** System under Test. */
     private ClasspathConfigurationProvider classpathConfigurationProvider;
 
-    @Before
+    @BeforeEach
     public void before()
     {
         Map<String, File> outputDirMap = new HashMap<>();

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java Wed Mar 20 16:19:39 2019
@@ -19,13 +19,13 @@ package org.apache.torque.generator.conf
  * under the License.
  */
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -36,8 +36,12 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.apache.torque.generator.BaseTest;
+import org.apache.torque.generator.configuration.controller.Log4j2LoggingAdapter;
+import org.apache.torque.generator.configuration.controller.Log4jLoggingAdapter;
 import org.apache.torque.generator.configuration.controller.Loglevel;
 import org.apache.torque.generator.configuration.controller.OutletReference;
 import org.apache.torque.generator.configuration.controller.Output;
@@ -70,8 +74,12 @@ import org.apache.torque.generator.sourc
 import org.apache.torque.generator.source.stream.PropertiesSourceFormat;
 import org.apache.torque.generator.source.stream.XmlSourceFormat;
 import org.apache.torque.generator.template.velocity.VelocityOutlet;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.RepeatedTest;
+import org.junit.jupiter.api.RepetitionInfo;
+import org.junit.jupiter.api.TestInfo;
+
 
 
 /**
@@ -80,18 +88,32 @@ import org.junit.Test;
 public class ReadConfigurationTest extends BaseTest
 {
     private ControllerState controllerState;
+    
+    private Logger logger = LogManager.getLogger(getClass());
+    
 
-    @Before
-    public void setUp()
+    @BeforeEach
+    public void setUp(TestInfo testInfo, RepetitionInfo repetitionInfo)
     {
         controllerState = new ControllerState();
+
+        int currentRepetition = repetitionInfo.getCurrentRepetition();
+        if (currentRepetition % 2 == 0) {
+            Loglevel.setLoggingAdapter(new Log4j2LoggingAdapter());  
+        } else {
+           // no implicit Loglevel.setLoggingAdapter(null);
+            Loglevel.setLoggingAdapter(new Log4jLoggingAdapter());  
+        }
         UnitConfiguration unitConfiguration = new UnitConfiguration();
+        // unit configuration
+        logger.info(currentRepetition + " loglevel type:" + Loglevel.getLoggingAdapter().getClass());
         controllerState.setUnitConfiguration(unitConfiguration);
         Options options = new Options();
         unitConfiguration.setOptions(options);
     }
 
-    @Test
+    @RepeatedTest(value = 4, name = "{displayName} {currentRepetition}/{totalRepetitions}")
+    @DisplayName("test read configuration")
     public void testReadConfiguration() throws Exception
     {
         ProjectPaths projectPaths = new Maven2DirectoryProjectPaths(
@@ -478,7 +500,8 @@ public class ReadConfigurationTest exten
         }
     }
 
-    @Test
+    @RepeatedTest(value = 2, name = "{displayName} {currentRepetition}/{totalRepetitions}")
+    @DisplayName("test read from classpath configuration")
     public void testReadConfigFromClasspath() throws Exception
     {
         Map<String, File> outputDirMap = new HashMap<>();
@@ -508,7 +531,7 @@ public class ReadConfigurationTest exten
             Options options = unitConfiguration.getOptions();
             Option option  = options.getInHierarchy(
                     new QualifiedName("configuration"));
-            assertNotNull("option configuration should be set", option);
+            assertNotNull(option, "option configuration should be set");
             assertEquals("fromClasspath", option.getValue());
         }
 
@@ -523,7 +546,8 @@ public class ReadConfigurationTest exten
         }
     }
 
-    @Test
+    @RepeatedTest(value = 2, name = "{displayName} {currentRepetition}/{totalRepetitions}")
+    @DisplayName("test override configuration")
     public void testOverrideOptions() throws Exception
     {
         ProjectPaths projectPaths = new Maven2DirectoryProjectPaths(
@@ -561,7 +585,8 @@ public class ReadConfigurationTest exten
     }
 
 
-    @Test
+    @RepeatedTest(value = 2, name = "{displayName} {currentRepetition}/{totalRepetitions}")
+    @DisplayName("test inheritance configuration")
     public void testInheritance() throws Exception
     {
         CustomProjectPaths projectPaths;

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java Wed Mar 20 16:19:39 2019
@@ -26,11 +26,12 @@ import static org.junit.jupiter.api.Asse
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.BaseTest;
 import org.apache.torque.generator.configuration.UnitDescriptor;
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
@@ -87,8 +88,8 @@ public class PropertyToJavaGenerationTes
         assertTrue(propertiesResultFile.exists());
         File propertiesExpectedFile
             = new File("src/test/propertyToJava/expectedProperties.properties");
-        assertEquals(FileUtils.readFileToString(propertiesExpectedFile),
-                FileUtils.readFileToString(propertiesResultFile));
+        assertEquals(FileUtils.readFileToString(propertiesExpectedFile, StandardCharsets.ISO_8859_1),
+                FileUtils.readFileToString(propertiesResultFile, StandardCharsets.ISO_8859_1));
     }
 
     /**
@@ -133,8 +134,8 @@ public class PropertyToJavaGenerationTes
         assertTrue(propertiesResultFile.exists());
         File propertiesExpectedFile
             = new File("src/test/propertyToJava/expectedPropertiesDebugOutput.properties");
-        assertEquals(FileUtils.readFileToString(propertiesExpectedFile),
-                FileUtils.readFileToString(propertiesResultFile));
+        assertEquals(FileUtils.readFileToString(propertiesExpectedFile, StandardCharsets.ISO_8859_1),
+                FileUtils.readFileToString(propertiesResultFile, StandardCharsets.ISO_8859_1));
     }
 
     /**
@@ -151,6 +152,9 @@ public class PropertyToJavaGenerationTes
         File targetDir = new File("target/test/propertyToJava");
         File cacheDir = new File("target/cache/propertyToJava");
         File sourceDir = new File("target/source/propertyToJava");
+        FileUtils.cleanDirectory(targetDir);
+        FileUtils.cleanDirectory(cacheDir);
+        FileUtils.cleanDirectory(sourceDir);
         FileUtils.deleteDirectory(targetDir);
         FileUtils.deleteDirectory(cacheDir);
         FileUtils.deleteDirectory(sourceDir);
@@ -233,14 +237,14 @@ public class PropertyToJavaGenerationTes
         File checksumFile = new File(
                 cacheDir,
                 "last-source-changes.checksums");
-        String checksumContent = FileUtils.readFileToString(checksumFile, "ISO-8859-1");
+        String checksumContent = FileUtils.readFileToString(checksumFile, StandardCharsets.ISO_8859_1);
         // check contains only one line
         assertEquals(1, StringUtils.countMatches(checksumContent, "\n"));
         int firstMinusPos = checksumContent.indexOf("-");
         int secondMinusPos = checksumContent.indexOf("-", firstMinusPos + 1);
         String checksum = checksumContent.substring(firstMinusPos, secondMinusPos + 1);
         String changedChecksumContent = checksumContent.replace(checksum, "-AA-");
-        FileUtils.writeStringToFile(checksumFile, changedChecksumContent, "ISO-8859-1");
+        FileUtils.writeStringToFile(checksumFile, changedChecksumContent, StandardCharsets.ISO_8859_1);
 
         // delete target so we can see if generation runs again
         assertTrue(propertiesResultFile.delete());

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java Wed Mar 20 16:19:39 2019
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertEqu
 import java.io.File;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.configuration.UnitConfiguration;
 import org.apache.torque.generator.configuration.source.EntityReferences;
 import org.apache.torque.generator.control.ControllerState;

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/log4j2-test.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/log4j2-test.xml?rev=1855923&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/log4j2-test.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/log4j2-test.xml Wed Mar 20 16:19:39 2019
@@ -0,0 +1,49 @@
+<?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.
+-->
+<Configuration status="warn" name="Torque" packages="">
+     <Appenders>
+       <Console name="console" target="SYSTEM_OUT">
+          <PatternLayout pattern="%d [%t] %-5p | %c - %m%n"/>
+      </Console>
+      <File name="torque" fileName="./target/torque-gen/log/torque-gen.log">
+          <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
+      </File>
+       <File name="velocity" fileName="./target/torque-gen/log/velocity.log">
+          <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
+      </File>
+    </Appenders>
+    <Loggers>
+          <Logger name="org.apache.torque" additivity="false" level="DEBUG">
+          <AppenderRef ref="torque" level="DEBUG"/>
+          <AppenderRef ref="console" level="INFO"/>
+      </Logger>
+      <Logger name="org.apache.torque.generator.template.velocity" additivity="false" level="DEBUG">
+          <AppenderRef ref="torque" level="DEBUG"/>
+          <AppenderRef ref="console" level="INFO"/>
+      </Logger>
+      <Logger name="org.apache.velocity" additivity="false" level="DEBUG">
+          <AppenderRef ref="velocity" level="DEBUG"/>
+          <AppenderRef ref="console" level="DEBUG"/>
+      </Logger>
+      <Root level="INFO"><!-- log4j 1.2 has DEBUG -->
+          <AppenderRef ref="console"/>
+      </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file

Propchange: db/torque/torque4/trunk/torque-generator/src/test/resources/log4j2-test.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: db/torque/torque4/trunk/torque-runtime/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/pom.xml?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/pom.xml (original)
+++ db/torque/torque4/trunk/torque-runtime/pom.xml Wed Mar 20 16:19:39 2019
@@ -66,11 +66,6 @@
     </dependency>
 
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-    </dependency>
-
-    <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-jcs-core</artifactId>
     </dependency>
@@ -81,6 +76,15 @@
       <optional>true</optional>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
+    </dependency>
+    
+    <dependency>
+        <groupId>org.apache.logging.log4j</groupId>
+        <artifactId>log4j-jcl</artifactId>
+    </dependency>
     
     <dependency>
       <groupId>org.apache.fulcrum</groupId>

Modified: db/torque/torque4/trunk/torque-runtime/src/conf/Torque.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/conf/Torque.properties?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/conf/Torque.properties (original)
+++ db/torque/torque4/trunk/torque-runtime/src/conf/Torque.properties Wed Mar 20 16:19:39 2019
@@ -22,20 +22,20 @@ torque.applicationRoot = .
 #  L O G G I N G
 #
 # -------------------------------------------------------------------
-# We use Log4J for all Torque logging and we embed the log4j
-# properties within our application configuration.
+# We use Log4J2 for all Torque logging and we embed the log4j2.
+# xml within our application configuration.
 # -------------------------------------------------------------------
 
 # This first category is required and the category
 # must be named 'default'. This is used for all logging
 # where an explicit category is not specified.
 
-log4j.category.org.apache.torque = ALL, org.apache.torque
-log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
-log4j.appender.org.apache.torque.file = ${torque.applicationRoot}/logs/torque.log
-log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
-log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
-log4j.appender.org.apache.torque.append = false
+#log4j.category.org.apache.torque = ALL, org.apache.torque
+#log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
+#log4j.appender.org.apache.torque.file = ${torque.applicationRoot}/logs/torque.log
+#log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
+#log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
+#log4j.appender.org.apache.torque.append = false
 
 # -------------------------------------------------------------------
 #

Added: db/torque/torque4/trunk/torque-runtime/src/test/resources/log4j2-test.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/resources/log4j2-test.xml?rev=1855923&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/resources/log4j2-test.xml (added)
+++ db/torque/torque4/trunk/torque-runtime/src/test/resources/log4j2-test.xml Wed Mar 20 16:19:39 2019
@@ -0,0 +1,38 @@
+<?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.
+-->
+<Configuration status="warn" name="Torque" packages="">
+     <Appenders>
+       <Console name="console" target="SYSTEM_OUT">
+          <PatternLayout pattern="%d [%t] %-5p | %c - %m%n"/>
+      </Console>
+      <File name="torque" fileName="./target/torque-gen/log/torque-gen.log">
+          <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
+        </File>
+    </Appenders>
+    <Loggers>
+          <Logger name="org.apache.torque" additivity="false" level="DEBUG">
+          <AppenderRef ref="torque" level="DEBUG"/>
+          <AppenderRef ref="console" level="INFO"/>
+      </Logger>
+      <Root level="INFO"><!-- log4j 1.2 has DEBUG -->
+          <AppenderRef ref="console"/>
+      </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file

Propchange: db/torque/torque4/trunk/torque-runtime/src/test/resources/log4j2-test.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: db/torque/torque4/trunk/torque-templates/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/pom.xml?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/pom.xml (original)
+++ db/torque/torque4/trunk/torque-templates/pom.xml Wed Mar 20 16:19:39 2019
@@ -47,10 +47,6 @@
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
     </dependency>
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-    </dependency>
     
     <!-- Test dependencies -->
      <dependency>
@@ -66,6 +62,11 @@
       <scope>test</scope>
     </dependency>
     
+    <dependency>
+        <groupId>org.apache.fulcrum</groupId>
+        <artifactId>fulcrum-testcontainer</artifactId>
+    </dependency>
+    
   </dependencies>
 
   <build>

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java Wed Mar 20 16:19:39 2019
@@ -26,7 +26,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.TimeZone;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.templates.typemapping.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
 

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformFactory.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformFactory.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformFactory.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformFactory.java Wed Mar 20 16:19:39 2019
@@ -79,6 +79,9 @@ public final class PlatformFactory
             }
             getPlatforms().put(dbms, result); // cache the Platform
         }
+        if (log.isDebugEnabled()) {
+            log.debug("using platform " + result);
+        }
         return result;
     }
 

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java Wed Mar 20 16:19:39 2019
@@ -23,7 +23,7 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.TimeZone;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.templates.typemapping.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
 

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java Wed Mar 20 16:19:39 2019
@@ -21,7 +21,7 @@ package org.apache.torque.templates.tran
 
 import java.util.List;
 
-import org.apache.commons.lang.ObjectUtils;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.source.SourceElement;
 import org.apache.torque.generator.source.transform.SourceTransformerException;

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/FieldHelper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/FieldHelper.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/FieldHelper.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/FieldHelper.java Wed Mar 20 16:19:39 2019
@@ -19,7 +19,7 @@ package org.apache.torque.templates.tran
  * under the License.
  */
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.templates.TemplateOptionName;
 import org.apache.torque.templates.typemapping.JavaType;

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java Wed Mar 20 16:19:39 2019
@@ -27,7 +27,7 @@ import java.util.HashSet;
 import java.util.Set;
 import java.util.TimeZone;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.processor.string.Camelbacker;
 import org.apache.torque.generator.processor.string.ConstantNameCreator;

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java?rev=1855923&r1=1855922&r2=1855923&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java Wed Mar 20 16:19:39 2019
@@ -22,7 +22,7 @@ package org.apache.torque.templates.tran
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.source.SourceElement;
 import org.apache.torque.generator.source.transform.SourceTransformerException;



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message