Skip to content

Commit 55aa1de

Browse files
committed
#454 Better example in provider project
1 parent 5118004 commit 55aa1de

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

examples/dependency-project/dhf-client-project/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77
}
88
dependencies {
9-
classpath "gradle.plugin.com.marklogic:ml-gradle:3.13.0"
9+
classpath "gradle.plugin.com.marklogic:ml-gradle:3.14.0"
1010
classpath "gradle.plugin.com.marklogic:ml-data-hub:4.2.2"
1111
}
1212
}

examples/dependency-project/ml-gradle-client-project/src/main/ml-config/databases/content-database.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"schema-database": "%%SCHEMAS_DATABASE%%",
44
"range-element-index": [
55
{
6-
"collation": "",
6+
"collation": "http://marklogic.com/collation/",
77
"invalid-values": "reject",
8-
"localname": "amount",
8+
"localname": "applicationSpecificId",
99
"namespace-uri": "",
1010
"range-value-positions": false,
11-
"scalar-type": "double"
11+
"scalar-type": "string"
1212
}
1313
]
1414
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This example shows how a bundle provider can contribute a range index to an application-specific database. The token
2+
"%%DATABASE%%" is used, which will be populated by ml-gradle by the main content database name (on a Data Hub project,
3+
this will be the name of the final database). The file could reference any property though - e.g. a provider may wish
4+
to require a property such as "acmeDatabaseName", and the client of the provider would need to set that property e.g.
5+
in gradle.properties so that it's correctly replaced at deployment time.

examples/dependency-project/provider-project/src/main/ml-config/databases/provider-database.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"database-name": "%%DATABASE%%",
33
"range-element-index": [
44
{
5-
"collation": "http://marklogic.com/collation/",
5+
"collation": "",
66
"invalid-values": "reject",
7-
"localname": "providerId",
7+
"localname": "amount",
88
"namespace-uri": "",
99
"range-value-positions": false,
10-
"scalar-type": "string"
10+
"scalar-type": "double"
1111
}
1212
]
1313
}

0 commit comments

Comments
 (0)