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

gk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-archetypes.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ba35b9  Update dependencies, refactor mysql to maven profile (default 
active), add mariadb profile, update to SharedPool2DataSourceFactory, remove 
tomcat plugin (todo: should use cargo-maven3-plugin)
3ba35b9 is described below

commit 3ba35b91d17d08d1ef9c5d9ca030e03fb916ef51
Author: Georg Kallidis <[email protected]>
AuthorDate: Thu Sep 21 15:13:46 2023 +0200

    Update dependencies, refactor mysql to maven profile (default active), add 
mariadb profile, update to SharedPool2DataSourceFactory, remove tomcat plugin 
(todo: should use cargo-maven3-plugin)
---
 src/main/resources/archetype-resources/pom.xml     | 122 +++++++++++++++------
 .../src/main/webapp/WEB-INF/conf/Torque.properties |   4 +-
 2 files changed, 89 insertions(+), 37 deletions(-)

diff --git a/src/main/resources/archetype-resources/pom.xml 
b/src/main/resources/archetype-resources/pom.xml
index b1531b4..69c353d 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -202,6 +202,14 @@ under the License.
                           <include>jetty-env.xml</include>
                         </includes>
                       </resource>
+                      <resource>
+                            
<directory>${project.basedir}/src/main/webapp/META-INF</directory>
+                            <filtering>true</filtering>
+                            <targetPath>META-INF</targetPath>
+                            <includes>
+                                <include>context.xml</include>
+                            </includes>
+                        </resource>
                     </webResources>
                 <!-- 
containerConfigXML>WEB-INF/build/context.xml</containerConfigXML -->
             </configuration>
@@ -217,7 +225,7 @@ under the License.
 
             <!--  The serverTimezone parameter is required for MySQL.
                You may need to remove it for other databases -->
-            
<url>#var("turbine_database_url")${turbine_database_name}?serverTimezone=${turbine_database_timezone}&amp;useSSL=false&amp;verifyServerCertificate=false&amp;requireSSL=false</url>
+            
<url>#var("turbine_database_url")#var("turbine_database_name")?serverTimezone=${turbine_database_timezone}&amp;useSSL=false&amp;verifyServerCertificate=false&amp;requireSSL=false</url>
             <username>${turbine_database_user}</username>
             <password>${turbine_database_password}</password>
             <onError>continue</onError>
@@ -226,14 +234,6 @@ under the License.
           </configuration>
           <!-- update with your database driver dependency -->
           <!-- this is mysql specific -->
-          <dependencies>
-            <dependency>
-              <groupId>com.mysql</groupId>
-              <artifactId>mysql-connector-j</artifactId>
-              <version>#var("mysql.version")</version>
-            </dependency>
-          </dependencies>
-          <!-- this is mysql specific -->
           <executions>
             <execution>
                 <id>create-db</id>
@@ -280,12 +280,7 @@ under the License.
             <artifactId>jakarta.xml.bind-api</artifactId>
             <version>2.3.3</version>
         </dependency-->
-      <!-- update with the database driver of your choice -->
-      <dependency>
-        <artifactId>mysql-connector-java</artifactId>
-        <groupId>mysql</groupId>
-        <version>#var("mysql.version")</version>
-      </dependency>
+      <!-- use profile with the database driver of your choice -->
        <!-- Allow lookup of #var("web:rootDir") in log4j2 file -->
         <dependency>
           <groupId>org.apache.logging.log4j</groupId>
@@ -403,21 +398,94 @@ under the License.
         <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
         <log4j2.version>2.20.0</log4j2.version>
         <mysql.version>8.0.33</mysql.version>
+        <mariadb.version>3.2.0</mariadb.version><!-- v3 requries java 11 and 
adapter name mariab instead of mysql -->
+        <driverClassName>${turbine_database_driver}</driverClassName>
         <fulcrum.json>2.0.2-SNAPSHOT</fulcrum.json>
-        <fulcrum.intake>3.0.0-SNAPSHOT</fulcrum.intake>
+        <fulcrum.intake>3.0.1-SNAPSHOT</fulcrum.intake>
         <fulcrum.security>2.1.1-SNAPSHOT</fulcrum.security>
