- Run the hubGenerateTDETemplates command
./gradlew hubGenerateTDETemplates
- Run the mlLoadFinalSchemas command
./gradlew mlLoadFinalSchemas
buildscript { | |
repositories { | |
maven {url 'http://developer.marklogic.com/maven2/'} | |
} | |
} | |
plugins { | |
id 'java' | |
id 'net.saliman.properties' version '1.4.6' | |
id 'com.marklogic.ml-data-hub' version '4.0.3' | |
} | |
repositories { | |
jcenter() | |
maven {url 'http://developer.marklogic.com/maven2/'} | |
} | |
dependencies { | |
// this allows you to write custom java code that depends | |
// on the Data Hub Framework library | |
compile 'com.marklogic:marklogic-data-hub:4.0.3' | |
compile 'com.marklogic:marklogic-xcc:9.0.4' | |
} | |
hubGenerateTDETemplates.doLast { | |
copy { | |
from "$hubConfig.stagingAppConfig.schemasPath/tde" | |
into "$hubConfig.finalAppConfig.schemasPath/tde" | |
exclude "*-GENERATED*" | |
} | |
} | |
class LoadFinalSchemasTask extends com.marklogic.gradle.task.HubTask { | |
@org.gradle.api.tasks.TaskAction | |
void loadSchemas() { | |
def cc = new com.marklogic.appdeployer.command.CommandContext(hubConfig.finalAppConfig,null,null) | |
def command = new com.marklogic.appdeployer.command.schemas.LoadSchemasCommand() | |
command.execute(cc) | |
} | |
} | |
task mlLoadFinalSchemas(type:LoadFinalSchemasTask) |