diff --git a/README.md b/README.md
index 9bb98d1174..aa8523642e 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Roller is made up of the following Maven projects:
* _roller-project_: Top level project
* _app_: Roller Weblogger webapp, JSP pages, Velocity templates
* _assembly-release_: Used to create official distributions of Roller
-* _docs_: Roller documentation in ODT format
+* _docs_: Roller documentation in ASCII Doc format
* _it-selenium_: Integrated browser tests for Roller using Selenium
## Documentation
diff --git a/app/pom.xml b/app/pom.xml
index 994bf4c87d..4431c026fe 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -24,7 +24,7 @@ limitations under the License.
org.apache.roller
roller-project
- 6.1.1
+ 6.1.2-SNAPSHOT
../pom.xml
@@ -629,7 +629,7 @@ limitations under the License.
-
+
maven-resources-plugin
diff --git a/app/src/main/java/org/apache/roller/weblogger/business/startup/SQLScriptRunner.java b/app/src/main/java/org/apache/roller/weblogger/business/startup/SQLScriptRunner.java
index aaa5850556..ff68132811 100644
--- a/app/src/main/java/org/apache/roller/weblogger/business/startup/SQLScriptRunner.java
+++ b/app/src/main/java/org/apache/roller/weblogger/business/startup/SQLScriptRunner.java
@@ -121,7 +121,7 @@ public void runScript(
if (!con.getAutoCommit()) {
con.commit();
}
-
+
// on success, echo command to messages
successMessage(command);
diff --git a/app/src/main/resources/sql/droptables.sql b/app/src/main/resources/sql/droptables.sql
index 4057289f1a..95c41f1a50 100644
--- a/app/src/main/resources/sql/droptables.sql
+++ b/app/src/main/resources/sql/droptables.sql
@@ -38,6 +38,9 @@ drop table roller_mediafiletag;
drop table roller_mediafile;
drop table roller_mediafiledir;
+-- oauth tables
+drop table roller_oauthconsumer;
+drop table roller_oauthaccessor;
-- core services tables
drop table roller_hitcounts;
@@ -52,10 +55,6 @@ drop table custom_template_rendition;
-- core platform tables
drop table roller_permission;
-drop table weblog;
drop table userrole;
drop table roller_user;
-
--- oauth tables
-drop table roller_oauthconsumer;
-drop table roller_oauthaccessor;
+drop table weblog;
diff --git a/app/src/test/java/org/apache/roller/util/DerbyManager.java b/app/src/test/java/org/apache/roller/util/DerbyManager.java
new file mode 100644
index 0000000000..f28a6d4a6e
--- /dev/null
+++ b/app/src/test/java/org/apache/roller/util/DerbyManager.java
@@ -0,0 +1,120 @@
+/*
+ * 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.util;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.DriverManager;
+
+import org.apache.derby.drda.NetworkServerControl;
+import org.apache.roller.weblogger.business.startup.SQLScriptRunner;
+
+
+public class DerbyManager {
+ private final String databaseDir;
+ private final String databaseScriptsDir;
+ private final int port;
+
+ public DerbyManager(String databaseDir, String databaseScriptsDir, int port) {
+ this.databaseDir = databaseDir;
+ this.databaseScriptsDir = databaseScriptsDir;
+ this.port = port;
+ }
+
+ public void startDerby() throws Exception {
+ try {
+ System.out.println("==============");
+ System.out.println("Starting Derby");
+ System.out.println("==============");
+
+ System.setProperty("derby.system.home", databaseDir);
+
+ System.setProperty("derby.drda.portNumber", ""+port);
+ System.setProperty("derby.drda.host", "localhost");
+ System.setProperty("derby.drda.maxThreads","10");
+ //System.setProperty("derby.drda.logConnections","true");
+ NetworkServerControl server = new NetworkServerControl();
+ server.start(new PrintWriter(System.out));
+
+ try {Thread.sleep(2000);} catch (Exception ignored) {}
+ System.out.println("Runtime Info: " + server.getRuntimeInfo());
+
+ Class.forName("org.apache.derby.jdbc.ClientDriver");
+ Connection conn = DriverManager.getConnection(
+ "jdbc:derby://localhost:" + port + "/rollerdb;create=true","APP", "APP");
+
+ // create roller tables
+ SQLScriptRunner runner1 = new SQLScriptRunner(
+ databaseScriptsDir + File.separator + "droptables.sql");
+ runner1.runScript(conn, false);
+ runner1.runScript(conn, false); // not sure why this is necessary
+
+ SQLScriptRunner runner = new SQLScriptRunner(
+ databaseScriptsDir + File.separator + "derby" + File.separator + "createdb.sql");
+ try {
+ runner.runScript(conn, true);
+ } catch (Exception ignored) {
+ for (String message : runner.getMessages()) {
+ System.out.println(message);
+ }
+ ignored.printStackTrace();
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new Exception("ERROR starting Derby");
+ }
+ }
+
+ public void stopDerby() throws Exception {
+ try {
+ Class.forName("org.apache.derby.jdbc.ClientDriver");
+ String driverURL = "jdbc:derby://localhost:" + port + "/rollerdb";
+ Connection conn = DriverManager.getConnection(driverURL,"APP", "APP");
+
+ // drop Roller tables
+ SQLScriptRunner runner = new SQLScriptRunner(
+ databaseScriptsDir
+ + File.separator + "droptables.sql");
+ runner.runScript(conn, false);
+
+ System.out.println("==============");
+ System.out.println("Stopping Derby");
+ System.out.println("==============");
+
+ try {
+ DriverManager.getConnection(driverURL + ";shutdown=true");
+ } catch (Exception ignored) {}
+
+ System.setProperty("derby.system.home", databaseDir);
+
+ // Network Derby
+ System.setProperty("derby.drda.portNumber", ""+port);
+ System.setProperty("derby.drda.host", "localhost");
+ System.setProperty("derby.drda.maxThreads","10");
+ //System.setProperty("derby.drda.logConnections","true");
+ NetworkServerControl server = new NetworkServerControl();
+ server.shutdown();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new Exception(e.getMessage());
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/roller/weblogger/TestUtils.java b/app/src/test/java/org/apache/roller/weblogger/TestUtils.java
similarity index 98%
rename from app/src/main/java/org/apache/roller/weblogger/TestUtils.java
rename to app/src/test/java/org/apache/roller/weblogger/TestUtils.java
index 9cf94e16be..b68b55f9f5 100644
--- a/app/src/main/java/org/apache/roller/weblogger/TestUtils.java
+++ b/app/src/test/java/org/apache/roller/weblogger/TestUtils.java
@@ -57,6 +57,7 @@
import org.apache.roller.weblogger.pojos.WeblogEntryComment.ApprovalStatus;
import org.apache.roller.weblogger.pojos.WeblogHitCount;
import org.apache.roller.weblogger.pojos.WeblogPermission;
+import org.apache.roller.util.DerbyManager;
/**
* Utility class for unit test classes.
@@ -66,9 +67,17 @@ public final class TestUtils {
// Username prefix we are using (simplifies local testing)
public static final String JUNIT_PREFIX = "junit_";
+ private static DerbyManager derbyManager = null;
+
public static void setupWeblogger() throws Exception {
if (!WebloggerFactory.isBootstrapped()) {
+ synchronized (TestUtils.class) {
+ if (derbyManager == null) {
+ derbyManager = new DerbyManager("./target/testdb", "./target/dbscripts", 4224);
+ derbyManager.startDerby();
+ }
+ }
// do core services preparation
WebloggerStartup.prepare();
@@ -105,6 +114,8 @@ public static void shutdownWeblogger() throws Exception {
// trigger shutdown
WebloggerFactory.getWeblogger().shutdown();
+
+ derbyManager.stopDerby();
}
/**
diff --git a/app/src/test/resources/roller-custom.properties b/app/src/test/resources/roller-custom.properties
index 59fed4f9bf..23a2c28db2 100644
--- a/app/src/test/resources/roller-custom.properties
+++ b/app/src/test/resources/roller-custom.properties
@@ -1,7 +1,7 @@
database.configurationType=jdbc
database.jdbc.driverClass=org.apache.derby.jdbc.ClientDriver
-database.jdbc.connectionURL=jdbc:derby://localhost:4224/memory:rollerdb
+database.jdbc.connectionURL=jdbc:derby://localhost:4224/rollerdb
database.jdbc.username=APP
database.jdbc.password=APP
diff --git a/assembly-release/pom.xml b/assembly-release/pom.xml
index 0409461dc6..cd9b3b2b00 100644
--- a/assembly-release/pom.xml
+++ b/assembly-release/pom.xml
@@ -22,7 +22,7 @@
org.apache.roller
roller-project
- 6.1.1
+ 6.1.2-SNAPSHOT
../pom.xml
diff --git a/assembly-release/sign-release.sh b/assembly-release/sign-release.sh
index 88ace89536..006be83c91 100755
--- a/assembly-release/sign-release.sh
+++ b/assembly-release/sign-release.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
-export rcstring="-rc1"
-export vstring="6.1.1"
+export rcstring=""
+export vstring="6.1.2-SNAPSHOT"
# for rc releases we rename the release files
if [ rcstring != "" ]; then
diff --git a/it-selenium/pom.xml b/it-selenium/pom.xml
index 9f1088916c..eb50756a7c 100644
--- a/it-selenium/pom.xml
+++ b/it-selenium/pom.xml
@@ -24,7 +24,7 @@
org.apache.roller
roller-project
- 6.1.1
+ 6.1.2-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index b602b13b50..f9613ec98f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
4.0.0
org.apache.roller
roller-project
- 6.1.1
+ 6.1.2-SNAPSHOT
pom
Roller
@@ -45,7 +45,7 @@ limitations under the License.
10.11.1.1
2.3.1
10.0.5
- 6.1.1
+ 6.1.2-SNAPSHOT
@@ -87,15 +87,6 @@ limitations under the License.
jetty-maven-plugin
${jetty.version}
-
- com.btmatthews.maven.plugins.inmemdb
- inmemdb-maven-plugin
- 1.4.3
-
- inmemdb
- 11527
-
-
org.codehaus.mojo
versions-maven-plugin