Skip to content

Commit 5720cdb

Browse files
authored
Merge pull request #744 from marklogic/feature/22458-black-duck
MLE-22458 Updated dependencies in example projects
2 parents bb33970 + 4d55039 commit 5720cdb

File tree

63 files changed

+397
-1862
lines changed

Some content is hidden

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

63 files changed

+397
-1862
lines changed

examples/alert-project/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repositories {
99
}
1010

1111
dependencies {
12-
testImplementation "com.marklogic:marklogic-junit5:1.1.0"
12+
testImplementation "com.marklogic:marklogic-junit5:1.5.0"
1313
}
1414

1515
test {

examples/corticon-example/settings.gradle

Whitespace-only changes.

examples/cpf-project/build.gradle

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

1212
dependencies {
13-
testImplementation "com.marklogic:marklogic-junit5:1.1.0"
13+
testImplementation "com.marklogic:marklogic-junit5:1.5.0"
1414
}
1515

1616
test {

examples/data-services/build.gradle

Lines changed: 7 additions & 7 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.2"
44
id "com.marklogic.ml-gradle" version "5.0.0"
5-
id 'com.marklogic.ml-development-tools' version '6.0.0'
5+
id 'com.marklogic.ml-development-tools' version '7.1.0'
66
}
77

88
task generateHelloWorld(type: com.marklogic.client.tools.gradle.EndpointProxiesGenTask) {
@@ -19,13 +19,13 @@ test {
1919
}
2020

2121
dependencies {
22-
implementation 'org.slf4j:slf4j-api:1.7.31'
23-
implementation 'com.marklogic:marklogic-client-api:6.0.0'
22+
implementation 'org.slf4j:slf4j-api:2.0.17'
23+
implementation 'com.marklogic:marklogic-client-api:7.1.0'
2424

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

2727
// Force usage of logback for logging
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"
28+
testImplementation "ch.qos.logback:logback-classic:1.3.14"
29+
testImplementation "org.slf4j:jcl-over-slf4j:2.0.17"
30+
testImplementation "org.slf4j:slf4j-api:2.0.17"
3131
}

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ repositories {
2828
}
2929
}
3030

31-
configurations {
32-
mlcp //example if you want to use mlcp. Delete otherwise
33-
}
34-
35-
dependencies {
36-
//sample mlcp dependency. Remove if not required
37-
mlcp "com.marklogic:mlcp:10.0.6.2"
38-
}
39-
4031
/**
4132
* START: Disconnected gradle tasks
4233
*/
@@ -57,7 +48,6 @@ task downloadToProjectMavenRepo(type: Copy) {
5748
* These are defined in the 'dependencies' block. E.g. you need to include
5849
* configurations.implementation.files if you want your java 'implementation' dependencies downloaded
5950
*/
60-
configurations.mlcp.files //includes 'mlcp' dependencies. Remove if not needed
6151

6252
from new File(gradle.gradleUserHomeDir, 'caches/modules-2/files-2.1') // correct as of gradle 4.7
6353
into new File(rootDir, projectMavenRepo)
@@ -71,8 +61,8 @@ task downloadToProjectMavenRepo(type: Copy) {
7161
task makeOfflineZip(type: Zip, dependsOn: downloadToProjectMavenRepo) {
7262
from rootDir
7363
excludes = ['.tmp', '.gradle', 'build/gradle-home', 'build/distributions', 'build/offline/gradle/wrapper/dists']
74-
destinationDir(file('build/distributions'))
75-
archiveName = 'offline.zip'
64+
destinationDirectory = file('build/distributions')
65+
archiveFileName = 'offline.zip'
7666
doLast {
7767
println "Created offline project zip at build/distributions/offline.zip"
7868
}

examples/disconnected-project/build.gradle

Lines changed: 81 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -13,125 +13,107 @@
1313
* against a file tree.
1414
*/
1515
buildscript {
16-
if (project.hasProperty("disconnected")) {
17-
dependencies {
18-
classpath fileTree(dir: "ml-gradle-dependencies", include: "*.jar")
19-
}
20-
}
21-
else {
22-
repositories {
23-
mavenCentral()
24-
}
25-
dependencies {
26-
classpath mlGradleDependency
27-
classpath mlSalimanDependency
28-
}
29-
}
16+
if (project.hasProperty("disconnected")) {
17+
dependencies {
18+
classpath fileTree(dir: "ml-gradle-dependencies", include: "*.jar")
19+
}
20+
} else {
21+
repositories {
22+
mavenCentral()
23+
}
24+
dependencies {
25+
classpath mlGradleDependency
26+
classpath mlSalimanDependency
27+
}
28+
}
3029
}
3130

3231
apply plugin: "com.marklogic.ml-gradle"
3332

3433
configurations {
35-
mlcp
36-
mlDeployer
34+
mlDeployer
3735
}
3836

3937
ext {
40-
mlDeployerDir = "build/ml-deployer"
41-
mlDeployerGroup = "ML Deployer"
42-
mlDeployerZipFilename = "ml-deployer.zip"
38+
mlDeployerDir = "build/ml-deployer"
39+
mlDeployerGroup = "ML Deployer"
40+
mlDeployerZipFilename = "ml-deployer.zip"
4341
}
4442

4543
/*
46-
* If the project has the "disconnected" property defined, then we look for mlcp dependencies in a directory
47-
* instead of retrieving them from a repository.
44+
* If the project has the "disconnected" property defined, then no repositories are registered.
4845
*/
4946
if (project.hasProperty("disconnected")) {
50-
println "\nRUNNING IN DISCONNECTED MODE"
51-
52-
dependencies {
53-
mlcp fileTree(dir: "mlcp-dependencies", include: "*.jar")
54-
}
47+
println "\nRUNNING IN DISCONNECTED MODE"
5548
}
5649

5750
/*
5851
* If we're not in disconnected mode, then we grab dependencies from repositories, and we define a set of tasks
5952
* for creating the "mlDeployer" zip file that can be used in a disconnected environment.
6053
*/
6154
else {
62-
repositories {
63-
mavenCentral()
64-
maven {url "http://developer.marklogic.com/maven2/"}
65-
maven {url "http://repository.cloudera.com/artifactory/cloudera-repos/" }
66-
}
67-
68-
configurations { mlgradle }
69-
70-
dependencies {
71-
mlcp "com.marklogic:mlcp-Hadoop2:1.3-2"
72-
mlcp "com.marklogic:marklogic-mapreduce2:2.1.2"
73-
74-
mlgradle mlGradleDependency
75-
}
76-
77-
task copyGradleFiles(type: Copy, group: mlDeployerGroup) {
78-
from "build.gradle", "gradle.properties"
79-
into mlDeployerDir
80-
}
81-
82-
task copyAppModules(type: Copy, group: mlDeployerGroup) {
83-
from "src/main/ml-modules"
84-
into mlDeployerDir + "/src/main/ml-modules"
85-
}
86-
87-
task copyAppConfig(type: Copy, group: mlDeployerGroup) {
88-
from "src/main/ml-config"
89-
into mlDeployerDir + "/src/main/ml-config"
90-
}
91-
92-
task copyMlGradleDependencies(type: Copy, group: mlDeployerGroup) {
93-
from configurations.mlgradle
94-
into mlDeployerDir + "/ml-gradle-dependencies"
95-
}
96-
97-
task copyMlcpDependencies(type: Copy, group: mlDeployerGroup) {
98-
from configurations.mlcp
99-
into mlDeployerDir + "/mlcp-dependencies"
100-
}
101-
102-
task addDisconnectedToGradleProperties {
103-
doLast {
104-
ant.propertyfile(file: "build/ml-deployer/gradle.properties") {
105-
entry(key: "disconnected", value: "true")
106-
}
107-
}
108-
}
109-
110-
addDisconnectedToGradleProperties.mustRunAfter copyGradleFiles
111-
112-
task copyMlDeployerFiles(group: mlDeployerGroup) {
113-
dependsOn = [
114-
"copyGradleFiles",
115-
"copyAppModules",
116-
"copyAppConfig",
117-
"copyMlGradleDependencies",
118-
"copyMlcpDependencies",
119-
"addDisconnectedToGradleProperties"
120-
]
121-
}
122-
123-
task deleteMlDeployer(type: Delete, group: mlDeployerGroup) { delete mlDeployerDir, "build/${mlDeployerZipFilename}" }
124-
125-
task buildMlDeployer (type: Zip, group: mlDeployerGroup) {
126-
description "Create a zip of this project's Gradle dependencies and source code so that it can be deployer without Internet access"
127-
dependsOn = ["deleteMlDeployer", "copyMlDeployerFiles"]
128-
from mlDeployerDir
129-
into 'ml-deployer'
130-
destinationDir file('build')
131-
archiveName mlDeployerZipFilename
132-
}
133-
134-
copyMlDeployerFiles.mustRunAfter deleteMlDeployer
55+
repositories {
56+
mavenCentral()
57+
}
58+
59+
configurations { mlgradle }
60+
61+
dependencies {
62+
mlgradle mlGradleDependency
63+
}
64+
65+
task copyGradleFiles(type: Copy, group: mlDeployerGroup) {
66+
from "build.gradle", "gradle.properties"
67+
into mlDeployerDir
68+
}
69+
70+
task copyAppModules(type: Copy, group: mlDeployerGroup) {
71+
from "src/main/ml-modules"
72+
into mlDeployerDir + "/src/main/ml-modules"
73+
}
74+
75+
task copyAppConfig(type: Copy, group: mlDeployerGroup) {
76+
from "src/main/ml-config"
77+
into mlDeployerDir + "/src/main/ml-config"
78+
}
79+
80+
task copyMlGradleDependencies(type: Copy, group: mlDeployerGroup) {
81+
from configurations.mlgradle
82+
into mlDeployerDir + "/ml-gradle-dependencies"
83+
}
84+
85+
task addDisconnectedToGradleProperties {
86+
doLast {
87+
ant.propertyfile(file: "build/ml-deployer/gradle.properties") {
88+
entry(key: "disconnected", value: "true")
89+
}
90+
}
91+
}
92+
93+
addDisconnectedToGradleProperties.mustRunAfter copyGradleFiles
94+
95+
task copyMlDeployerFiles(group: mlDeployerGroup) {
96+
dependsOn = [
97+
"copyGradleFiles",
98+
"copyAppModules",
99+
"copyAppConfig",
100+
"copyMlGradleDependencies",
101+
"addDisconnectedToGradleProperties"
102+
]
103+
}
104+
105+
task deleteMlDeployer(type: Delete, group: mlDeployerGroup) { delete mlDeployerDir, "build/${mlDeployerZipFilename}" }
106+
107+
task buildMlDeployer(type: Zip, group: mlDeployerGroup) {
108+
description "Create a zip of this project's Gradle dependencies and source code so that it can be deployer without Internet access"
109+
dependsOn = ["deleteMlDeployer", "copyMlDeployerFiles"]
110+
from mlDeployerDir
111+
into 'ml-deployer'
112+
destinationDirectory = file('build')
113+
archiveFileName = mlDeployerZipFilename
114+
}
115+
116+
copyMlDeployerFiles.mustRunAfter deleteMlDeployer
135117
}
136118

137119
/*

examples/docker-projects/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/docker-projects/single-node-with-nifi/.gitignore

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/docker-projects/single-node-with-nifi/README.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)