From b7f4daac1fbfc45cd282399c652158769b5d0dba Mon Sep 17 00:00:00 2001 From: Dave Johnson Date: Sun, 2 Sep 2018 15:47:54 -0400 Subject: [PATCH 01/12] Beginning of a CDI based weblogger provider. --- app/pom.xml | 33 +++++++++++++---- .../business/CdiWebloggerProvider.java | 36 +++++++++++++++++++ pom.xml | 6 ++-- 3 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 app/src/main/java/org/apache/roller/weblogger/business/CdiWebloggerProvider.java diff --git a/app/pom.xml b/app/pom.xml index 44b7882134..843da76b3f 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -33,6 +33,13 @@ limitations under the License. war + + 3.0.1 + 2.2 + 1.2.0 + 1.4.7 + 1.2 + 1.2.29 1.10.1 1.6 @@ -40,10 +47,7 @@ limitations under the License. 3.1 1.10 2.5.2 - 4.1.0 - 1.4.7 - 2.2 - 1.2 + 4.2.0 1.2.17 2.8.2 4.10.4 @@ -52,7 +56,6 @@ limitations under the License. 2.17 1.0b3 1.7.4 - 3.0.1 1.7.25 4.1.4.RELEASE 3.2.5.RELEASE @@ -62,11 +65,11 @@ limitations under the License. 1.0.2 1.3.0 3.1.3 + - @@ -102,6 +105,24 @@ limitations under the License. + + com.sun.activation + javax.activation + ${java-activation.version} + + + + javax.xml.bind + jaxb-api + 2.3.0 + + + + javax.enterprise + cdi-api + 2.0 + + + + + diff --git a/app/src/main/resources/logback.xml b/app/src/main/resources/logback.xml new file mode 100644 index 0000000000..7d900d8ea8 --- /dev/null +++ b/app/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + \ No newline at end of file diff --git a/app/src/test/java/org/apache/roller/weblogger/business/SimpleTest.java b/app/src/test/java/org/apache/roller/weblogger/business/SimpleTest.java new file mode 100644 index 0000000000..0284a903c0 --- /dev/null +++ b/app/src/test/java/org/apache/roller/weblogger/business/SimpleTest.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. The ASF licenses this file to You + * under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. For additional information regarding + * copyright in this work, please see the NOTICE file in the top level + * directory of this distribution. + */ + +package org.apache.roller.weblogger.business; + +import org.apache.roller.weblogger.TestUtils; +import org.junit.Test; + +public class SimpleTest { + + @Test + public void testSetupWeblogger() throws Exception { + TestUtils.setupWeblogger(); + } +} diff --git a/app/src/test/resources/roller-custom.properties b/app/src/test/resources/roller-custom.properties index af72133ad2..62da734881 100644 --- a/app/src/test/resources/roller-custom.properties +++ b/app/src/test/resources/roller-custom.properties @@ -1,3 +1,4 @@ + database.configurationType=jdbc database.jdbc.driverClass=org.apache.derby.jdbc.ClientDriver database.jdbc.connectionURL=jdbc:derby://localhost:4224/memory:rollerdb @@ -14,6 +15,8 @@ hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFac # turn off transaction manager during JUnit testing (TODO: find way to activate for JUnit tests) +weblogger.provider.class=org.apache.roller.weblogger.business.CdiWebloggerProvider + # use plain text passwords in testing passwds.encryption.enabled=false From 922929b11e1b88ced8603745add1cdaaac654dfe Mon Sep 17 00:00:00 2001 From: Dave Johnson Date: Sat, 20 Oct 2018 16:19:09 -0400 Subject: [PATCH 03/12] Upgraded to Guice 4.2.1 and now Roller tests run successfully under Java 10, have not tried 11 yet. --- app/pom.xml | 21 +++++++--- .../business/CdiWebloggerProvider.java | 41 ------------------- .../test/resources/roller-custom.properties | 2 - 3 files changed, 16 insertions(+), 48 deletions(-) delete mode 100644 app/src/main/java/org/apache/roller/weblogger/business/CdiWebloggerProvider.java diff --git a/app/pom.xml b/app/pom.xml index 4d6910a0fe..aedffc3350 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -46,8 +46,8 @@ limitations under the License. 1.9.3 3.1 1.10 - 2.5.2 - 4.2.0 + 2.7.3 + 4.2.1 1.2.17 2.8.2 4.10.4 @@ -114,7 +114,7 @@ limitations under the License. javax.xml.bind jaxb-api - 2.3.0 + 2.3.1 @@ -128,13 +128,24 @@ limitations under the License. to use that stack instead. Logging, other special configuration during JUnit tests can be - placed in the src/test/resources/roller-custom.properties - file. + placed in the src/test/resources/roller-custom.properties file. --> org.eclipse.persistence eclipselink ${eclipse-link.version} + + + org.eclipse.persistence + javax.persistence + + + + + + org.eclipse.persistence + javax.persistence + 2.1.1 - - - From 9e94f5f0036dc704f5a4e0988766c7feb1f79121 Mon Sep 17 00:00:00 2001 From: Dave Johnson Date: Sun, 21 Oct 2018 14:00:21 -0400 Subject: [PATCH 07/12] Oops, I meant 11. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d2eb5d5ec6..84a72af4c6 100644 --- a/pom.xml +++ b/pom.xml @@ -63,8 +63,8 @@ limitations under the License. maven-compiler-plugin 3.8.0 - 10 - 10 + 11 + 11 true ${project.build.sourceEncoding} From ed48b479acea0fbee79c5ac1fcc0380d150cd06d Mon Sep 17 00:00:00 2001 From: Dave Johnson Date: Sun, 21 Oct 2018 14:21:14 -0400 Subject: [PATCH 08/12] I was wrong, Java 10 works by Java 11 fails. More work to do. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 84a72af4c6..d2eb5d5ec6 100644 --- a/pom.xml +++ b/pom.xml @@ -63,8 +63,8 @@ limitations under the License. maven-compiler-plugin 3.8.0 - 11 - 11 + 10 + 10 true ${project.build.sourceEncoding} From 3633dcb17490310742fe99a6cb9297a56525ea85 Mon Sep 17 00:00:00 2001 From: Dave Johnson Date: Wed, 30 Jan 2019 19:18:53 -0500 Subject: [PATCH 09/12] Fix merge problems --- app/pom.xml | 7 ++----- pom.xml | 5 ----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/pom.xml b/app/pom.xml index d6fad7d024..e35d452e8b 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -47,13 +47,10 @@ limitations under the License. 3.1 1.10 2.7.3 - 4.2.1 + 4.2.2 1.2.17 -<<<<<<< HEAD 2.9.1 -======= - 2.10.0 ->>>>>>> master + 4.10.4 20100527 3.1.0 diff --git a/pom.xml b/pom.xml index 99461fa4fa..b004224d96 100644 --- a/pom.xml +++ b/pom.xml @@ -63,13 +63,8 @@ limitations under the License. maven-compiler-plugin 3.8.0 -<<<<<<< HEAD 10 10 -======= - 1.8 - 1.8 ->>>>>>> master true ${project.build.sourceEncoding} From 07b51df0b7e1abebd41c1af1816217ea7c123eb3 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Fri, 26 Apr 2019 00:57:22 +0200 Subject: [PATCH 10/12] Updated most maven dependencies which didn't require code changes. Tests are now green on (AdoptOpen)JDK 11 and 12 using language level 11 and 12. Added an explicit dependency to ASM 7.1 to better control which version is used and improve compatibility with latest bytecodes. --- app/pom.xml | 44 ++++++++++++++++++++++++++++++-------------- pom.xml | 8 ++++---- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/app/pom.xml b/app/pom.xml index e35d452e8b..fe56545524 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -34,33 +34,32 @@ limitations under the License. - 3.0.1 + 4.0.1 2.2 1.2.0 1.4.7 1.2 - 1.2.29 - 1.10.1 + 1.7.8 + 1.10.5 1.6 1.9.3 3.1 - 1.10 - 2.7.3 + 1.12 + 2.7.4 4.2.2 1.2.17 - 2.9.1 - + 2.10.0 4.10.4 20100527 3.1.0 2.17 1.0b3 - 1.7.4 - 1.7.25 + 1.12.0 + 1.7.26 4.1.4.RELEASE 3.2.5.RELEASE - 2.5.17 + 2.5.20 1.7 1.5 1.0.2 @@ -126,7 +125,7 @@ limitations under the License. org.eclipse.persistence - javax.persistence + jakarta.persistence @@ -186,13 +185,30 @@ limitations under the License. - + commons-collections commons-collections 3.2.2 - + + + + org.ow2.asm + asm + 7.1 + + + org.ow2.asm + asm-commons + 7.1 + + + org.ow2.asm + asm-tree + 7.1 + + org.apache.struts struts2-core @@ -636,7 +652,7 @@ limitations under the License. maven-antrun-plugin - 1.7 + 1.8 ant-contrib diff --git a/pom.xml b/pom.xml index b004224d96..5653b9c71a 100644 --- a/pom.xml +++ b/pom.xml @@ -63,8 +63,8 @@ limitations under the License. maven-compiler-plugin 3.8.0 - 10 - 10 + 11 + 11 true ${project.build.sourceEncoding} @@ -80,7 +80,7 @@ limitations under the License. org.eclipse.jetty jetty-maven-plugin - 9.4.11.v20180605 + 9.4.17.v20190418 com.btmatthews.maven.plugins.inmemdb @@ -93,7 +93,7 @@ limitations under the License. - + From e2d78305b72f3401396fd1e5a34da2cad6122792 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Fri, 26 Apr 2019 01:53:33 +0200 Subject: [PATCH 11/12] updated .gitignore for NetBeans. --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 24a37b64a1..979f59a01a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,11 @@ *.iml *.iws +# NetBeans +/nb-configuration.xml +/app/nb-configuration.xml +/app/nbactions.xml + # Mac .DS_Store @@ -21,4 +26,4 @@ velocity.log tomcat-base deployment/docker-compose/postgresql-data -deployment/docker-compose/roller-data +deployment/docker-compose/roller-data \ No newline at end of file From d284c76ef5c4a9bea190939d5a4bef06703dae48 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sat, 27 Apr 2019 05:09:22 +0200 Subject: [PATCH 12/12] Changed 'eclipselink' artifact to 'org.eclipse.persistence.jpa' + removed old 'javax.persistence' dependency. Both jakarta.persistence-2.2.2.jar and org.eclipse.persistence.jpa-2.7.4.jars are now signed and don't cause a security exception during classloading. Workaround of using old JPA API jar is no longer needed. --- app/pom.xml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/app/pom.xml b/app/pom.xml index fe56545524..9a0afa94b9 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -120,20 +120,8 @@ limitations under the License. --> org.eclipse.persistence - eclipselink + org.eclipse.persistence.jpa ${eclipse-link.version} - - - org.eclipse.persistence - jakarta.persistence - - - - - - org.eclipse.persistence - javax.persistence - 2.1.1