Skip to content

Commit 3fc9137

Browse files
rjrudinSameeraPriyathamTadikonda
authored andcommitted
Updated CONTRIBUTING
Added section on how to build and use the DH Java library.
1 parent 5e7507a commit 3fc9137

File tree

1 file changed

+37
-7
lines changed

1 file changed

+37
-7
lines changed

CONTRIBUTING.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Looking to build the code from source? Look no further.
2727
#### Prerequisites
2828
You need:
2929

30-
- MarkLogic Server 9.0-7 or later
30+
- MarkLogic Server (see [Version Compatibility](https://docs.marklogic.com/datahub/refs/version-compatibility.html) for the correct version)
3131
- Java JDK 8 or later
3232
- Gradle 4.6 or later
3333
- A decent IDE. (Recommended: IntelliJ)
@@ -44,18 +44,48 @@ cd /path/to/data-hub-project/
4444
```
4545

4646

47-
#### Making Changes to the Hub Gradle Plugin
47+
#### Building and using the Data Hub Java library
4848

49-
If you are testing a change to the ml-data-hub Gradle plugin or a cutting-edge development version, you might want to use a local copy of the Gradle plugin in your Data Hub project. These situations are rare.
49+
If you wish to make changes to or try out the latest code in the Data Hub Java library (marklogic-data-hub-(version).jar), follow
50+
these instructions:
5051

52+
1. Publish the library to your local Maven repository (defaults to ~/.m2/repository).
53+
54+
```bash
55+
cd /path/to/marklogic-data-hub/
56+
./gradlew publishToMavenLocal
57+
```
58+
59+
2. In the build.gradle file for the project that will use the library, add your local Maven repository as a repository if it's not alreaded included:
60+
61+
```bash
62+
repositories {
63+
mavenLocal()
64+
}
65+
```
66+
67+
3. Assuming that you're using Gradle's java plugin, add the library as a dependency to your project:
68+
69+
```bash
70+
dependencies {
71+
compile "com.marklogic:marklogic-data-hub:(version)"
72+
```
73+
74+
The version is defined in gradle.properties in the marklogic-data-hub root project directory. You can override this if
75+
desired when publishing to your local Maven repository - e.g.
76+
77+
./gradlew publishToMavenLocal -Pversion=myVersion
78+
79+
80+
#### Building and using the Data Hub Gradle Plugin
81+
82+
If you are testing a change to the ml-data-hub Gradle plugin or a cutting-edge development version, you might want to use a local copy of the Gradle plugin in your Data Hub project.
5183
To use a local copy of the Gradle plugin in your Data Hub project, you must tell Gradle to use your local copy instead of the one in the cloud.
5284
53-
1. Publish your Data Hub Plugin to the local Maven repository.
85+
1. Publish the plugin to your local Maven repository (defaults to ~/.m2/repository).
5486
5587
```bash
56-
cd /path/to/data-hub-project/
57-
./gradlew publishToMavenLocal
58-
cd /path/to/data-hub-project/ml-data-hub-plugin
88+
cd /path/to/marklogic-data-hub/
5989
./gradlew publishToMavenLocal
6090
```
6191

0 commit comments

Comments
 (0)