-        <fulcrum.yaafi>1.0.9-SNAPSHOT</fulcrum.yaafi>
+        <fulcrum.yaafi>2.0.1-SNAPSHOT</fulcrum.yaafi>
         <fulcrum.cache>2.0.0</fulcrum.cache>
-        <fulcrum.testcontainer>1.0.9</fulcrum.testcontainer>
-        <torque.version>5.1</torque.version>
+        <fulcrum.testcontainer>2.0.0</fulcrum.testcontainer>
+        <torque.version>5.2-SNAPSHOT</torque.version>
         <turbine.core>5.2-SNAPSHOT</turbine.core>     
         <skipTests>true</skipTests>
         <docker>false</docker>
         <turbine_database_url>${turbine_database_url}</turbine_database_url>
+        <turbine_database_name>${turbine_database_name}</turbine_database_name>
         <app_volume_local_repo>NOT_USED</app_volume_local_repo>
     </properties>
     
     <profiles>
+        <profile>
+            <id>mariadb</id>
+            <properties>
+                <driverClassName>org.mariadb.jdbc.Driver</driverClassName>
+                
<turbine_database_url>jdbc:mariadb://localhost:3306/</turbine_database_url>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.mariadb.jdbc</groupId>
+                    <artifactId>mariadb-java-client</artifactId>
+                    <version>${mariadb.version}</version>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.torque</groupId>
+                        <artifactId>torque-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>sql-maven-plugin</artifactId>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.mariadb.jdbc</groupId>
+                                <artifactId>mariadb-java-client</artifactId>
+                                <version>${mariadb.version}</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>mysql</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <properties>
+                <driverClassName>${turbine_database_driver}</driverClassName>
+                
<turbine_database_url>jdbc:mysql://localhost:3306/</turbine_database_url>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>com.mysql</groupId>
+                    <artifactId>mysql-connector-j</artifactId>
+                    <version>#var("mysql.version")</version>
+                    <scope>runtime</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.torque</groupId>
+                        <artifactId>torque-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>sql-maven-plugin</artifactId>
+                        <dependencies>
+                            <dependency>
+                                <groupId>com.mysql</groupId>
+                                <artifactId>mysql-connector-j</artifactId>
+                                <version>#var("mysql.version")</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
         <profile>
             <id>jetty</id>
             <build>
@@ -453,22 +521,6 @@ under the License.
                 </plugins>
             </build>
         </profile>
-       <profile>
-            <id>tomcat</id>
-            <build>
-                <defaultGoal>tomcat:run</defaultGoal>
-                <finalName>${artifactId}</finalName>
-                <plugins>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>tomcat-maven-plugin</artifactId>
-                        <configuration>
-                            <port>15000</port>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
         <profile>
             <id>docker</id>
             <activation>
diff --git 
a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/Torque.properties
 
b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/Torque.properties
index 023ef76..8336182 100644
--- 
a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/Torque.properties
+++ 
b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/Torque.properties
@@ -56,7 +56,7 @@ 
torque.database.${turbine_database_name}.adapter=${turbine_database_adapter}
 #torque.database.${turbine_database_name}.user=${turbine_database_user}
 #torque.database.${turbine_database_name}.password=${turbine_database_password}
 #
-#torque.defaults.pool.maxActive =              30
+#torque.defaults.pool.maxActive =              100
 #torque.defaults.pool.testOnBorrow =           true
 #torque.defaults.pool.validationQuery =        SELECT 1
 #
@@ -69,7 +69,7 @@ 
torque.database.${turbine_database_name}.adapter=${turbine_database_adapter}
 #torque.dsfactory.${turbine_database_name}.connection.url =            
${turbine_database_url}${turbine_database_name}
 #torque.dsfactory.${turbine_database_name}.connection.user =           
${turbine_database_user}
 #torque.dsfactory.${turbine_database_name}.connection.password =       
${turbine_database_password}
-#torque.dsfactory.${turbine_database_name}.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
+#torque.dsfactory.${turbine_database_name}.factory=org.apache.torque.dsfactory.SharedPool2DataSourceFactory
 # -------------------------------------------------------------------
 
 # Determines if the quantity column of the IDBroker's id_table should

Reply via email to