- text changes
- use torque 4.1-SNAPSHOT and fulcrum intake SNAPSHOT in pom.xml
- avoid NPE in TurbineVelocityService.java
git-svn-id: https://svn.apache.org/repos/asf/turbine/core/trunk@1874619 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/conf/docker-resources/db/Dockerfile b/conf/docker-resources/db/Dockerfile
index 5a82910..b2e2f11 100644
--- a/conf/docker-resources/db/Dockerfile
+++ b/conf/docker-resources/db/Dockerfile
@@ -15,3 +15,5 @@
ENV MYSQL_HOST=%
# important container will not start without setting it:
ENV MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
+
+#EXPOSE 3306
diff --git a/pom.xml b/pom.xml
index 93a0535..bfa2589 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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>
diff --git a/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java b/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
index 052b89a..2d4e096 100644
--- a/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
+++ b/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
@@ -435,7 +435,7 @@
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());
}
diff --git a/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java b/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
index f67a2f1..1f556f2 100644
--- a/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
+++ b/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
@@ -31,12 +31,12 @@
*
* 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 @@
* <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