File tree Expand file tree Collapse file tree 8 files changed +77
-1
lines changed
ml-development-tools/src/test/example-project
ml-modules/root/inventory Expand file tree Collapse file tree 8 files changed +77
-1
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,13 @@ Individual tests can be run in the following manner (replace `GraphsTest` with t
41
41
42
42
./gradlew marklogic-client-api:test --tests GraphsTest
43
43
44
- Tests for the ml-development-tools Gradle plugin can be run via:
44
+ Tests for the ` ml-development-tools ` Gradle plugin can be run via:
45
45
46
46
./gradlew ml-development-tools:test
47
47
48
48
You can also undeploy the test application if you do not wish to keep it around on your MarkLogic instance:
49
49
50
50
./gradlew mlUndeploy -i -Pconfirm=true
51
+
52
+ To test the ` ml-development-tools ` Gradle plugin, see the README.md file located at
53
+ ` ml-development-tools/src/test/example-project ` .
Original file line number Diff line number Diff line change
1
+ This is a simple project for testing out the ml-development-tools Gradle plugin.
2
+
3
+ To try this out, first run ` ./gradlew publishToMavenLocal ` from the root directory of your clone of this
4
+ repository. Then update the ` build.gradle ` file in this directory to reference the version number of the
5
+ plugin you published. You can then try each of the tasks in the ` build.gradle ` file to verify that Data Services
6
+ Java classes are generated correctly.
Original file line number Diff line number Diff line change
1
+ buildscript {
2
+ repositories {
3
+ mavenLocal()
4
+ mavenCentral()
5
+ }
6
+ dependencies {
7
+ classpath " com.marklogic:ml-development-tools:6.3-SNAPSHOT"
8
+ }
9
+ }
10
+
11
+ plugins {
12
+ id ' java'
13
+ }
14
+
15
+ apply plugin : " com.marklogic.ml-development-tools"
16
+
17
+
18
+ group ' org.example'
19
+ version ' 1.0-SNAPSHOT'
20
+
21
+ repositories {
22
+ mavenCentral()
23
+ }
24
+
25
+ dependencies {
26
+ implementation ' com.marklogic:marklogic-client-api:6.3-SNAPSHOT'
27
+ }
28
+
29
+ task testFullPath (type : com.marklogic.client.tools.gradle.EndpointProxiesGenTask ) {
30
+ serviceDeclarationFile = " /Users/rrudin/workspace/java-client-api/example-project/src/main/ml-modules/root/inventory/service.json"
31
+ }
32
+
33
+ task testProjectPath (type : com.marklogic.client.tools.gradle.EndpointProxiesGenTask ) {
34
+ serviceDeclarationFile = " src/main/ml-modules/root/inventory/service.json"
35
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "functionName": "lookup",
3
+ "params": [
4
+ {
5
+ "name": "productCode",
6
+ "datatype": "string"
7
+ },
8
+ {
9
+ "name": "customerId",
10
+ "datatype": "unsignedLong"
11
+ }
12
+ ],
13
+ "return": {
14
+ "datatype": "jsonDocument"
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+ // declareUpdate(); // Note: uncomment if changing the database state
3
+
4
+ var productCode ; // instanceof xs.string
5
+ var customerId ; // instanceof xs.unsignedLong
6
+
7
+ // Doesn't matter what happens next, this file just needs to exist so that
8
+ // Data Services Java classes can be generated from it.
Original file line number Diff line number Diff line change
1
+ {
2
+ "endpointDirectory" : " /inventory/" ,
3
+ "$javaClass" : " org.example.inventory.DynamicPricer"
4
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "endpointDirectory" : " /inventory/" ,
3
+ "$javaClass" : " org.example.inventory.DynamicPricer"
4
+ }
You can’t perform that action at this time.
0 commit comments