Skip to content

Commit 1a7faa9

Browse files
committed
#420 Renamed mlRestApi to mlBundle
1 parent 6eacdd8 commit 1a7faa9

File tree

11 files changed

+41
-30
lines changed

11 files changed

+41
-30
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Now deploy it!
5454
And you should see more ml-gradle logging like this:
5555

5656
:mlDeleteModuleTimestampsFile
57-
:mlPrepareRestApiDependencies
57+
:mlPrepareBundles
5858
:mlDeployApp
5959
:mlPostDeploy UP-TO-DATE
6060
:mlDeploy

examples/dependency-project/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ You'll see logging like this that lets you know that the modules and data from t
2626
will be included when the application is deployed:
2727

2828
```
29-
Found mlRestApi configuration, will extract all of its dependencies to build/mlRestApi
29+
Found mlBundle configuration, will extract all of its dependencies to build/mlBundle
3030
Extracting file: /Users/rrudin/.m2/repository/com/marklogic/example-dependency/1.0.0/example-dependency-1.0.0.jar
31-
[unzip] Expanding: /Users/rrudin/.m2/repository/com/marklogic/example-dependency/1.0.0/example-dependency-1.0.0.jar into /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlRestApi
32-
Finished extracting mlRestApi dependencies
33-
Module paths: [/Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlRestApi/example-dependency/ml-modules, /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/src/main/ml-modules]
34-
Data paths: [/Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlRestApi/example-dependency/ml-data, /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/src/main/ml-data]
35-
:mlPrepareRestApiDependencies (Thread[Task worker for ':' Thread 4,5,main]) completed. Took 0.165 secs.
31+
[unzip] Expanding: /Users/rrudin/.m2/repository/com/marklogic/example-dependency/1.0.0/example-dependency-1.0.0.jar into /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlBundle
32+
Finished extracting mlBundle dependencies
33+
Module paths: [/Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlBundle/example-dependency/ml-modules, /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/src/main/ml-modules]
34+
Data paths: [/Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlBundle/example-dependency/ml-data, /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/src/main/ml-data]
35+
:mlPrepareBundles (Thread[Task worker for ':' Thread 4,5,main]) completed. Took 0.165 secs.
3636
```
3737

3838
And you'll see logging like this that indicates that the example-dependency modules were loaded:
3939

