Skip to content

Commit bd81be2

Browse files
committed
Merge branch 'dev'
2 parents e685507 + 4315647 commit bd81be2

File tree

13 files changed

+65
-45
lines changed

13 files changed

+65
-45
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ First, [install Gradle](https://gradle.org/install/).
2424

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

27-
plugins { id "com.marklogic.ml-gradle" version "3.9.0" }
27+
plugins { id "com.marklogic.ml-gradle" version "3.10.0" }
2828

2929
Then run:
3030

build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ targetCompatibility = "1.8"
1515
repositories {
1616
mavenLocal() // Used for local development only
1717
jcenter()
18-
19-
// Needed until ml-unit-test is available via jcenter()
20-
maven {
21-
url {"https://dl.bintray.com/rjrudin/maven/"}
22-
}
2318
}
2419

2520
dependencies {

examples/corb2-project/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ buildscript {
1818
}
1919
dependencies {
2020
//Needed for CorbTask to dynamicaly generate properties from CORB Options class
21-
classpath 'com.marklogic:marklogic-corb:2.3.2'
21+
classpath 'com.marklogic:marklogic-corb:2.4.1'
2222
}
2323
}
2424

2525
plugins {
26-
id "com.marklogic.ml-gradle" version "3.6.0"
26+
id "com.marklogic.ml-gradle" version "3.9.0"
2727
}
2828

2929
repositories {
@@ -42,7 +42,7 @@ configurations {
4242

4343
dependencies {
4444
// required to run CoRB2
45-
corb 'com.marklogic:marklogic-corb:2.3.2'
45+
corb 'com.marklogic:marklogic-corb:2.4.1'
4646
// optional
4747
//corb 'org.jasypt:jasypt:1.9.2' // would be necessary to leverage JasyptDecrypter
4848
}
@@ -97,7 +97,7 @@ task corb(type: com.marklogic.gradle.task.CorbTask) {
9797
* the transform.xqy module to perform any action that you would like - this is just to show how to invoke corb from Gradle.
9898
*/
9999
task corbAdhoc(type: com.marklogic.gradle.task.CorbTask) {
100-
xccConnectionUri = contentXccUrl
100+
xccConnectionUri = contentXccUrl
101101
urisModule = "src/main/ml-modules/ext/corb2-project/corb/uris.xqy|ADHOC"
102102
processModule = "src/main/ml-modules/ext/corb2-project/corb/transform.xqy|ADHOC"
103103
}

examples/local-testing-project/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ that you've published to your local Maven repository.
44
To publish an instance of ml-gradle locally, just do the following:
55

66
1. From the ml-gradle root directory, run "publish -Pversion=DEV publishToMavenLocal" (you can pick any version name that you want)
7-
1. Verify manually that the library was published to ~/.m2/com/marklogic/ml-gradle
7+
1. Verify manually that the library was published to ~/.m2/repository/com/marklogic/ml-gradle
88

99
You should then be able to run "gradle tasks" on this project, and that will use your
1010
locally published copy of ml-gradle. Again, feel free to change the version name to whatever
1111
you want, there's no requirement to use "DEV".
1212

13-
Note that the "src" directory is gitignore'd in this project so that you can add any artifacts you want.
14-
13+
Note that the "src" directory is gitignore'd in this project so that you can add any artifacts you want.

examples/sample-project/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
jcenter()
99
}
1010
dependencies {
11-
classpath "com.marklogic:ml-gradle:3.8.0"
11+
classpath "com.marklogic:ml-gradle:3.10.0"
1212
}
1313
}
1414

examples/unit-test-project/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
This project shows an example of using the ml-unit-test framework to run server-side tests within MarkLogic.
1+
This project shows an example of using the marklogic-unit-test framework to run server-side tests within MarkLogic.
22

3-
## Enabling ml-unit-test in an ml-gradle project
3+
## Enabling marklogic-unit-test in an ml-gradle project
44

5-
Using ml-unit-test requires two additions to the build.gradle file, as described below.
5+
Using marklogic-unit-test requires two additions to the build.gradle file, as described below.
66

7-
First, ml-gradle includes an "mlUnitTest" task, which depends on the ml-unit-test-client JAR file. ml-gradle does not
8-
include this by default (not every ml-gradle user will use ml-unit-test), so it must be added to the buildscript:
7+
First, ml-gradle includes an "mlUnitTest" task, which depends on the marklogic-unit-test-client JAR file. ml-gradle does not
8+
include this by default (not every ml-gradle user will use marklogic-unit-test), so it must be added to the buildscript:
99

1010
buildscript {
1111
repositories {
1212
jcenter()
1313
}
1414
dependencies {
15-
classpath "com.marklogic:ml-unit-test-client:0.11.1"
15+
classpath "com.marklogic:marklogic-unit-test-client:0.12.0"
1616
}
1717
}
1818

19-
Next, the ml-unit-test framework is depended on and installed as an "mlRestApi" dependency (the "mlRestApi" configuration
19+
Next, the marklogic-unit-test framework is depended on and installed as an "mlRestApi" dependency (the "mlRestApi" configuration
2020
is a feature of ml-gradle for depending on packages of MarkLogic modules):
2121

2222
repositories {
2323
jcenter()
2424
}
2525
2626
dependencies {
27-
mlRestApi "com.marklogic:ml-unit-test-modules:0.11.1"
27+
mlRestApi "com.marklogic:marklogic-unit-test-modules:0.12.0"
2828
}
2929

3030
## Running unit tests
@@ -36,7 +36,7 @@ First, deploy the application:
3636

3737
gradle mlDeploy
3838

39-
This will deploy the application along with the ml-unit-test modules.
39+
This will deploy the application along with the marklogic-unit-test modules.
4040

4141
Then, run the tests:
4242

@@ -45,17 +45,17 @@ Then, run the tests:
4545
Two tests are run, and one should fail, so you can see what a failed test looks like.
4646

4747
This project includes the Gradle Java plugin, which allows you to run tests under src/test/java. This project includes
48-
an example of a JUnit Parameterized test that invokes each ml-unit-test module separately - you can try it like this:
48+
an example of a JUnit Parameterized test that invokes each marklogic-unit-test module separately - you can try it like this:
4949

5050
gradle test
5151

5252
Again, two tests will run, and one will intentionally fail. The Parameterized test can be run in an IDE as well, allowing
5353
you to take advantage of your IDE's support for JUnit tests.
5454

55-
You can also access the ml-unit-test REST endpoints directly:
55+
You can also access the marklogic-unit-test REST endpoints directly:
5656

57-
- List the tests - http://localhost:8135/v1/resources/ml-unit-test
58-
- Run a test suite - http://localhost:8135/v1/resources/ml-unit-test?rs:func=run&rs:suite=My%20Tests
57+
- List the tests - http://localhost:8135/v1/resources/marklogic-unit-test
58+
- Run a test suite - http://localhost:8135/v1/resources/marklogic-unit-test?rs:func=run&rs:suite=My%20Tests
5959

6060
And you can run the original UI test runner by going to:
6161

examples/unit-test-project/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
buildscript {
22
repositories {
33
jcenter()
4+
mavenLocal()
45
}
56
dependencies {
6-
classpath "com.marklogic:ml-unit-test-client:${mlUnitTestVersion}"
7+
classpath "com.marklogic:marklogic-unit-test-client:${marklogicUnitTestVersion}"
78
classpath "com.marklogic:ml-gradle:${mlGradleVersion}"
89
}
910
}
@@ -16,9 +17,9 @@ repositories {
1617
}
1718

1819
dependencies {
19-
mlRestApi "com.marklogic:ml-unit-test-modules:${mlUnitTestVersion}"
20+
mlRestApi "com.marklogic:marklogic-unit-test-modules:${marklogicUnitTestVersion}"
2021

21-
// For running ml-unit-test tests via JUnit
22-
testCompile "com.marklogic:ml-unit-test-client:${mlUnitTestVersion}"
22+
// For running marklogic-unit-test tests via JUnit
23+
testCompile "com.marklogic:marklogic-unit-test-client:${marklogicUnitTestVersion}"
2324
testCompile "junit:junit:4.12"
2425
}

examples/unit-test-project/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
mlGradleVersion=3.7.1
2-
mlUnitTestVersion=0.11.1
1+
mlGradleVersion=3.10.0
2+
marklogicUnitTestVersion=0.12.0
33

44
mlHost=localhost
55
mlAppName=unit-test-example

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
group=com.marklogic
2-
version=3.9.0
2+
version=3.10.0
33
javadocsDir=../gh-pages-marklogic-java/javadocs
44

5-
mlAppDeployerDependency=com.marklogic:ml-app-deployer:3.9.0
5+
mlAppDeployerDependency=com.marklogic:ml-app-deployer:3.10.0
66
mlcpUtilDependency=com.marklogic:mlcp-util:0.9.0
77
mlDataMovementDependency=com.marklogic:marklogic-data-movement-components:1.1
8-
mlUnitTestDependency=com.marklogic:ml-unit-test-client:0.11.1
8+
mlUnitTestDependency=com.marklogic:marklogic-unit-test-client:0.12.0

src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ class MarkLogicPlugin implements Plugin<Project> {
9797
project.task("mlPostDeploy", group: deployGroup, description: "Add dependsOn to this task to add tasks at the end of mlDeploy").mustRunAfter(["mlDeployApp"])
9898
project.task("mlPostUndeploy", group: deployGroup, description: "Add dependsOn to this task to add tasks at the end of mlUndeploy").mustRunAfter(["mlUndeployApp"])
9999
project.task("mlDeploy", group: deployGroup, dependsOn: ["mlDeployApp", "mlPostDeploy"],
100-
description: "Deploys all application resources in the configuration directory and allows for additional steps via mlPostDeploy.dependsOn. Use -Pignore to specify a comma-delimited list of short class names of ml-app-deployer command classes to ignore while deploying.").mustRunAfter("mlClearModulesDatabase")
101-
project.task("mlUndeploy", group: deployGroup, dependsOn: ["mlUndeployApp", "mlPostUndeploy"], description: "Undeploys all application resources in the configuration directory and allows for additional steps via mlPostUndeploy.dependsOn; requires -Pconfirm=true to be set so this isn't accidentally executed")
102-
project.task("mlRedeploy", group: deployGroup, dependsOn: ["mlClearModulesDatabase", "mlDeploy"], description: "Clears the modules database and then deploys the application")
100+
description: "Deploys all application resources in the configuration directory and allows for additional steps via mlPostDeploy.dependsOn. Use -Pignore to specify a comma-delimited list of short class names of ml-app-deployer command classes to ignore while deploying.")
101+
.mustRunAfter("mlClearModulesDatabase", "mlDeleteResourceTimestampsFile")
102+
project.task("mlUndeploy", group: deployGroup, dependsOn: ["mlUndeployApp", "mlPostUndeploy", "mlDeleteResourceTimestampsFile"], description: "Undeploys all application resources in the configuration directory and allows for additional steps via mlPostUndeploy.dependsOn; requires -Pconfirm=true to be set so this isn't accidentally executed")
103+
project.task("mlRedeploy", group: deployGroup, dependsOn: ["mlClearModulesDatabase", "mlDeploy", "mlDeleteResourceTimestampsFile"], description: "Clears the modules database and then deploys the application")
104+
project.task("mlDeleteResourceTimestampsFile", type: DeleteResourceTimestampsFileTask, group: deployGroup, description: "Delete the properties file in the build directory (stored there by default) that keeps track of when each resource was last deployed; the file path can be overridden by setting the filePath property of this class")
103105

104106
String adminGroup = "ml-gradle Admin"
105107
project.task("mlInit", type: InitTask, group: adminGroup, description: "Perform a one-time initialization of a MarkLogic server; uses the properties 'mlLicenseKey' and 'mlLicensee'")

0 commit comments

Comments
 (0)