Skip to content

Commit

Permalink
Merge pull request #672 from marklogic/release/4.6.0
Browse files Browse the repository at this point in the history
Release/4.6.0
  • Loading branch information
rjrudin authored Sep 8, 2023
2 parents b4aa51b + 7a79264 commit 57b7f2c
Show file tree
Hide file tree
Showing 66 changed files with 344 additions and 123 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ running Gradle 7 or higher, you'll need to use ml-gradle 4.3.0 or higher.

Then, in an empty directory, create a file named "build.gradle" with your favorite text editor and enter the following:

plugins { id "com.marklogic.ml-gradle" version "4.5.3" }
plugins { id "com.marklogic.ml-gradle" version "4.6.0" }

Then run:

Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ plugins {
}

group = "com.marklogic"
version = "4.5.3"
version = "4.6.0"

java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

repositories {
mavenLocal()
mavenCentral()
maven {
url "https://nexus.marklogic.com/repository/maven-snapshots/"
Expand All @@ -31,12 +32,12 @@ dependencies {
implementation gradleApi()
implementation localGroovy()

api 'com.marklogic:ml-app-deployer:4.5.3'
api 'com.marklogic:ml-app-deployer:4.6.0'
implementation "com.marklogic:mlcp-util:1.0.1"
implementation "com.marklogic:marklogic-data-movement-components:2.6.0"
implementation "com.marklogic:marklogic-data-movement-components:2.7.0"
implementation "commons-io:commons-io:2.11.0"

compileOnly "com.marklogic:marklogic-unit-test-client:1.3.0"
compileOnly "com.marklogic:marklogic-unit-test-client:1.4.0"

testImplementation localGroovy()
testImplementation gradleTestKit()
Expand Down
2 changes: 1 addition & 1 deletion examples/alert-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "java"
id "eclipse"
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/corb2-project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {
}

plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpf-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "java"
id "eclipse"
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-forests-and-replicas-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}
2 changes: 1 addition & 1 deletion examples/custom-rest-rewriter-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

task generateCustomRewriterModules {
Expand Down
2 changes: 1 addition & 1 deletion examples/data-services/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "java"
id "net.saliman.properties" version "1.5.1"
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
id 'com.marklogic.ml-development-tools' version '6.0.0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

plugins {
id "net.saliman.properties" version "1.5.1"
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

//apply plugin: "com.marklogic.ml-gradle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildscript {
plugins {
id 'java' //optional - delete if not needed
id 'net.saliman.properties' version '1.5.1'
id 'com.marklogic.ml-gradle' version "4.5.3"
id 'com.marklogic.ml-gradle' version "4.6.0"
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/disconnected-project/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mlGradleDependency=com.marklogic:ml-gradle:4.5.3
mlGradleDependency=com.marklogic:ml-gradle:4.6.0
mlSalimanDependency=net.saliman:gradle-properties-plugin:1.4.6

mlHost=localhost
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
// gradle -PenvironmentName=x ...
id 'net.saliman.properties' version '1.5.1'
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
id 'com.avast.gradle.docker-compose' version "0.6.11"
}
dockerCompose {
Expand Down
2 changes: 1 addition & 1 deletion examples/docker-projects/single-node/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
// gradle -PenvironmentName=x ...
id 'net.saliman.properties' version '1.5.1'
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
id 'com.avast.gradle.docker-compose' version "0.6.11"
}
dockerCompose {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'net.saliman.properties' version '1.5.1'
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
id 'com.avast.gradle.docker-compose' version "0.6.11"
}
dockerCompose {
Expand Down
2 changes: 1 addition & 1 deletion examples/entity-services-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}
2 changes: 1 addition & 1 deletion examples/external-security/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}
2 changes: 1 addition & 1 deletion examples/failover-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}
2 changes: 1 addition & 1 deletion examples/flexrep-project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

ext {
Expand Down
2 changes: 1 addition & 1 deletion examples/flexrep-with-path-project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenLocal()
}
dependencies {
classpath "com.marklogic:ml-gradle:4.5.3"
classpath "com.marklogic:ml-gradle:4.6.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
2 changes: 1 addition & 1 deletion examples/httpbuilder-project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

/*
Expand Down
2 changes: 1 addition & 1 deletion examples/ignore-resources-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

ext {
Expand Down
2 changes: 1 addition & 1 deletion examples/jdbc-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
id "java"
}

Expand Down
2 changes: 1 addition & 1 deletion examples/local-testing-project/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Set this to the version you used when running
# "gradle -Pversion=(something) publishToMavenLocal" on your local ml-gradle repo
mlGradleVersion=4.5.3
mlGradleVersion=4.6.0

mlHost=localhost
mlAppName=example
Expand Down
2 changes: 1 addition & 1 deletion examples/marklogic-cloud-project/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Set this to the version you used when running
# "gradle -Pversion=(something) publishToMavenLocal" on your local ml-gradle repo
mlGradleVersion=4.5.3
mlGradleVersion=4.6.0

mlAppName=cloud-test

Expand Down
2 changes: 1 addition & 1 deletion examples/maven-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}
2 changes: 1 addition & 1 deletion examples/mimetypes-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}
2 changes: 1 addition & 1 deletion examples/minimal-project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
*/

plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}
20 changes: 19 additions & 1 deletion examples/mlcp-project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.marklogic:ml-gradle:4.5.3"
classpath "com.marklogic:ml-gradle:4.6.0"
}
}