4040
```
4141
Executing command [com.marklogic.appdeployer.command.modules.LoadModulesCommand] with sort order [400]
4242
Initializing new instance of ModulesLoader
43-
Loading asset modules from dir: /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlRestApi/example-dependency/ml-modules
43+
Loading asset modules from dir: /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlBundle/example-dependency/ml-modules
4444
Writing 1 files
4545
Writing: /example.sjs
4646
Writing 1 documents to MarkLogic; port: 8000; database: ml-gradle-client-modules

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ repositories {
2222
}
2323

2424
dependencies {
25-
mlRestApi "com.marklogic:example-dependency:1.0.0"
25+
mlBundle "com.marklogic:example-dependency:1.0.0"
2626
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ repositories {
1919
}
2020

2121
dependencies {
22-
mlRestApi "com.marklogic:example-dependency:1.0.0"
22+
mlBundle "com.marklogic:example-dependency:1.0.0"
2323
}

examples/sample-project/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ ext {
9292
// You can have multiple config files for your content database. This is useful when you have a dependency on
9393
// a package of MarkLogic modules that requires some content database config, and you don't want to duplicate
9494
// that in your own content-database.json file. Instead, just add the file from your
95-
// build/mlRestApi/(name of dependency)/ml-config/databases directory.
95+
// build/mlBundle/(name of dependency)/ml-config/databases directory.
9696
configDir.contentDatabaseFiles.add(new File("src/main/ml-config/databases/more-content-database-config.json"))
9797

9898
// XCC URL for running corb task below and for creating triggers on pre-8.0-4 builds of MarkLogic

examples/unit-test-project/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ include this by default (not every ml-gradle user will use marklogic-unit-test),
1616
}
1717
}
1818

19-
Next, the marklogic-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 "mlBundle" dependency (the "mlBundle" 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:marklogic-unit-test-modules:0.12.0"
27+
mlBundle "com.marklogic:marklogic-unit-test-modules:0.12.0"
2828
}
2929

3030
## Running unit tests

examples/unit-test-project/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repositories {
1717
}
1818

1919
dependencies {
20-
mlRestApi "com.marklogic:marklogic-unit-test-modules:${marklogicUnitTestVersion}"
20+
mlBundle "com.marklogic:marklogic-unit-test-modules:${marklogicUnitTestVersion}"
2121

2222
// For running marklogic-unit-test tests via JUnit
2323
testCompile "com.marklogic:marklogic-unit-test-client:${marklogicUnitTestVersion}"

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ class MarkLogicPlugin implements Plugin<Project> {
8888

8989
copyGradlePropertiesToCustomTokensIfRequested(project)
9090

91+
project.getConfigurations().create("mlBundle")
92+
// Per #420, this is deprecated, but still need to create it
9193
project.getConfigurations().create("mlRestApi")
9294

9395
// No group or description on these so they don't show up in "gradle tasks"
94-
project.task("mlDeployApp", type: DeployAppTask, dependsOn: ["mlDeleteModuleTimestampsFile", "mlPrepareRestApiDependencies"])
96+
project.task("mlDeployApp", type: DeployAppTask, dependsOn: ["mlDeleteModuleTimestampsFile", "mlPrepareBundles"])
9597
project.task("mlUndeployApp", type: UndeployAppTask)
9698

9799
String deployGroup = "ml-gradle Deploy"
@@ -130,7 +132,7 @@ class MarkLogicPlugin implements Plugin<Project> {
130132
project.task("mlRestartCluster", type: RestartClusterTask, group: clusterGroup, description: "Restart the local cluster")
131133

132134
String dataGroup = "ml-gradle Data"
133-
project.task("mlLoadData", type: LoadDataTask, group: dataGroup, dependsOn: "mlPrepareRestApiDependencies",
135+
project.task("mlLoadData", type: LoadDataTask, group: dataGroup, dependsOn: "mlPrepareBundles",
134136
description: "Load files as documents into a content database (or on a DHF project, the final database)")
135137

136138
String dbGroup = "ml-gradle Database"
@@ -141,7 +143,7 @@ class MarkLogicPlugin implements Plugin<Project> {
141143
"Note that this includes those created via the deployment of resources such as temporal collections and view schemas. You may want to use mlDeleteUserSchemas instead.")
142144
project.task("mlClearTriggersDatabase", type: ClearTriggersDatabaseTask, group: dbGroup, description: "Deletes all documents in the triggers database")
143145
project.task("mlDeleteDatabase", type: DeleteDatabaseTask, group: dbGroup, description: "Delete a database along with all of its forests and any replicas; requires -Pconfirm=true to be set so this isn't accidentally executed")
144-
project.task("mlDeployDatabases", type: DeployDatabasesTask, group: dbGroup, dependsOn: "mlPrepareRestApiDependencies", description: "Deploy each database, updating it if it exists, in the configuration directory")
146+
project.task("mlDeployDatabases", type: DeployDatabasesTask, group: dbGroup, dependsOn: "mlPrepareBundles", description: "Deploy each database, updating it if it exists, in the configuration directory")
145147
project.task("mlMergeContentDatabase", type: MergeContentDatabaseTask, group: dbGroup, description: "Merge the database named by mlAppConfig.contentDatabaseName")
146148
project.task("mlMergeDatabase", type: MergeDatabaseTask, group: dbGroup, description: "Merge the database named by the project property dbName; e.g. gradle mlMergeDatabase -PdbName=my-database")
147149
project.task("mlReindexContentDatabase", type: ReindexContentDatabaseTask, group: dbGroup, description: "Reindex the database named by mlAppConfig.contentDatabaseName")
@@ -168,7 +170,8 @@ class MarkLogicPlugin implements Plugin<Project> {
168170
project.task("mlCreateResource", type: CreateResourceTask, group: devGroup, description: "Create a new resource extension in the modules services directory; use -PresourceName and -PresourceType to set the resource name and type (either xqy or sjs)")
169171
project.task("mlCreateTransform", type: CreateTransformTask, group: devGroup, description: "Create a new transform in the modules transforms directory; use -PtransformName and -PtransformType to set the transform name and type (xqy, xsl, or sjs)")
170172
project.task("mlExportResources", type: ExportResourcesTask, group: devGroup, description: "Export resources based on a properties file specified via -PpropertiesFile, -Pprefix, or -Pregex; use -PincludeTypes to select resource types to export via a comma-delimited string; use -PexportPath to specify where to export resources to")
171-
project.task("mlPrepareRestApiDependencies", type: PrepareRestApiDependenciesTask, group: devGroup, dependsOn: project.configurations["mlRestApi"], description: "Downloads (if necessary) and unzips in the build directory all mlRestApi dependencies")
173+
project.task("mlPrepareBundles", type: PrepareBundlesTask, group: devGroup, dependsOn: project.configurations["mlBundle"], description: "Downloads (if necessary) and unzips in the build directory all mlBundle dependencies")
174+
project.task("mlPrepareRestApiDependencies", type: PrepareBundlesTask, group: devGroup, dependsOn: project.configurations["mlBundle"], description: "Deprecated in 3.13.0; please use mlPrepareBundles instead")
172175
project.task("mlPrintCommands", type: PrintCommandsTask, group: devGroup, description: "Print information about each command used by mlDeploy and mlUndeploy")
173176
project.task("mlPrintProperties", type: PrintPropertiesTask, group: devGroup, description: "Print all of the properties supported by ml-gradle")
174177
project.task("mlPrintTokens", type: PrintTokensTask, group: devGroup, description: "Print the customTokens map on the mlAppConfig object (typically for debugging purposes)")
@@ -214,7 +217,7 @@ class MarkLogicPlugin implements Plugin<Project> {
214217
project.task("mlUndeployMimetypes", type: UndeployMimetypesTask, group: mimetypesGroup, description: "Undeploy each mimetype defined in the configuration directory")
215218

216219
String modulesGroup = "ml-gradle Modules"
217-
project.task("mlLoadModules", type: LoadModulesTask, group: modulesGroup, dependsOn: "mlPrepareRestApiDependencies", description: "Loads modules from directories defined by mlAppConfig or via a property on this task").mustRunAfter(["mlClearModulesDatabase"])
220+
project.task("mlLoadModules", type: LoadModulesTask, group: modulesGroup, dependsOn: "mlPrepareBundles", description: "Loads modules from directories defined by mlAppConfig or via a property on this task").mustRunAfter(["mlClearModulesDatabase"])
218221
project.task("mlReloadModules", group: modulesGroup, dependsOn: ["mlClearModulesDatabase", "mlLoadModules"], description: "Reloads modules by first clearing the modules database and then loading modules")
219222
project.task("mlWatch", type: WatchTask, group: modulesGroup, description: "Run a loop that checks for new/modified modules every second and loads any that it finds. To ignore files that are already dirty and only process new changes, include -PignoreDirty=true . ")
220223
project.task("mlDeleteModuleTimestampsFile", type: DeleteModuleTimestampsFileTask, group: modulesGroup, description: "Delete the properties file in the build directory that keeps track of when each module was last loaded")
@@ -235,7 +238,7 @@ class MarkLogicPlugin implements Plugin<Project> {
235238
project.task("mlReloadSchemas", dependsOn: ["mlDeleteUserSchemas", "mlLoadSchemas"], group: schemasGroup, description: "Deletes user schemas via mlDeleteUserSchemas and then loads schemas via mlLoadSchemas")
236239

237240
String serverGroup = "ml-gradle Server"
238-
project.task("mlDeployServers", type: DeployServersTask, group: serverGroup, dependsOn: "mlPrepareRestApiDependencies", description: "Updates the REST API server (if it exists) and deploys each other server, updating it if it exists, in the configuration directory ")
241+
project.task("mlDeployServers", type: DeployServersTask, group: serverGroup, dependsOn: "mlPrepareBundles", description: "Updates the REST API server (if it exists) and deploys each other server, updating it if it exists, in the configuration directory ")
239242
project.task("mlUndeployOtherServers", type: UndeployOtherServersTask, group: serverGroup, description: "Delete any non-REST API servers (e.g. ODBC and XBC servers) defined by server files in the configuration directory")
240243

241244
String securityGroup = "ml-gradle Security"

src/main/groovy/com/marklogic/gradle/task/client/CreateResourceTask.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ declare function delete(
9494
if (!servicesPath) {
9595
List<String> modulePaths = getAppConfig().getModulePaths()
9696
if (modulePaths != null && !modulePaths.isEmpty()) {
97-
// Use the last path so modules aren't written to e.g. mlRestApi paths
97+
// Use the last path so modules aren't written to e.g. mlBundle paths
9898
servicesPath = modulePaths.get(modulePaths.size() - 1) + "/services"
9999
}
100100
}

src/main/groovy/com/marklogic/gradle/task/client/CreateTransformTask.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ exports.transform = transform;
5656
if (!transformsPath) {
5757
List<String> modulePaths = getAppConfig().getModulePaths()
5858
if (modulePaths != null && !modulePaths.isEmpty()) {
59-
// Use the last path so modules aren't written to e.g. mlRestApi paths
59+
// Use the last path so modules aren't written to e.g. mlBundle paths
6060
transformsPath = modulePaths.get(modulePaths.size() - 1) + "/transforms"
6161
}
6262
}

0 commit comments

Comments
 (0)