You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by gk...@apache.org on 2021/11/22 15:42:29 UTC
[turbine-core] branch trunk updated: update mysql to 8.0.27 and up-to-date init in Genericcontainer for docker-testcontainer; some more up-to-date todo and how-to-help; immutable date in DefaultUserImpl getaccessDate
This is an automated email from the ASF dual-hosted git repository.
gk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/turbine-core.git
The following commit(s) were added to refs/heads/trunk by this push:
new 88a5ec5 update mysql to 8.0.27 and up-to-date init in Genericcontainer for docker-testcontainer; some more up-to-date todo and how-to-help; immutable date in DefaultUserImpl getaccessDate
88a5ec5 is described below
commit 88a5ec549f36aa26c6055768f25386aebc100fd1
Author: Georg Kallidis <gk...@apache.org>
AuthorDate: Mon Nov 22 15:39:41 2021 +0000
update mysql to 8.0.27 and up-to-date init in Genericcontainer for docker-testcontainer; some more up-to-date todo and how-to-help; immutable date in DefaultUserImpl getaccessDate
---
conf/docker-resources/db/Dockerfile | 4 ++--
pom.xml | 2 +-
.../org/apache/turbine/om/security/DefaultUserImpl.java | 2 +-
.../testcontainer/BuildContainerWithDockerfileTest.java | 17 ++++++-----------
xdocs/how-to-help.xml | 2 +-
xdocs/services/urlmapper-service.xml | 2 +-
xdocs/todo.xml | 9 +++++----
7 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/conf/docker-resources/db/Dockerfile b/conf/docker-resources/db/Dockerfile
index 20db2ba..aebba2c 100644
--- a/conf/docker-resources/db/Dockerfile
+++ b/conf/docker-resources/db/Dockerfile
@@ -1,14 +1,14 @@
# no multi-stage
# mariadb use docker-entrypoint
-FROM mysql:8.0.20
+FROM mysql:8.0.27
# copy from path where dockerfile is
COPY ./mysql/initdb.d /docker-entrypoint-initdb.d
-
# required, to create
#ENV DB_CONTEXT ${DB_CONTEXT}
+
ENV MYSQL_DATABASE ${MYSQL_DATABASE}
ENV MYSQL_USER=${MYSQL_USER}
ENV MYSQL_PASSWORD=${MYSQL_PASSWORD}
diff --git a/pom.xml b/pom.xml
index d4b9469..2ede522 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1253,7 +1253,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
- <version>8.0.20</version>
+ <version>8.0.27</version>
</dependency>
</dependencies>
</profile>
diff --git a/src/java/org/apache/turbine/om/security/DefaultUserImpl.java b/src/java/org/apache/turbine/om/security/DefaultUserImpl.java
index 7f007bd..9829514 100644
--- a/src/java/org/apache/turbine/om/security/DefaultUserImpl.java
+++ b/src/java/org/apache/turbine/om/security/DefaultUserImpl.java
@@ -426,7 +426,7 @@ public class DefaultUserImpl implements User
{
setLastAccessDate();
}
- return lastAccessDate;
+ return Date.from( lastAccessDate.toInstant()); //immutable
}
/**
diff --git a/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java b/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
index d3efca0..ff308f4 100644
--- a/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
+++ b/src/test/org/apache/turbine/testcontainer/BuildContainerWithDockerfileTest.java
@@ -5,6 +5,9 @@ import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertTrue;
import java.io.File;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
@@ -70,8 +73,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
@Tag("docker")
class BuildContainerWithDockerfileTest {
-
- public static final String DOCKERFILE = "conf/docker-resources/db/Dockerfile";
+ public static final Path RESOURCE_PATH =
+ FileSystems.getDefault().getPath(".").resolve("conf/docker-resources/db/");
private static Logger log = LogManager.getLogger();
@@ -82,17 +85,9 @@ class BuildContainerWithDockerfileTest {
Connection connection;
@Container
- //@ClassRule
public static GenericContainer MY_SQL_CONTAINER = new GenericContainer<>(
new ImageFromDockerfile()
-// .withFileFromPath(
-// ".",
-// new File("./conf/docker-resources/db/mysql/initdb.d").toPath())
-// .withDockerfileFromBuilder(
-// builder -> builder.from( "mysql:5.7.26" )
-// .add( "data.sql","/docker-entrypoint-initdb.d" )
-// )
- .withDockerfile(new File(DOCKERFILE).toPath())
+ .withFileFromPath(".", RESOURCE_PATH)
).withExposedPorts( SERVICE_PORT ) //.withStartupAttempts( 2 )
.withEnv( "MYSQL_DATABASE", DATABASE_NAME )
.withEnv( "MYSQL_USER", "userdb" )
diff --git a/xdocs/how-to-help.xml b/xdocs/how-to-help.xml
index db16722..bad2bfd 100644
--- a/xdocs/how-to-help.xml
+++ b/xdocs/how-to-help.xml
@@ -75,7 +75,7 @@
Changes to this form of documentation should be in the form of patches. To submit
them, create a new issue in the
<a href="https://issues.apache.org/jira/browse/TRB">issue tracking system</a>
- and attach your patch(es).
+ and attach your patch(es) or open in github an Pull Request (PR).
</li>
</ul>
The documentation is probably the easiest area for anyone to contribute in. If you are
diff --git a/xdocs/services/urlmapper-service.xml b/xdocs/services/urlmapper-service.xml
index 98f74dc..fbe2c68 100644
--- a/xdocs/services/urlmapper-service.xml
+++ b/xdocs/services/urlmapper-service.xml
@@ -41,7 +41,7 @@ it will resolve to the expected parameters. Most importantly you should map your
<section name="Configuration and Usage">
<p>
-Find further information in <a href="../howto/url-mapper-howto.html">URL Mapper Howto</a>
+Find further information in <a href="../howto/url-mapper-howto.html">URL Mapper Howto</a>.
</p>
</section>
diff --git a/xdocs/todo.xml b/xdocs/todo.xml
index 37dad92..50acfc9 100644
--- a/xdocs/todo.xml
+++ b/xdocs/todo.xml
@@ -43,8 +43,9 @@ No current items.
<ul>
<li>Make sure that pull tools get refreshed correctly under all circumstances (done?)</li>
<li>Check lifetimes of authorized and session tools if the application is not the standard login-logout application (done?)</li>
- <li>Move AvalonComponentService to the Fortress container (suggested by the avalon-dev list) - or looking for an alternative</li>
- <li>Move doclint and jacoco settings to Turbine parent</li>
+ <li>Check against different Java versions in a systematic way (e.g. using Docker image)</li>
+ <li>Allow Java 17 features (Sealed classes, pattern matching in switch, etc.)</li>
+ <li>Support / Test integrations Servlet 4.0 with Http/2, Java 11 (e.g. Tomcat 9 and Eclipse Jetty 10)</li>
</ul>
</p>
</subsection>
@@ -52,8 +53,8 @@ No current items.
<subsection name="Blue Skying for future Turbine releases">
<p>
<ul>
- <li>Servlet 3.x asynchronous cycle handling / prototype / proof of concept (Servlet API is 2.5 in Turbine 4.x, but 3.x for Turbine 5.x in 2019)</li>
- <li>OSGI or Java 9 modularization (proposal exists and Java required version is still 6 for Turbine in 2017</li>
+ <li>Servlet 4.x and 3.x asynchronous cycle handling / prototype / proof of concept (Servlet API is 2.5 in Turbine 4.x, 3.x for Turbine 5.x)</li>
+ <li>OSGI or Java 9 modularization proposal exists (obsolete?)</li>
</ul>
</p>
</subsection>