Expand Down Expand Up @@ -64,6 +64,24 @@ task importSampleData(type: com.marklogic.gradle.task.MlcpTask) {
args = ["-input_file_path", "data/import"]
}

/**
* Example of using an options_file with an MlcpTask to import data with mlcp.
*/
task importSampleDataWithOptionsFile(type: com.marklogic.gradle.task.MlcpTask) {
classpath = configurations.mlcp
command = "IMPORT"
options_file = "mlcpOptions.txt"
}

/**
* Example of using an JavaExec and an options_file to import data with mlcp.
*/
task importSampleDataWithJavaExec(type: JavaExec) {
classpath = configurations.mlcp
mainClass = 'com.marklogic.contentpump.ContentPump'
args = ["IMPORT", "-options_file", "mlcpOptionsHostUsernamePassword.txt"]
}

/**
* Example of using mlcp to import RDF data - in this case, World Bank's publicly available topical
* taxonomy.
Expand Down
16 changes: 16 additions & 0 deletions examples/mlcp-project/mlcpOptions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-host
localhost
-username
admin
-password
admin
-port
8000
-database
mlcp-project-content
-output_collections
sample-import
-output_permissions
rest-reader,read,rest-writer,update
-input_file_path
data/import
2 changes: 1 addition & 1 deletion examples/no-appservers-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}
2 changes: 1 addition & 1 deletion examples/partition-project/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mlGradleVersion=4.5.3
mlGradleVersion=4.6.0

mlHost=localhost
mlAppName=partition-example
Expand Down
2 changes: 1 addition & 1 deletion examples/properties-project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
// processing the gradle-(environmentName).properties files.
id "net.saliman.properties" version "1.4.6"

id "com.marklogic.ml-gradle" version "4.5.3"
id "com.marklogic.ml-gradle" version "4.6.0"
}

task printHost {
Expand Down
6 changes: 6 additions & 0 deletions examples/qbv-example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/bin
.classpath
.project
/build
.gradle
.settings
5 changes: 5 additions & 0 deletions examples/qbv-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This project shows an example of how MarkLogic 11 QBVs can be generated from an Optic
query and loaded into a schemas database from src/main/ml-schemas/qbv.

Note that in order for this to work, a schemas database must be created and the content-database.json file must specify
that schema database. This example is already setup to meet those requirements with a schemas-database.json file.
42 changes: 42 additions & 0 deletions examples/qbv-example/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
plugins {
id "com.marklogic.ml-gradle" version "4.6.0"
}

repositories {
mavenCentral()
}

configurations {
mlcp
}

dependencies {
mlcp 'com.marklogic:mlcp:11.0.3'
mlcp files("lib")
}

/**
* Using an MlcpTask to load the data into the content database.
* See the mlcp example project (examples/mlcp-project) for more information on this technique.
*/
task importEmployeeData(type: com.marklogic.gradle.task.MlcpTask) {
classpath = configurations.mlcp
command = "IMPORT"
database = mlAppConfig.contentDatabaseName
output_collections = "sample-import"
output_permissions = "rest-reader,read,rest-writer,update"
output_uri_replace = ".*import,'/import'"
input_file_path = "data"
input_file_type = "delimited_text"
delimited_root_name = "Employee"
}

task getEngineeringEmployees(type: com.marklogic.gradle.task.ServerEvalTask) {
description = "Using a ServerEvalTask to evaluate a JS script on the server in order to test the Engineering QBV."
javascript = "const op = require('/MarkLogic/optic'); op.fromView('HR', 'Engineering').result();"
}

task getSalesEmployees(type: com.marklogic.gradle.task.ServerEvalTask) {
description = "Using a ServerEvalTask to evaluate an XQuery script on the server in order to test the Sales QBV."
xquery = 'xquery version "1.0-ml"; import module namespace op="http://marklogic.com/optic" at "/MarkLogic/optic.xqy"; op:from-view("HR", "Sales") => op:result()'
}
3 changes: 3 additions & 0 deletions examples/qbv-example/data/employees.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ID,FirstName,LastName,Department
1,John,Doe,Sales
2,Sally,Smith,Engineering
5 changes: 5 additions & 0 deletions examples/qbv-example/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mlHost=localhost
mlAppName=qbv-project
mlRestPort=8150
mlUsername=admin
mlPassword=admin
21 changes: 21 additions & 0 deletions examples/qbv-example/lib/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<configuration>

<statusListener class="ch.qos.logback.core.status.NopStatusListener" />

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<root level="INFO">
<appender-ref ref="STDOUT" />
</root>

<logger name="com.marklogic" level="INFO" additivity="false">
<appender-ref ref="STDOUT" />
</logger>

</configuration>


Loading

0 comments on commit 57b7f2c

Please sign in to comment.