Author: gk
Date: Fri Feb 28 14:53:37 2020
New Revision: 1874619

URL: http://svn.apache.org/viewvc?rev=1874619&view=rev
Log:
- text changes
- use torque 4.1-SNAPSHOT and fulcrum intake SNAPSHOT in pom.xml
- avoid NPE in TurbineVelocityService.java 

Modified:
    turbine/core/trunk/conf/docker-resources/db/Dockerfile
    turbine/core/trunk/pom.xml
    
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
    
turbine/core/trunk/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java

Modified: turbine/core/trunk/conf/docker-resources/db/Dockerfile
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/conf/docker-resources/db/Dockerfile?rev=1874619&r1=1874618&r2=1874619&view=diff
==============================================================================
--- turbine/core/trunk/conf/docker-resources/db/Dockerfile (original)
+++ turbine/core/trunk/conf/docker-resources/db/Dockerfile Fri Feb 28 14:53:37 
2020
@@ -15,3 +15,5 @@ ENV MYSQL_PASSWORD=${MYSQL_PASSWORD}
 ENV MYSQL_HOST=%
 # important container will not start without setting it:
 ENV MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
+
+#EXPOSE 3306

Modified: turbine/core/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/pom.xml?rev=1874619&r1=1874618&r2=1874619&view=diff
==============================================================================
--- turbine/core/trunk/pom.xml (original)
+++ turbine/core/trunk/pom.xml Fri Feb 28 14:53:37 2020
@@ -955,7 +955,6 @@
       <version>1.9.4</version>
     </dependency>
     <dependency>
-      <!-- yauaa uses slf4j-api, need for log4j-slf4j-impl mapping-->
       <groupId>nl.basjes.parse.useragent</groupId>
       <artifactId>yauaa</artifactId>
       <version>5.12</version>
@@ -1025,10 +1024,6 @@
             <groupId>avalon-logkit</groupId>
             <artifactId>avalon-logkit</artifactId>
         </exclusion>
-        <exclusion>  <!-- exclude this to exclude beanutils v1.8.0 -> 
CVE-2014-0114  -->
-          <groupId>commons-configuration</groupId>
-          <artifactId>commons-configuration</artifactId>
-        </exclusion>
       </exclusions>
     </dependency>
     <dependency> <!-- include optional dependencies from torque-runtime -->
@@ -1037,11 +1032,6 @@
         <version>1.4</version>
     </dependency>
     <dependency>
-        <groupId>org.apache.commons</groupId>
-        <artifactId>commons-dbcp2</artifactId>
-        <version>2.7.0</version>
-    </dependency>  
-    <dependency> <!-- include more modern version just for torque-runtime v4.0 
-->
          <groupId>commons-configuration</groupId>
          <artifactId>commons-configuration</artifactId>
          <version>1.10</version>
@@ -1110,6 +1100,7 @@
       <artifactId>log4j-jcl</artifactId>
       <version>${turbine.log4j2.version}</version>
     </dependency>
+    <!-- yauaa + java testcontainers uses slf4j-api, need for log4j-slf4j-impl 
mapping-->
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-slf4j-impl</artifactId>
@@ -1152,6 +1143,7 @@
       <version>2.2.9</version>
       <scope>test</scope>
     </dependency>
+    <!-- testcontainer minimal shared resources -->
     <dependency>
       <groupId>org.apache.fulcrum</groupId>
       <artifactId>fulcrum-testcontainer</artifactId>
@@ -1321,11 +1313,11 @@
     <!-- maven.compiler setting in turbine parent -->
     <!-- TODO: Change for release: remove development part in path 
"/turbine/development" -->
     <turbine.site.path>turbine/development/turbine-5.1</turbine.site.path>
-    <fulcrum.intake>2.0.0</fulcrum.intake>
+    <fulcrum.intake>2.0.1-SNAPSHOT</fulcrum.intake>
     <fulcrum.parser>2.0.1</fulcrum.parser>
     <fulcrum.security>2.0.0-SNAPSHOT</fulcrum.security>
     <dependency.check.skip>true</dependency.check.skip>
-    <torque.version>4.0</torque.version>
+    <torque.version>4.1-SNAPSHOT</torque.version>
     <jacoco.skip>true</jacoco.skip>
     <doclint>none</doclint>
   </properties>

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java?rev=1874619&r1=1874618&r2=1874619&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
 Fri Feb 28 14:53:37 2020
@@ -435,7 +435,7 @@ public class TurbineVelocityService
         Charset encoding = null;
 
         Object data = context.get(VelocityService.RUNDATA_KEY);
-        if ((data != null) && (data instanceof RunData))
+        if ((data != null) && (data instanceof RunData) && (((RunData) 
data).getTemplateEncoding() != null) )
         {
             encoding = Charset.forName(((RunData) data).getTemplateEncoding());
         }

Modified: 
turbine/core/trunk/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java?rev=1874619&r1=1874618&r2=1874619&view=diff
==============================================================================
--- 
turbine/core/trunk/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
 (original)
+++ 
turbine/core/trunk/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
 Fri Feb 28 14:53:37 2020
@@ -31,12 +31,12 @@ import org.testcontainers.junit.jupiter.
  *
  * Requirements:
  * <li>Unix: (Debian stretch tested):set 
<code>DOCKER_HOST=unix:///var/run/docker.sock</code> in docker-java.properties 
- * (find the template in conf/docker-resources/db/dj.p.template) and comment 
all other environment keys.
+ * (find the template in conf/docker-resources/db/dj.p.template) and comment 
out all other environment keys.
  * <li>Windows 10: Docker Desktop should provide all required configuration by 
default or
- * you need to create local machine, e.g. with <code>docker-machine -d hyperv 
<vmname-default></code>
+ * you need to create a local machine, e.g. with <code>docker-machine -d 
hyperv <vmname-default></code>
  * For more information https://docs.docker.com/machine/get-started/, 
https://docs.docker.com/machine/drivers/hyper-v/.
  * <li>Windows 7/VirtualBox: copy DOCKER_* properties to 
~/.docker-java.properties or docker-java.properties in classpath..
- * To get the environment run <code>docker-machine env default</code>, if your 
default docker machine is named default.
+ * To get the environment run: <code>docker-machine env default</code>, if 
your default docker machine is named default.
  * Verify the name with <code>docker-machine ls</code>.
  * 
  * Turbine pom.xml has folder conf/docker-resources enabled as test-resource, 
you may put the files there.
@@ -59,7 +59,7 @@ import org.testcontainers.junit.jupiter.
  * <li>https://www.testcontainers.org/modules/databases/mysql/
  * 
<li>https://www.testcontainers.org/modules/databases/#using-an-init-script-from-a-file
  *
- * bugs: docker virtualbox vm seems to auto pause. 
+ * Bugs: docker virtualbox vm seems to auto pause. 
  * Check your docker vm with <code>docker-machine ls</code> and 
<code>docker-machine start <vmname></code>.
  *
  * @author gkallidis


Reply via email to