-
Notifications
You must be signed in to change notification settings - Fork 15
Building
Note: This library is published on maven central. To use it, you only need to reference the coordinates in your gradle, ivy, or maven build file. The maven coordinates are:
group | artifact | version |
---|---|---|
com.emc.ecs | object-client | latest version |
To build the project, there are no external dependencies besides the Java SDK (version 8 or higher). Simply use the gradle wrapper (included in the project):
./gradlew jar
- on Linux
gradlew.bat jar
- on Windows
NOTE: If you wish to build a version prior to 3.2.0, you must first create a
~/.gradle/gradle.properties
file and place the following inside it:sonatypeUsername= githubUsername= gitUsername=
This was necessary due to the common-build structure previously used for github projects.
To run the tests, you need to copy src/test/resources/test.properties.template
to your home directory and remove the .template
extension. Then change the values so they are accurate and provide endpoint and credentials to a real ECS cluster. To use the smart-client for the tests, leave enableVhost
commented. You can optionally use ECS Test Drive as an endpoint, but you will have to turn off the smart-client (uncomment the enableVhost
line and set it to true
). Then, execute the tests via Gradle:
./gradlew test
- on Linux
gradlew.bat test
- on Windows
This project uses semantic versioning with an opinionated release plugin. This means the version is inferred based on version tags in the git repository. So, if you want to target a specific version in the build, you have a couple options.
- Use the
-Prelease.scope=major|minor|patch
and-Prelease.stage=dev|milestone|rc|final
properties to infer the next version (see docs) - Use the
-Prelease.version=1.2.3
override property to set a specific version
NOTE: Any stage other than
dev
(the default) requires your local git workspace to be clean. If it's not clean, you will see the following error:A problem occurred configuring project ':smart-client-core'. > Could not create task ':smart-client-core:assemble'. > No version strategies were selected. Run build with --info for more detail.
For example, say you are preparing to release a minor version increment, and you want to pull in the new version into a dependent project so you can release them at the same time. To test this locally, you would install this library like so:
./gradlew install -Prelease.scope=minor -Prelease.stage=final
This will install the final, minor-incremented version in your local maven repo, so that you can pull it into your other project, using a mavenLocal()
repo defined in build.gradle
. If the existing tagged version is 2.1.0
, then this would install version 2.2.0
.