This is an automated email from the ASF dual-hosted git repository.

doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git


The following commit(s) were added to refs/heads/master by this push:
     new d78dcea  EMPIREDB-362 replace log4j with reload4j-1.2.19
d78dcea is described below

commit d78dcea0b3aa820b3fdd0943b6ec2e150c869b24
Author: Rainer Döbele <[email protected]>
AuthorDate: Thu Feb 24 15:50:40 2022 +0100

    EMPIREDB-362 replace log4j with reload4j-1.2.19
---
 empire-db-codegen/pom.xml                          |  71 +++++++++++++--------
 .../empire-db-example-advanced/pom.xml             |  16 +++--
 .../empire/samples/db/advanced/SampleAdvApp.java   |  28 ++++++++
 .../empire-db-example-basic/config.xml             |  11 +---
 empire-db-examples/empire-db-example-basic/pom.xml |  15 +++--
 .../empire-db-example-codegen/generate-config.xml  |  12 +++-
 .../empire-db-example-codegen/generate.bat         |  20 +++---
 empire-db-examples/empire-db-example-jsf2/pom.xml  |  18 ++++--
 empire-db-examples/empire-db-example-vue/pom.xml   |  36 +++++------
 empire-db-examples/tutorial.doc                    | Bin 116736 -> 0 bytes
 empire-db-examples/tutorial.pdf                    | Bin 72491 -> 0 bytes
 empire-db/pom.xml                                  |  12 ++--
 pom.xml                                            |  16 ++++-
 13 files changed, 167 insertions(+), 88 deletions(-)

diff --git a/empire-db-codegen/pom.xml b/empire-db-codegen/pom.xml
index fb10eb7..3319e08 100644
--- a/empire-db-codegen/pom.xml
+++ b/empire-db-codegen/pom.xml
@@ -39,46 +39,61 @@
                        <version>1.7</version>
                </dependency>
 
-               <!-- use log4j for logging -->
+               <!-- logging -->
                <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
+                   <groupId>org.slf4j</groupId>
+                   <artifactId>slf4j-reload4j</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
+               <dependency>
+                   <groupId>ch.qos.reload4j</groupId>
+                   <artifactId>reload4j</artifactId>
+                   <scope>runtime</scope>
                </dependency>
 
-               <!--  Databases -->
-               <!-- hsql -->
+               <!-- This dependency should be declared as runtime but the exec 
plugin is broken atm... -->
+               <!-- hsqldb -->
                <dependency>
                    <groupId>org.hsqldb</groupId>
                    <artifactId>hsqldb</artifactId>
-                   <scope>test</scope>
-               </dependency>
-
-        <!-- msssql -->
-               <!--   
-        <dependency>
-            <groupId>com.microsoft.sqlserver</groupId>
-            <artifactId>mssql-jdbc</artifactId>
-                   <version>9.4.1.jre8</version>
-        </dependency>
-               -->
-               
-               <!-- oracle -->
-               <!--   
+                   <scope>runtime</scope>
+               </dependency> 
+               <!-- dh2 -->
                <dependency>
-                   <groupId>com.oracle</groupId>
-                       <artifactId>ojdbc6</artifactId>
-                       <version>11.2.0.3.0</version>
-               </dependency>
-               -->
-
+                   <groupId>com.h2database</groupId>
+                   <artifactId>h2</artifactId>
+                   <scope>runtime</scope>
+               </dependency> 
+               <!-- derby -->
+               <dependency>
+                   <groupId>org.apache.derby</groupId>
+                   <artifactId>derby</artifactId>
+                   <scope>runtime</scope>
+               </dependency> 
                <!-- mysql -->
-               <!-- 
                <dependency>
                    <groupId>mysql</groupId>
                    <artifactId>mysql-connector-java</artifactId>
-                   <version>5.1.6</version>
+                   <scope>runtime</scope>
+               </dependency>
+               <!-- postgresql -->
+               <dependency>
+                   <groupId>org.postgresql</groupId>
+                   <artifactId>postgresql</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
+               <!-- msssql -->
+               <dependency>
+                   <groupId>com.microsoft.sqlserver</groupId>
+                   <artifactId>mssql-jdbc</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
+               <!-- oracle -->
+               <dependency>
+                   <groupId>com.oracle.database.jdbc</groupId>
+                   <artifactId>ojdbc8</artifactId>
+                   <scope>runtime</scope>
                </dependency>
