Skip to content

Commit 36affdd

Browse files
committed
#319 Updated mlcp-project
1 parent 7b1a89e commit 36affdd

File tree

2 files changed

+9
-39
lines changed

2 files changed

+9
-39
lines changed

examples/mlcp-project/build.gradle

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,27 @@
11
/*
22
* This buildscript shows how mlcp dependencies can be easily declared and then uses in a Gradle configuration named
33
* "mlcp". This configuration is then used as the classpath for MlcpTask, which is a simple extension of Gradle's
4-
* JavaExec task that exposes a number of mlcp arguments as task attributes.
4+
* JavaExec task that exposes mlcp arguments as task attributes.
55
*/
66

7-
buildscript {
8-
repositories {
9-
jcenter()
10-
mavenLocal()
11-
}
12-
dependencies {
13-
classpath "com.marklogic:ml-gradle:3.0.0"
14-
}
7+
plugins {
8+
id "com.marklogic.ml-gradle" version "3.5.0"
159
}
1610

17-
apply plugin: "com.marklogic.ml-gradle"
18-
1911
repositories {
2012
jcenter()
2113

22-
// Needed for mlcp dependencies
14+
// Needed for some mlcp dependencies, such as commons-csv:1.5.1-marklogic
2315
maven { url "https://developer.marklogic.com/maven2/" }
24-
25-
// Needed for hadoop dependencies for mlcp
26-
maven { url "http://repository.cloudera.com/artifactory/cloudera-repos/" }
2716
}
2817

2918

3019
configurations {
31-
// This configuration captures the dependencies for running mlcp (Content Pump). This is only needed if you want
32-
// to run mlcp via Gradle tasks. If you do, using com.marklogic.gradle.task.MlcpTask is a useful starting point, as
33-
// shown below. Need to force to use certain version of xml-apis library.
34-
mlcp {
35-
resolutionStrategy {
36-
force "xml-apis:xml-apis:1.4.01"
37-
}
38-
}
20+
mlcp
3921
}
4022

41-
/**
42-
* ML 8.0-5 and 7.0-6 introduced a single mlcp dependency - see http://developer.marklogic.com/maven2/com/marklogic/mlcp/.
43-
* The 8.0-5 mlcp may very well work on ML versions prior to 8.0-5. If it doesn't, try the mlcp-Hadoop2
44-
* and marklogic-mapreduce2 dependencies that are commented out by default instead of the mlcp dependency.
45-
*
46-
* Note that at least with version 8.0-5 of mlcp, mlcp will complain on Windows that it cannot find
47-
* bin/winutils.exe. This does not appear to have any impact on mlcp behavior though.
48-
*/
4923
dependencies {
50-
mlcp "com.marklogic:mlcp:8.0.6.3"
51-
52-
/**
53-
* If you need to import delimited text, be sure to include this dependency as well.
54-
*/
55-
mlcp "org.apache.commons:commons-csv:1.2"
24+
mlcp "com.marklogic:mlcp:9.0.4"
5625

5726
/**
5827
* mlcp uses Log4j for logging, and if Log4j can't find a configuration file, it will complain and you'll
@@ -77,7 +46,7 @@ task importSampleData(type: com.marklogic.gradle.task.MlcpTask) {
7746
* New in ml-gradle 2.6.0 - set this to define a URI in your content database for mlcp's log output to be written to
7847
* as a text document. This can also be a variable, Gradle property, etc.
7948
*/
80-
logOutputUri = "/slappy.txt"
49+
logOutputUri = "/mlcp-log.txt"
8150

8251
/**
8352
* The args array can be used for any MLCP parameters that are not supported by the MlcpBean class that MlcpTask
@@ -104,7 +73,7 @@ task importRdf(type: com.marklogic.gradle.task.MlcpTask) {
10473

10574
/**
10675
* Example of importing semicolon-delimited text, in reference to:
107-
* https://github.com/rjrudin/ml-gradle/issues/90
76+
* https://github.com/marklogic-community/ml-gradle/issues/90
10877
*/
10978
task importSemicolonDelimitedText(type: com.marklogic.gradle.task.MlcpTask) {
11079
classpath = configurations.mlcp

examples/mlcp-project/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ mlAppName=mlcp-project
33
mlRestPort=8130
44
mlUsername=admin
55
mlPassword=admin
6+
mlContentForestsPerHost=1

0 commit comments

Comments
 (0)