Skip to content

Commit 9c46534

Browse files
authored
Merge pull request #647 from marklogic-community/feature/update-example-projects
Updating example projects
2 parents 757e78c + 3d8f69c commit 9c46534

File tree

51 files changed

+105
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+105
-427
lines changed

examples/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
This directory contains example ml-gradle projects to demonstrate various features and common
2+
deployment scenarios.
3+
4+
To try a particular project, clone this repository, `cd` to the directory of the project you wish to try,
5+
and do the following:
6+
7+
1. Most of the projects default to a username and password of "admin". You can change this either by modifying the
8+
`mlPassword` property in the `gradle.properties` file in the project, or - if the project is using the [Gradle
9+
properties plugin](https://plugins.gradle.org/plugin/net.saliman.properties) - you can create the file
10+
`gradle-local.properties` and set both `mlUsername` and `mlPassword` in that file.
11+
2. If the project has any ports defined in `gradle.properties`, verify that those ports are open and available on the
12+
machine that is running MarkLogic.
13+
3. Most projects have the [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) setup, in
14+
which case you can deploy the project to your MarkLogic instance via `./gradlew -i mlDeploy`. If the project does
15+
not have the Gradle wrapper (you can tell by checking for a "gradlew" file in the project directory), then you'll
16+
need to have [Gradle installed](https://gradle.org/install/). After installing Gradle, you can run `./gradle -i
17+
mldeploy`.
18+
19+
After you've deployed and examined/tested the application, you can undeploy it via:
20+
21+
./gradlew -i -Pconfirm=true mlUndeploy
22+
23+
Please note that these example projects are not re-tested with every ml-gradle release. If you run into a problem with
24+
any of them, please file an [issue with ml-gradle](https://github.com/marklogic-community/ml-gradle/wiki).
25+

examples/corb2-project/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ buildscript {
2121
}
2222

2323
plugins {
24-
id "com.marklogic.ml-gradle" version "4.1.0"
24+
id "com.marklogic.ml-gradle" version "4.4.0"
2525
}
2626

2727
repositories {

examples/custom-rest-rewriter-project/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "com.marklogic.ml-gradle" version "3.9.0"
2+
id "com.marklogic.ml-gradle" version "4.4.0"
33
}
44

55
task generateCustomRewriterModules {

examples/data-services/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id "java"
33
id "net.saliman.properties" version "1.5.1"
44
id "com.marklogic.ml-gradle" version "4.4.0"
5-
id 'com.marklogic.ml-development-tools' version '5.5.0'
5+
id 'com.marklogic.ml-development-tools' version '6.0.0'
66
}
77

88
task generateHelloWorld(type: com.marklogic.client.tools.gradle.EndpointProxiesGenTask) {
@@ -20,12 +20,12 @@ test {
2020

2121
dependencies {
2222
implementation 'org.slf4j:slf4j-api:1.7.31'
23-
implementation 'com.marklogic:marklogic-client-api:5.5.0'
23+
implementation 'com.marklogic:marklogic-client-api:6.0.0'
2424

25-
testImplementation "org.junit.jupiter:junit-jupiter:5.7.2"
25+
testImplementation "org.junit.jupiter:junit-jupiter:5.9.1"
2626

2727
// Force usage of logback for logging
28-
testImplementation "ch.qos.logback:logback-classic:1.2.4"
29-
testImplementation "org.slf4j:jcl-over-slf4j:1.7.31"
30-
testImplementation "org.slf4j:slf4j-api:1.7.31"
28+
testImplementation "ch.qos.logback:logback-classic:1.3.5"
29+
testImplementation "org.slf4j:jcl-over-slf4j:1.7.36"
30+
testImplementation "org.slf4j:slf4j-api:1.7.36"
3131
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildscript {
1111
}
1212

1313
plugins {
14-
id 'net.saliman.properties' version '1.4.6'
14+
id 'net.saliman.properties' version '1.5.1'
1515
}
1616

1717
apply plugin: "com.marklogic.ml-data-hub"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
plugins {
1212
id "net.saliman.properties" version "1.5.1"
13-
id "com.marklogic.ml-gradle" version "4.2.0"
13+
id "com.marklogic.ml-gradle" version "4.4.0"
1414
}
1515

1616
//apply plugin: "com.marklogic.ml-gradle"

examples/disconnected-project-using-plugins-and-gradlew/build.gradle

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ buildscript {
77
} else {
88
println "Using online buildscript dependency repositories"
99
mavenCentral()
10-
maven { url "http://developer.marklogic.com/maven2/" }
1110
}
1211
}
1312
}
@@ -26,7 +25,6 @@ repositories {
2625
} else {
2726
println "Using online dependency repositories"
2827
mavenCentral()
29-
maven { url "http://developer.marklogic.com/maven2/" }
3028
}
3129
}
3230

@@ -35,9 +33,6 @@ configurations {
3533
}
3634

3735
dependencies {
38-
// sample java compile dependency. Remove if not required
39-
compile 'com.marklogic:marklogic-xcc:10.0.7'
40-
4136
//sample mlcp dependency. Remove if not required
4237
mlcp "com.marklogic:mlcp:10.0.6.2"
4338
}
@@ -60,9 +55,8 @@ task downloadToProjectMavenRepo(type: Copy) {
6055
/*
6156
* Include any configuration dependencies here that you want to copy the dependencies for.
6257
* These are defined in the 'dependencies' block. E.g. you need to include
63-
* configurations.compile.files if you want your java 'compile' dependencies downloaded
58+
* configurations.implementation.files if you want your java 'implementation' dependencies downloaded
6459
*/
65-
configurations.compile.files //includes 'java' compile dependencies. Remove if not needed
6660
configurations.mlcp.files //includes 'mlcp' dependencies. Remove if not needed
6761

6862
from new File(gradle.gradleUserHomeDir, 'caches/modules-2/files-2.1') // correct as of gradle 4.7
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
mlUsername=admin
2+
mlPassword=admin
3+
14
projectMavenRepo=build/offline/maven-repo
25
# if you change this, you need to modify gradlew and gradlew.bat also
3-
projectGradleHome=build/gradle-home
6+
projectGradleHome=build/gradle-home

examples/disconnected-project/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mlGradleDependency=com.marklogic:ml-gradle:3.6.0
1+
mlGradleDependency=com.marklogic:ml-gradle:4.4.0
22
mlSalimanDependency=net.saliman:gradle-properties-plugin:1.4.6
33

44
mlHost=localhost

examples/docker-projects/single-node-with-nifi/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// gradle -PenvironmentName=x ...
3-
id 'net.saliman.properties' version '1.4.6'
4-
id "com.marklogic.ml-gradle" version "3.8.2"
3+
id 'net.saliman.properties' version '1.5.1'
4+
id "com.marklogic.ml-gradle" version "4.4.0"
55
id 'com.avast.gradle.docker-compose' version "0.6.11"
66
}
77
dockerCompose {
@@ -12,7 +12,7 @@ task mlDockerSetupNode(dependsOn:composeUp) {
1212
doLast {
1313
sleep(5 * 1000) //ensure node is up
1414
exec {
15-
commandLine 'docker', 'exec', 'node1.single', 'init-marklogic'
15+
commandLine 'docker', 'exec', 'node1.single', 'init-marklogic'
1616
}
1717
}
1818
}
@@ -30,4 +30,4 @@ task mlDockerStop(type:Exec) {
3030
task mlDockerTeardown(dependsOn:composeDown) {
3131
//remove logs directory
3232
delete 'logs'
33-
}
33+
}

0 commit comments

Comments
 (0)