-               -->
                
        </dependencies>
 
diff --git a/empire-db-examples/empire-db-example-advanced/pom.xml 
b/empire-db-examples/empire-db-example-advanced/pom.xml
index e050e03..2edd4fa 100644
--- a/empire-db-examples/empire-db-example-advanced/pom.xml
+++ b/empire-db-examples/empire-db-example-advanced/pom.xml
@@ -29,12 +29,20 @@
                        <groupId>org.apache.empire-db</groupId>
                        <artifactId>empire-db</artifactId>
                </dependency>
-               <!-- use log4j for logging -->
+
+               <!-- logging -->
+               <dependency>
+                   <groupId>org.slf4j</groupId>
+                   <artifactId>slf4j-reload4j</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
                <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
+                   <groupId>ch.qos.reload4j</groupId>
+                   <artifactId>reload4j</artifactId>
+                   <scope>runtime</scope>
                </dependency>
-               <!-- This dependency should be declared as runtime but the exec 
plugin is broken atm... -->
+
+               <!-- databases -->
                <!-- hsqldb -->
                <dependency>
                    <groupId>org.hsqldb</groupId>
diff --git 
a/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
 
b/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
index 1f1a993..6806af6 100644
--- 
a/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
+++ 
b/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
@@ -134,6 +134,8 @@ public class SampleAdvApp
             context.commit();
         }
         
+        subqueryQueryDemo();
+        
         // do simple stuff
         simpleQueryDemo();
         simpleUpdateDemo();
@@ -418,6 +420,32 @@ public class SampleAdvApp
             return priceDifference;
         }
     }
