diff --git a/sqlcl/java/README.md b/sqlcl/java/README.md
index 4b48dd0..f12b7fd 100644
--- a/sqlcl/java/README.md
+++ b/sqlcl/java/README.md
@@ -1,49 +1 @@
-# sqlcl-java
-
-This repository is a few examples of how to use [Oracle SQLcl](http://www.oracle.com/technetwork/developer-tools/sqlcl/overview/index.html) as a Java library.
-
-# Env / Eclipse Setup
-
-1. Download SQLcl
-2. Unzip SQLcl
-3. Add sql/lib/* files to the classpath
-
-
-
-#
-
-# Examples
-
-
-## Run Entire script
-This example uses the @myfile 'normal' sqlcl / sqlplus syntax to run and entire script.
-
-[RunMyScript](src/RunMyScript.java)
-
-
-## ParseScript and Execute
-This is an example of parsing a file with the SQLcl script parser. Then iterating over the array of commands to execute and detect errors to be handled.
-
-[ParseScriptRunOneAtATime.java](src/ParseScriptRunOneAtATime.java)
-
-
-> Only 0 rows currently supported in a script resultsno rows selected
->
-> Table KLRICE_TEST created.
->
->
-> 1 row inserted.
->
->
-> 1 row inserted.
->
->
-> 1 row inserted.
->
-> Only 0 rows currently supported in a script resultsno rows selected
->
-> Rollback complete.
->
-> no rows selected
->
-> Table KLRICE_TEST dropped.
+# List of demos and short descriptions
diff --git a/sqlcl/java/.classpath b/sqlcl/java/scriptrunner/.classpath
similarity index 100%
rename from sqlcl/java/.classpath
rename to sqlcl/java/scriptrunner/.classpath
diff --git a/sqlcl/java/.gitignore b/sqlcl/java/scriptrunner/.gitignore
similarity index 100%
rename from sqlcl/java/.gitignore
rename to sqlcl/java/scriptrunner/.gitignore
diff --git a/sqlcl/java/.project b/sqlcl/java/scriptrunner/.project
similarity index 100%
rename from sqlcl/java/.project
rename to sqlcl/java/scriptrunner/.project
diff --git a/sqlcl/java/scriptrunner/README.md b/sqlcl/java/scriptrunner/README.md
new file mode 100644
index 0000000..4b48dd0
--- /dev/null
+++ b/sqlcl/java/scriptrunner/README.md
@@ -0,0 +1,49 @@
+# sqlcl-java
+
+This repository is a few examples of how to use [Oracle SQLcl](http://www.oracle.com/technetwork/developer-tools/sqlcl/overview/index.html) as a Java library.
+
+# Env / Eclipse Setup
+
+1. Download SQLcl
+2. Unzip SQLcl
+3. Add sql/lib/* files to the classpath
+
+
+
+#
+
+# Examples
+
+
+## Run Entire script
+This example uses the @myfile 'normal' sqlcl / sqlplus syntax to run and entire script.
+
+[RunMyScript](src/RunMyScript.java)
+
+
+## ParseScript and Execute
+This is an example of parsing a file with the SQLcl script parser. Then iterating over the array of commands to execute and detect errors to be handled.
+
+[ParseScriptRunOneAtATime.java](src/ParseScriptRunOneAtATime.java)
+
+
+> Only 0 rows currently supported in a script resultsno rows selected
+>
+> Table KLRICE_TEST created.
+>
+>
+> 1 row inserted.
+>
+>
+> 1 row inserted.
+>
+>
+> 1 row inserted.
+>
+> Only 0 rows currently supported in a script resultsno rows selected
+>
+> Rollback complete.
+>
+> no rows selected
+>
+> Table KLRICE_TEST dropped.
diff --git a/sqlcl/java/myfile.sql b/sqlcl/java/scriptrunner/myfile.sql
similarity index 100%
rename from sqlcl/java/myfile.sql
rename to sqlcl/java/scriptrunner/myfile.sql
diff --git a/sqlcl/java/sqlcl-eclipse-path.png b/sqlcl/java/scriptrunner/sqlcl-eclipse-path.png
similarity index 100%
rename from sqlcl/java/sqlcl-eclipse-path.png
rename to sqlcl/java/scriptrunner/sqlcl-eclipse-path.png
diff --git a/sqlcl/java/src/ParseScriptRunOneAtATime.java b/sqlcl/java/scriptrunner/src/ParseScriptRunOneAtATime.java
similarity index 100%
rename from sqlcl/java/src/ParseScriptRunOneAtATime.java
rename to sqlcl/java/scriptrunner/src/ParseScriptRunOneAtATime.java
diff --git a/sqlcl/java/src/RunMyScript.java b/sqlcl/java/scriptrunner/src/RunMyScript.java
similarity index 100%
rename from sqlcl/java/src/RunMyScript.java
rename to sqlcl/java/scriptrunner/src/RunMyScript.java
diff --git a/sqlcl/java/sqlcl-maven-integration/.idea/.gitignore b/sqlcl/java/sqlcl-maven-integration/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/sqlcl/java/sqlcl-maven-integration/.idea/compiler.xml b/sqlcl/java/sqlcl-maven-integration/.idea/compiler.xml
new file mode 100644
index 0000000..38672ff
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/.idea/compiler.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/.idea/encodings.xml b/sqlcl/java/sqlcl-maven-integration/.idea/encodings.xml
new file mode 100644
index 0000000..aa00ffa
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/.idea/encodings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/.idea/google-java-format.xml b/sqlcl/java/sqlcl-maven-integration/.idea/google-java-format.xml
new file mode 100644
index 0000000..2aa056d
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/.idea/google-java-format.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/.idea/jarRepositories.xml b/sqlcl/java/sqlcl-maven-integration/.idea/jarRepositories.xml
new file mode 100644
index 0000000..785e523
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/.idea/misc.xml b/sqlcl/java/sqlcl-maven-integration/.idea/misc.xml
new file mode 100644
index 0000000..9dc782b
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/.idea/uiDesigner.xml b/sqlcl/java/sqlcl-maven-integration/.idea/uiDesigner.xml
new file mode 100644
index 0000000..2b63946
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/.idea/vcs.xml b/sqlcl/java/sqlcl-maven-integration/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/README.md b/sqlcl/java/sqlcl-maven-integration/README.md
new file mode 100644
index 0000000..7b8d278
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/README.md
@@ -0,0 +1,349 @@
+# Overview
+Find out how to include SQLcl libraries in your product and run database and liquibase commands.
+### Java Setup
+Java required
+## Artifactory Repositories
+### Maven
+
+
+```
+
+ dbtools-release
+ https://artifacthub-phx.oci.oraclecorp.com/dbtools-dev-mvn-release/
+ dbtools-release
+
+```
+
+### SQLcl Maven Coordinates
+
+```
+
+
+ oracle.dbtools
+ dbtools-arbori
+
+
+ oracle.dbtools
+ dbtools-net
+
+
+ oracle.dbtools
+ dbtools-data
+
+
+ oracle.dbtools
+ dbtools-datapump
+
+
+ oracle.dbtools
+ dbtools-http
+
+
+ oracle.dbtools
+ dbtools-jobs
+
+
+ com.oracle.database.jdbc
+ ojdbc11
+
+
+ oracle.dbtools
+ dbtools-common-all
+
+
+```
+
+# Examples
+## Overview
+The main example here is aimed at showing how to use liquibase to prepare a changeset, in this case a simple object export, and then update the "production" db with that changeset.
+
+## Preparation
+For this to work, we need some files which the runner will run two files, one on the development db and on on the production db. On the development db, we need to run
+
+```
+cd /Users/bamcgill/sandbox/liquibase/integrate
+!rm *.xml
+lb generate-db-object -object-name OOW_DEMO_STORES -object-type table
+```
+
+which will generate the changelog. Change this to your specific location.
+Next, you will create a second file called lbupdate.sql, which contains the following:
+
+```
+set ddl SEGMENT_ATTRIBUTES off
+set ddl storage off
+lb update -chf oow_demo_stores_table.xml
+```
+
+This specifies the way we want ddl to be generated and applied to the database and then run the changelog we generated above.
+
+
+
+## SQLcl Runner
+This class is a wrapper around SQLcl to create a very simple API which users can call.
+`runSQLcl("Commands to run", ...) `
+
+what this allows you to do is to run a script and give the api a named connection, or a url to connect. to a database. e.g., this runs a script called `myinterestingfile.sql` with a named connection called `cicd-dev `
+`runSQLcl("@myinterestingfile.sql", "-name","cicd-dev"
+
+```
+package oracle.dbtools;
+import liquibase.Scope;
+import oracle.dbtools.commands.OCIConnectorTypeFactory;
+import oracle.dbtools.raptor.console.ConsoleService;
+import oracle.dbtools.raptor.newscriptrunner.ScriptRunnerContext;
+import oracle.dbtools.raptor.newscriptrunner.ScriptRunnerContextFactory;
+import oracle.dbtools.raptor.newscriptrunner.commands.connect.ConnectionContextFactory;
+import oracle.dbtools.raptor.newscriptrunner.commands.connect.ConnectorTypeCacheFactory;
+import oracle.dbtools.raptor.newscriptrunner.commands.connector.*;
+import oracle.dbtools.raptor.newscriptrunner.util.container.ProviderFactory;
+import oracle.dbtools.raptor.newscriptrunner.util.provider.EnvironmentFactory;
+import oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli;
+
+import java.io.*;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * This is a simple runner for SQLcl. We have it at this level because all commands
+ * are available from here including liquibase, mle, and mdb.
+ *
+ * @author bamcgill
+ * @author skutz
+ */
+public class SQLclRunner {
+ PrintStream newPs;
+ String result;
+ private final ByteArrayOutputStream newOut;
+ private final PrintStream oldOut , oldErr;
+
+ public SQLclRunner() {
+ oldOut = System.out;
+ oldErr = System.err;
+ newOut = new ByteArrayOutputStream();
+ newPs = new PrintStream(newOut);
+ }
+
+ public String runSqlcl(final String input, final String... args) {
+ System.setProperty("force.interactive", "true");
+ System.setProperty("no.login.sql", "true");
+ System.setProperty("user.dir", System.getProperty("java.io.tmpdir"));
+ // this disables the highlighter. needs better way to kill banner and highlighter
+ System.setProperty("dev.flag", "true");
+ final InputStream inputStream = new ByteArrayInputStream((input + "\nquit\n").getBytes(StandardCharsets.UTF_8));
+ final PrintStream cmdStream = new PrintStream(new OutputStream() {
+ @Override
+ public void write(final int b) {
+ }
+ });
+ try {
+ final ScriptRunnerContext context = getContext(newPs);
+ Scope.setScopeManager(null);
+ SqlCli cli = new SqlCli(context, ConsoleService.builder().streams(inputStream, cmdStream), args);
+ System.setOut(newPs);
+ System.setErr(newPs);
+ cli.runSqlcl();
+ System.setOut(oldOut);
+ System.setErr(oldErr);
+ newPs.flush();
+ result = newOut.toString();
+ newOut.reset();
+ cli.close();
+ return result;
+ } catch (final Exception e) {
+ System.out.println(e.getMessage());
+ } finally {
+ newOut.reset();
+ result = "";
+ }
+ return result;
+ }
+
+ private ScriptRunnerContext getContext( PrintStream cmdStream) throws Exception {
+ try {
+ List> contextFactories = new ArrayList<>(List.of(new ScriptRunnerContextFactory(), //
+ new EnvironmentFactory(), //
+ new ConnectionContextFactory(), //
+ new ConnectorTypeCacheFactory(), //
+ new OracleConnectorTypeFactory(), //
+ new OracleRestConnectorTypeFactory(), //
+ new CloudWalletConnectorTypeFactory(), //
+ new SocksProxyConnectorTypeFactory(), //
+ new ThirdPartyConnectorTypeFactory(), //
+ new OCIConnectorTypeFactory(), //
+ new NamedConnectionsConnectorTypeFactory()));
+ final ScriptRunnerContext context = new ScriptRunnerContext(Collections.unmodifiableList(contextFactories));
+ context.setSupressOutput(false);
+ context.setOutputStreamWrapper(new BufferedOutputStream(cmdStream));
+ return context;
+ } catch (final Exception e) {
+ throw new Exception(e);
+ }
+ }
+}
+
+```
+## Connecting to a database and running a command
+Now, while using the wrapper you can call out to any file. The demo passes in arguments to SQLcl and in this demo, we are using named connections with saved encrypted passwords. There have been two created
+
+```
+package oracle.dbtools;
+/**
+ * Demo for running a script in sqlcl with any command.
+ */
+public class SQLCLIntegrationDemo {
+ public static void main(String[] args) {
+ SQLclRunner runner = new SQLclRunner();
+ String results = runner.runSqlcl("@/Users/bamcgill/sandbox/liquibase/integrate/lbcreatechangelog.sql;", "-name", "cicd-dev", "-s");
+ System.out.println(results);
+ results = runner.runSqlcl("@/Users/bamcgill/sandbox/liquibase/integrate/lbupdate.sql;", "-name", "cicd-prod", "-s");
+ System.out.println(results);
+ }
+}
+
+```
+
+## Demo Results
+In case you don't have time to run them, here is the run through
+Look at source database
+
+```
+CICD@jdbc:oracle:thin:@localhost:8521/freepdb1🍻🍺 >show connection
+COMMAND_PROPERTIES:
+ type: STORE
+ name: cicd-dev
+ user: cicd
+CONNECTION:
+ CICD@jdbc:oracle:thin:@localhost:8521/freepdb1
+CONNECTION_IDENTIFIER:
+ jdbc:oracle:thin:@localhost:8521/freepdb1
+CONNECTION_DB_VERSION:
+ Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
+ Version 23.5.0.24.07
+NOLOG:
+ false
+PRELIMAUTH:
+ false
+CICD@jdbc:oracle:thin:@localhost:8521/freepdb1🍻🍺 >tables
+
+TABLES
+__________________________
+OOW_DEMO_EVENT_LOG
+OOW_DEMO_HIST_GEN_LOG
+OOW_DEMO_ITEMS
+OOW_DEMO_PREFERENCES
+OOW_DEMO_REGIONS
+OOW_DEMO_SALES_HISTORY
+OOW_DEMO_STORE_PRODUCTS
+OOW_DEMO_STORES
+
+8 rows selected.
+```
+
+Look at target database before update
+
+```
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >show connection
+COMMAND_PROPERTIES:
+ type: STORE
+ name: cicd-prod
+ user: cicd
+CONNECTION:
+ CICD@jdbc:oracle:thin:@localhost:9521/freepdb1
+CONNECTION_IDENTIFIER:
+ jdbc:oracle:thin:@localhost:9521/freepdb1
+CONNECTION_DB_VERSION:
+ Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
+ Version 23.5.0.24.07
+NOLOG:
+ false
+PRELIMAUTH:
+ false
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >tables
+
+no rows selected
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >
+```
+
+## Running the demo
+
+```
+java -jar -classpath ... oracle.dbtools.SQLCLIntegrationDemo
+
+
+--Starting Liquibase at 2024-09-07T00:11:35.245821 (version [local build] #0 built at 2024-08-14 18:40+0000)
+Changelog created and written out to file oow_demo_stores_table.xml
+
+Operation completed successfully.
+
+
+DDL Option SEGMENT_ATTRIBUTES was set to OFF
+DDL Option STORAGE was set to OFF
+--Starting Liquibase at 2024-09-07T00:11:38.589070 (version [local build] #0 built at 2024-08-14 18:40+0000)
+Running Changeset: oow_demo_stores_table.xml::cbace20ebfbe0a9e3b34735a1e5881e578c72dfa::(CICD)-Generated
+
+Table "OOW_DEMO_STORES" created.
+
+
+
+UPDATE SUMMARY
+Run: 1
+Previously run: 0
+Filtered out: 0
+-------------------------------
+Total change sets: 1
+
+Liquibase: Update has been successful. Rows affected: 1
+
+
+Operation completed successfully.
+
+
+
+Process finished with exit code 0
+
+```
+
+## Liquibase artifacts
+After the completion, there will be 4 tables
+
+```
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >tables
+
+TABLES
+____________________________
+DATABASECHANGELOG_ACTIONS
+DATABASECHANGELOG
+DATABASECHANGELOGLOCK
+OOW_DEMO_STORES
+
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >
+```
+
+You can see the changelings run
+
+```
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >select * from DATABASECHANGELOG;
+
+ID AUTHOR FILENAME DATEEXECUTED ORDEREXECUTED EXECTYPE MD5SUM DESCRIPTION COMMENTS TAG LIQUIBASE CONTEXTS LABELS DEPLOYMENT_ID
+___________________________________________ ___________________ ____________________________ _______________________________ ________________ ___________ _____________________________________ ______________________________________________________________ ___________ ______ ____________ ___________ _________ ________________
+cbace20ebfbe0a9e3b34735a1e5881e578c72dfa (CICD)-Generated oow_demo_stores_table.xml 06-SEP-24 23.11.46.470315000 1 EXECUTED 9:21a16b87e12612a9becb5fa775210c5a createSxmlObject objectName=OOW_DEMO_STORES, ownerName=CICD DEV 5664302856
+
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >
+```
+and the actions which took place.
+
+```
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >select * from DATABASECHANGELOG_ACTIONS;
+
+ID SEQUENCE SQL SXML AUTHOR FILENAME DEPLOYMENT_ID STATUS
+___________________________________________ ___________ ___________________________________________________________________________________ _______ ___________________ ____________________________ ________________ _________
+cbace20ebfbe0a9e3b34735a1e5881e578c72dfa 0 CREATE TABLE "OOW_DEMO_STORES"
+ ( "ID" NUMBER,
+ "ROW_VERSION_NUMBER" NUMBER,
+ (CICD)-Generated oow_demo_stores_table.xml 5664302856 RAN
+
+CICD@jdbc:oracle:thin:@localhost:9521/freepdb1🍻🍺 >
+```
diff --git a/sqlcl/java/sqlcl-maven-integration/demo/intellij.png b/sqlcl/java/sqlcl-maven-integration/demo/intellij.png
new file mode 100644
index 0000000..15df5f3
Binary files /dev/null and b/sqlcl/java/sqlcl-maven-integration/demo/intellij.png differ
diff --git a/sqlcl/java/sqlcl-maven-integration/demo/lbcreatechangelog.sql b/sqlcl/java/sqlcl-maven-integration/demo/lbcreatechangelog.sql
new file mode 100644
index 0000000..5d140d9
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/demo/lbcreatechangelog.sql
@@ -0,0 +1,3 @@
+cd /Users/bamcgill/sandbox/liquibase/integrate
+!rm *.xml
+lb generate-db-object -object-name OOW_DEMO_STORES -object-type table
diff --git a/sqlcl/java/sqlcl-maven-integration/demo/lbupdate.sql b/sqlcl/java/sqlcl-maven-integration/demo/lbupdate.sql
new file mode 100644
index 0000000..17b26fa
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/demo/lbupdate.sql
@@ -0,0 +1,3 @@
+set ddl SEGMENT_ATTRIBUTES off
+set ddl storage off
+lb update -chf oow_demo_stores_table.xml
diff --git a/sqlcl/java/sqlcl-maven-integration/pom.xml b/sqlcl/java/sqlcl-maven-integration/pom.xml
new file mode 100644
index 0000000..ca4b0e3
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/pom.xml
@@ -0,0 +1,162 @@
+
+
+ 4.0.0
+
+ oracle.dbtools
+ LBDemo
+ 1.0-SNAPSHOT
+
+
+ 11
+ 11
+ UTF-8
+ 24.3.0
+
+
+
+
+
+ oracle.dbtools
+ dbtools-common-all
+ ${dbtools-common-all.version}
+
+
+ oracle.dbtools
+ dbtools-liquibase
+ 24.3.0-SNAPSHOT
+
+
+ org.liquibase
+ liquibase-core
+ 4.25.0
+
+
+ com.opencsv
+ opencsv
+
+
+ org.apache.commons
+ commons-lang3
+
+
+
+
+
+
+ com.opencsv
+ opencsv
+ 5.9
+
+
+ commons-collections
+ commons-collections
+
+
+
+
+ com.oracle.database.jdbc
+ ojdbc11
+
+
+ commons-io
+ commons-io
+ 2.16.1
+
+
+ oracle.dbtools
+ dbtools-apex
+ provided
+
+
+ oracle.dbtools
+ dbtools-common
+ provided
+
+
+ oracle.dbtools
+ dbtools-testing-framework
+ test
+
+
+ org.apache.commons
+ commons-lang3
+ 3.14.0
+
+
+ org.jetbrains
+ annotations
+ 24.1.0
+ provided
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.10.2
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.10.2
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+ 5.10.2
+ test
+
+
+ org.liquibase
+ liquibase-core
+
+
+ com.opencsv
+ opencsv
+
+
+ org.apache.commons
+ commons-lang3
+
+
+
+
+ org.skyscreamer
+ jsonassert
+ 1.5.1
+ test
+
+
+ org.yaml
+ snakeyaml
+ 2.2
+
+
+ org.freemarker
+ freemarker
+ 2.3.32
+
+
+ oracle.dbtoolsdbtools-sqlcl
+
+
+
+
+
+
+
+
+ dbtools-release
+ https://artifacthub-phx.oci.oraclecorp.com/dbtools-dev-mvn-release/
+ dbtools-release
+
+
+
+
+ oracle.dbtools
+ dbtools-common-all
+
+
+
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/src/main/java/oracle/dbtools/SQLCLIntegrationDemo.java b/sqlcl/java/sqlcl-maven-integration/src/main/java/oracle/dbtools/SQLCLIntegrationDemo.java
new file mode 100644
index 0000000..53d5e51
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/src/main/java/oracle/dbtools/SQLCLIntegrationDemo.java
@@ -0,0 +1,13 @@
+package oracle.dbtools;
+/**
+ * Demo for running a script in sqlcl with any command.
+ */
+public class SQLCLIntegrationDemo {
+ public static void main(String[] args) {
+ SQLclRunner runner = new SQLclRunner();
+ String results = runner.runSqlcl("@/Users/bamcgill/sandbox/liquibase/integrate/lbcreatechangelog.sql;", "-name", "cicd-dev", "-s");
+ System.out.println(results);
+ results = runner.runSqlcl("@/Users/bamcgill/sandbox/liquibase/integrate/lbupdate.sql;", "-name", "cicd-prod", "-s");
+ System.out.println(results);
+ }
+}
\ No newline at end of file
diff --git a/sqlcl/java/sqlcl-maven-integration/src/main/java/oracle/dbtools/SQLclRunner.java b/sqlcl/java/sqlcl-maven-integration/src/main/java/oracle/dbtools/SQLclRunner.java
new file mode 100644
index 0000000..6e312b9
--- /dev/null
+++ b/sqlcl/java/sqlcl-maven-integration/src/main/java/oracle/dbtools/SQLclRunner.java
@@ -0,0 +1,96 @@
+package oracle.dbtools;
+import liquibase.Scope;
+import oracle.dbtools.commands.OCIConnectorTypeFactory;
+import oracle.dbtools.raptor.console.ConsoleService;
+import oracle.dbtools.raptor.newscriptrunner.ScriptRunnerContext;
+import oracle.dbtools.raptor.newscriptrunner.ScriptRunnerContextFactory;
+import oracle.dbtools.raptor.newscriptrunner.commands.connect.ConnectionContextFactory;
+import oracle.dbtools.raptor.newscriptrunner.commands.connect.ConnectorTypeCacheFactory;
+import oracle.dbtools.raptor.newscriptrunner.commands.connector.*;
+import oracle.dbtools.raptor.newscriptrunner.util.container.ProviderFactory;
+import oracle.dbtools.raptor.newscriptrunner.util.provider.EnvironmentFactory;
+import oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli;
+
+import java.io.*;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * This is a simple runner for SQLcl. We have it at this level because all commands
+ * are available from here including liquibase, mle, and mdb.
+ *
+ * @author bamcgill
+ * @author skutz
+ */
+public class SQLclRunner {
+ PrintStream newPs;
+ String result;
+ private final ByteArrayOutputStream newOut;
+ private final PrintStream oldOut , oldErr;
+
+ public SQLclRunner() {
+ oldOut = System.out;
+ oldErr = System.err;
+ newOut = new ByteArrayOutputStream();
+ newPs = new PrintStream(newOut);
+ }
+
+ public String runSqlcl(final String input, final String... args) {
+ System.setProperty("force.interactive", "true");
+ System.setProperty("no.login.sql", "true");
+ System.setProperty("user.dir", System.getProperty("java.io.tmpdir"));
+ // this disables the highlighter. needs better way to kill banner and highlighter
+ System.setProperty("dev.flag", "true");
+ final InputStream inputStream = new ByteArrayInputStream((input + "\nquit\n").getBytes(StandardCharsets.UTF_8));
+ final PrintStream cmdStream = new PrintStream(new OutputStream() {
+ @Override
+ public void write(final int b) {
+ }
+ });
+ try {
+ final ScriptRunnerContext context = getContext(newPs);
+ Scope.setScopeManager(null);
+ SqlCli cli = new SqlCli(context, ConsoleService.builder().streams(inputStream, cmdStream), args);
+ System.setOut(newPs);
+ System.setErr(newPs);
+ cli.runSqlcl();
+ System.setOut(oldOut);
+ System.setErr(oldErr);
+ newPs.flush();
+ result = newOut.toString();
+ newOut.reset();
+ cli.close();
+ return result;
+ } catch (final Exception e) {
+ System.out.println(e.getMessage());
+ } finally {
+ newOut.reset();
+ result = "";
+ }
+ return result;
+ }
+
+ private ScriptRunnerContext getContext( PrintStream cmdStream) throws Exception {
+ try {
+ List> contextFactories = new ArrayList<>(List.of(new ScriptRunnerContextFactory(), //
+ new EnvironmentFactory(), //
+ new ConnectionContextFactory(), //
+ new ConnectorTypeCacheFactory(), //
+ new OracleConnectorTypeFactory(), //
+ new OracleRestConnectorTypeFactory(), //
+ new CloudWalletConnectorTypeFactory(), //
+ new SocksProxyConnectorTypeFactory(), //
+ new ThirdPartyConnectorTypeFactory(), //
+ new OCIConnectorTypeFactory(), //
+ new NamedConnectionsConnectorTypeFactory()));
+ final ScriptRunnerContext context = new ScriptRunnerContext(Collections.unmodifiableList(contextFactories));
+ context.setSupressOutput(false);
+ context.setOutputStreamWrapper(new BufferedOutputStream(cmdStream));
+ return context;
+ } catch (final Exception e) {
+ throw new Exception(e);
+ }
+ }
+}