Please read our Vision Statement. The reason for each task should ultimately come back to this statement.
Each contributor should be knowledgeable and proficient at the following Java frameworks.
You will need to first install MarkLogic if you haven't already. It is recommended to use a virtual machine or remote server to run MarkLogic to partition our resources (MarkLogic likes to use a lot of memory).
The dev branch contains the latest and greatest code, while master represents the latest published version. Always branch from DEV. If you issue a pull request, make sure to compare against the DEV branch. All your development should be executed on a fork from the ml-community/marklogic-spring-batch project.
Use a fork-and-Branch Git workflow.
Yes, it is recommended to use a Java friendly IDE to make one's life easier. Of course, you can use a simple text editor if that is your preference. The lead authors have a recent preference for IntelliJ. Gradle is used for building, testing, deploying, and publishing. One of the cool features of Gradle is the ability to create the project files for two popular IDE's, IntelliJ and Eclipse.
./gradlew idea
./gradlew eclipse
The gradlew (or gradlew.bat on Windows) command is a Java program called the Gradle Wrapper which allows you to run a gradle command without installing Gradle on your machine. If you plan to contribute (or do any type of Java development) it would be worth while to go ahead and install Gradle on your dev machine.
- core
- A job repository that uses MarkLogic to persist job metadata
- A custom CommandLineJobRunner used to execute a job
- Configuration annotations for wiring MarkLogic and Spring Batch together
- infrastructure - reusable ItemReaders, ItemProcessors, ItemWriters, and Lsiteners used to construct a Spring Batch Job.
- samples - Simple Job configuration code to help get jump started.
- test - helper classes to assist in the testing of Spring Batch jobs written for MarkLogic.
Check the following properties file to see if there is any conflicts with your existing system.
$PROJECT_ROOT/gradle.properties
The gradle.properties file indicates where to deploy a test database to test the core unit test. The job.properties are used for testing the examples.
From the project root, run the following command. This will create a test database that is configured as a MarkLogic Job Repository.
gradlew mlDeploy
Each subproject relies on a properties file called job.properties that indicates the connection information for your MarkLogic database. The default job.properties can be found in either one of the following locations.
$PROJECT_ROOT/job.properties
../src/main/resources/job.properties
../src/test/resources/job.properties
If your testing fails due to not finding a host, check your job.properties file.
To execute all of the automated unit tests, from the project root, run the following command.
gradlew test
The policy is the dev branch tests are 100% passing. If all tests run to completion and 100% passing then you are ready to start commiting code.
If you are new to the project the best way to contribute is to add or improve an example to the directory of examlpes. Choose of the job issues to get started on an assignment.
The quality of this project is based on the tests that exercise the code. Every issue worked should be accompanied by one or more tests that test the primary use case and several edge cases. Code that is submitted without any accompanied tests will not be accepted. Before submitting a pull request, run the test suite and confirm 100% test passing with the following gradle command.
To deploy the marklogic-spring-batch core and test library to your local maven repository, first, increment the relevant version number in the gradle.properties file.
It is advised to first publish artifacts to the local maven repository and run local tests before publishing out to bintray
gradle publishToMavenLocal
Once you have verified your version then run the following command to publish to bintray (authoritative personnel only)
gradle bintrayUpload
Open an issue and label it as a Question. Please don't use email. This is the best way to ask once and answer for all. If you are a MarkLogic employee, I recommend that you subscribe to the java-sig email newsgroup.
Bugs are tracked as GitHub issues. Create an issue, label it as a bug.
Once you are assigned an issue, please utilize pull requests to submit your changes. Each pull request will be reviewed before being merged into the master branch.
Seven rules of a great git commit message
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how