+
+    public void subqueryQueryDemo()
+    {
+        // shortcuts (for convenience)
+        CarSalesDB.Model MODEL = carSales.MODEL;
+        CarSalesDB.Sales SALES = carSales.SALES;
+
+        // create command
+        // DBColumnExpr SALES_COUNT = SALES.count();
+        DBCommand sub = context.createCommand()
+           .selectQualified(SALES.MODEL_ID, SALES.count())
+           .groupBy(SALES.MODEL_ID);
+        DBQuery q = new DBQuery(sub);
+        
+        // create command
+        DBCommand cmd = context.createCommand()
+           .select(MODEL.CONFIG_NAME, q.column(SALES.count()))
+           .join(MODEL.ID, q.column(SALES.MODEL_ID));
+        
+        List<DataListEntry> list = context.getUtils().queryDataList(cmd);
+        for (DataListEntry dle : list)
+        {
+            System.out.println(dle.toString());
+        }
+        
+    }
     
     public void simpleQueryDemo()
     {
diff --git a/empire-db-examples/empire-db-example-basic/config.xml 
b/empire-db-examples/empire-db-example-basic/config.xml
index 2db9cf7..44955f1 100644
--- a/empire-db-examples/empire-db-example-basic/config.xml
+++ b/empire-db-examples/empire-db-example-basic/config.xml
@@ -21,7 +21,7 @@
 
        <properties>
                <!-- provider name must match the property-section containing 
the connection data -->
-               <databaseProvider>hsqldb</databaseProvider>
+               <databaseProvider>sqlserver</databaseProvider>
        </properties>
 
        <properties-hsqldb>
@@ -128,19 +128,10 @@
        <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
 
                <appender name="default" 
class="org.apache.log4j.ConsoleAppender">
-                       <!-- layout class="org.apache.log4j.TTCCLayout"/ -->
                        <layout class="org.apache.log4j.PatternLayout">
-                               <!-- param name="ConversionPattern" 
value="NSB(%c) %-5p %m      at %l%n"/ -->
                                <param name="ConversionPattern" value="%-5p : 
%m                at %l %n"/>
                        </layout>
                </appender>
-
-               <appender name="sample" 
class="org.apache.log4j.ConsoleAppender">
-                       <layout class="org.apache.log4j.PatternLayout">
-                               <!-- param name="ConversionPattern" 
value="NSB(%c) %-5p %m      at %l%n"/ -->
-                               <param name="ConversionPattern" value="%-5p : 
*** %m *** %n"/>
-                       </layout>
-               </appender>
        
                <!-- log detail configuration -->
                <logger name="org.apache.empire.xml" additivity="false">
diff --git a/empire-db-examples/empire-db-example-basic/pom.xml 
b/empire-db-examples/empire-db-example-basic/pom.xml
index b162e76..8e9e2d4 100644
--- a/empire-db-examples/empire-db-example-basic/pom.xml
+++ b/empire-db-examples/empire-db-example-basic/pom.xml
@@ -29,13 +29,20 @@
                        <groupId>org.apache.empire-db</groupId>
                        <artifactId>empire-db</artifactId>
                </dependency>
-               <!-- use log4j for logging -->
+
+               <!-- logging -->
                <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
+                   <groupId>org.slf4j</groupId>
+                   <artifactId>slf4j-reload4j</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
+               <dependency>
+                   <groupId>ch.qos.reload4j</groupId>
+                   <artifactId>reload4j</artifactId>
+                   <scope>runtime</scope>
                </dependency>
 
-               <!-- This dependency should be declared as runtime but the exec 
plugin is broken atm... -->
+               <!-- databases -->
                <!-- hsqldb -->
                <dependency>
                    <groupId>org.hsqldb</groupId>
diff --git a/empire-db-examples/empire-db-example-codegen/generate-config.xml 
b/empire-db-examples/empire-db-example-codegen/generate-config.xml
index 8cc7287..66fbf02 100644
--- a/empire-db-examples/empire-db-example-codegen/generate-config.xml
+++ b/empire-db-examples/empire-db-example-codegen/generate-config.xml
@@ -61,13 +61,23 @@
        
        <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
 
-               <appender name="default" 
class="org.apache.log4j.ConsoleAppender">
+               <appender name="console" 
class="org.apache.log4j.ConsoleAppender">
                        <!-- layout class="org.apache.log4j.TTCCLayout"/ -->
                        <layout class="org.apache.log4j.PatternLayout">
                                <!-- param name="ConversionPattern" 
value="NSB(%c) %-5p %m      at %l%n"/ -->
                                <param name="ConversionPattern" value="%-5p 
[%d{yyyy/MM/dd HH:mm}]: %m          at %l %n"/>
                        </layout>
                </appender>
+
+               <!-- File output  -->
+           <appender name="default" class="org.apache.log4j.FileAppender">
+               <param name="file" value="target/codegen.log" />
+               <param name="append" value="false" />
+               <param name="threshold" value="debug" />
+               <layout class="org.apache.log4j.PatternLayout">
+                   <param name="ConversionPattern" value=" %-5p %d{ISO8601} 
[%c{1}] - %m%n" />
+               </layout>
+           </appender>
        
                <!-- log detail configuration -->
                <logger name="org.apache.empire.commons" additivity="false">
diff --git a/empire-db-examples/empire-db-example-codegen/generate.bat 
b/empire-db-examples/empire-db-example-codegen/generate.bat
index 196dc0a..86b0516 100644
--- a/empire-db-examples/empire-db-example-codegen/generate.bat
+++ b/empire-db-examples/empire-db-example-codegen/generate.bat
@@ -1,3 +1,4 @@
+@echo off
 REM Licensed to the Apache Software Foundation (ASF) under one
 REM or more contributor license agreements.  See the NOTICE file
 REM distributed with this work for additional information
@@ -14,26 +15,25 @@ REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 REM KIND, either express or implied.  See the License for the
 REM specific language governing permissions and limitations
 REM under the License.
-@echo off
 IF [%1%] == [] GOTO INVALID_PARAMS
 IF [%2%] == [] GOTO INVALID_PARAMS
 rem base setting
 set repo=%2%
-set empire-db-version=2.5.0-SNAPSHOT
-set jdbc-jar-path=hsqldb\hsqldb\1.8.0.10\hsqldb-1.8.0.10.jar
+set empire-db-version=3.0.0-SNAPSHOT
+set jdbc-jar-path=org\hsqldb\hsqldb\2.5.2\hsqldb-2.5.2.jar
 IF [%3%] == [] GOTO CLASSPATH
 set jdbc-jar-path=%3%
 rem Assemble classpath
 :CLASSPATH
 set 
classpath=%repo%\org\apache\empire-db\empire-db\%empire-db-version%\empire-db-%empire-db-version%.jar
 set 
classpath=%classpath%;%repo%\org\apache\empire-db\empire-db-codegen\%empire-db-version%\empire-db-codegen-%empire-db-version%.jar
-set 
classpath=%classpath%;%repo%\org\slf4j\slf4j-api\1.7.26\slf4j-api-1.7.26.jar
-set 
classpath=%classpath%;%repo%\org\slf4j\slf4j-log4j12\1.7.26\slf4j-log4j12-1.7.26.jar
-set classpath=%classpath%;%repo%\log4j\log4j\1.2.17\log4j-1.2.17.jar
-set 
classpath=%classpath%;%repo%\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar
-set 
classpath=%classpath%;%repo%\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar
+set 
classpath=%classpath%;%repo%\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar
+set 
classpath=%classpath%;%repo%\org\slf4j\slf4j-reload4j\1.7.36\slf4j-reload4j-1.7.36.jar
+set 
classpath=%classpath%;%repo%\ch\qos\reload4j\reload4j\1.2.19\reload4j-1.2.19.jar
+set 
classpath=%classpath%;%repo%\commons-beanutils\commons-beanutils\1.9.4\commons-beanutils-1.9.4.jar
+set 
classpath=%classpath%;%repo%\commons-logging\commons-logging\1.2\commons-logging-1.2.jar
 set 
classpath=%classpath%;%repo%\org\apache\velocity\velocity\1.7\velocity-1.7.jar
-set 
classpath=%classpath%;%repo%\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar
+set 
classpath=%classpath%;%repo%\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar
 set 
classpath=%classpath%;%repo%\commons-lang\commons-lang\2.4\commons-lang-2.4.jar
 rem The JDBC class libaray
 set classpath=%classpath%;%repo%\%jdbc-jar-path%
@@ -41,6 +41,8 @@ echo Calling code generator
 echo Config-File: %1%
 echo JDBC-jar: %jdbc-jar-path%
 echo Empire-db-version: %empire-db-version%
+echo Maven-Repo-Path: %repo%
+echo classpath: %classpath%
 java -cp %classpath% org.apache.empire.db.codegen.CodeGenerator %1
 goto done
 :INVALID_PARAMS
diff --git a/empire-db-examples/empire-db-example-jsf2/pom.xml 
b/empire-db-examples/empire-db-example-jsf2/pom.xml
index 7123812..b87abcd 100644
--- a/empire-db-examples/empire-db-example-jsf2/pom.xml
+++ b/empire-db-examples/empire-db-example-jsf2/pom.xml
@@ -77,6 +77,18 @@
                        <scope>provided</scope>
                </dependency>
 
+               <!-- logging -->
+               <dependency>
+                   <groupId>org.slf4j</groupId>
+                   <artifactId>slf4j-reload4j</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
+               <dependency>
+                   <groupId>ch.qos.reload4j</groupId>
+                   <artifactId>reload4j</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
+
                <!-- All Databases (scope: runtime) -->
                <!-- hsqldb -->
                <dependency>
@@ -121,12 +133,6 @@
                    <scope>runtime</scope>
                </dependency>
 
-        <!-- use log4j for logging -->
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
-               </dependency>
-
        </dependencies>
        
        <build>
diff --git a/empire-db-examples/empire-db-example-vue/pom.xml 
b/empire-db-examples/empire-db-example-vue/pom.xml
index c395f31..802a4c8 100644
--- a/empire-db-examples/empire-db-example-vue/pom.xml
+++ b/empire-db-examples/empire-db-example-vue/pom.xml
@@ -29,6 +29,12 @@
 
        <dependencies>
 
+               <!-- Empire-db -->
+               <dependency>
+                       <groupId>org.apache.empire-db</groupId>
+                       <artifactId>empire-db</artifactId>
+               </dependency>
+
                <!-- Servlet API -->
                <dependency>
                    <groupId>javax.servlet</groupId>
@@ -36,12 +42,6 @@
                        <scope>provided</scope>
                </dependency>
 
-               <!-- hsql -->
-               <dependency>
-                       <groupId>org.hsqldb</groupId>
-                       <artifactId>hsqldb</artifactId>
-               </dependency>
-
                <!-- Tomcat JDBC Connection Pool 
                <dependency>
                        <groupId>org.apache.tomcat</groupId>
@@ -51,12 +51,6 @@
                </dependency>
                -->
 
-               <!-- Empire-db -->
-               <dependency>
-                       <groupId>org.apache.empire-db</groupId>
-                       <artifactId>empire-db</artifactId>
-               </dependency>
-
                <!-- RS API -->
                <dependency>
                        <groupId>javax.ws.rs</groupId>
@@ -88,6 +82,18 @@
                        <version>2.25.1</version>
                </dependency>
 
+               <!-- logging -->
+               <dependency>
+                   <groupId>org.slf4j</groupId>
+                   <artifactId>slf4j-reload4j</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
+               <dependency>
+                   <groupId>ch.qos.reload4j</groupId>
+                   <artifactId>reload4j</artifactId>
+                   <scope>runtime</scope>
+               </dependency>
+
                <!-- All Databases (scope: runtime) -->
                <!-- hsqldb -->
                <dependency>
@@ -138,12 +144,6 @@
                        <artifactId>commons-io</artifactId>
                </dependency>
 
-               <!-- Logging -->
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
-               </dependency>
-
        </dependencies>
 
        <build>
diff --git a/empire-db-examples/tutorial.doc b/empire-db-examples/tutorial.doc
deleted file mode 100644
index 9cf9edf..0000000
Binary files a/empire-db-examples/tutorial.doc and /dev/null differ
diff --git a/empire-db-examples/tutorial.pdf b/empire-db-examples/tutorial.pdf
deleted file mode 100644
index 7be1f96..0000000
Binary files a/empire-db-examples/tutorial.pdf and /dev/null differ
diff --git a/empire-db/pom.xml b/empire-db/pom.xml
index 61a962e..7a6e0d9 100644
--- a/empire-db/pom.xml
+++ b/empire-db/pom.xml
@@ -36,14 +36,14 @@
                </dependency>
                <!-- TEST -->
                <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
-                       <scope>test</scope>
+                   <groupId>org.slf4j</groupId>
+                   <artifactId>slf4j-reload4j</artifactId>
+                   <scope>test</scope>
                </dependency>
                <dependency>
-                       <groupId>log4j</groupId>
-                       <artifactId>log4j</artifactId>
-                       <scope>test</scope>
+                   <groupId>ch.qos.reload4j</groupId>
+                   <artifactId>reload4j</artifactId>
+                   <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.xerial</groupId>
diff --git a/pom.xml b/pom.xml
index dd48146..f8e22f5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -270,18 +270,30 @@
                        <dependency>
                                <groupId>org.slf4j</groupId>
                                <artifactId>slf4j-api</artifactId>
-                               <version>1.7.33</version>
+                               <version>1.7.36</version>
                        </dependency>
                        <dependency>
+                           <groupId>org.slf4j</groupId>
+                           <artifactId>slf4j-reload4j</artifactId>
+                           <version>1.7.36</version>
+                       </dependency>
+                       <dependency>
+                           <groupId>ch.qos.reload4j</groupId>
+                           <artifactId>reload4j</artifactId>
+                           <version>1.2.19</version>
+                       </dependency>
+                       <!-- 
+                       <dependency>
                                <groupId>org.slf4j</groupId>
                                <artifactId>slf4j-log4j12</artifactId>
-                               <version>1.7.33</version>
+                               <version>1.7.36</version>
                        </dependency>                   
                        <dependency>
                            <groupId>log4j</groupId>
                            <artifactId>log4j</artifactId>
                            <version>1.2.17</version>
                        </dependency>
+                        -->
                        <!-- commons -->                        
                        <dependency>
                                <groupId>commons-beanutils</groupId>

Reply via email to