- 1.53.0 (latest)
- 1.52.0
- 1.51.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.0.4
google-cloud-storage-transfer overview (1.40.0)
Key Reference Links
Storage Transfer Service Description: Secure, low-cost services for transferring data from cloud or on-premises sources.
Storage Transfer Service Product Reference | GitHub Repository (includes samples) | Maven artifact |
Getting Started
In order to use this library, you first need to go through the following steps:
- Install a JDK (Java Development Kit)
- Select or create a Cloud Platform project
- Enable billing for your project
- Enable the API
- Set up authentication
Use the Storage Transfer Service for Java
To ensure that your project uses compatible versions of the libraries
and their component artifacts, import com.google.cloud:libraries-bom
and use
the BOM to specify dependency versions. Be sure to remove any versions that you
set previously. For more information about
BOMs, see Google Cloud Platform Libraries BOM.
Maven
Import the BOM in the dependencyManagement
section of your pom.xml
file.
Include specific artifacts you depend on in the dependencies
section, but don't
specify the artifacts' versions in the dependencies
section.
The example below demonstrates how you would import the BOM and include the google-cloud-storage-transfer
artifact.
<dependencyManagement> <dependencies> <dependency> <groupId>com.google.cloud</groupId> <artifactId>libraries-bom</artifactId> <version> 26.36.0</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-storage-transfer</artifactId> </dependency> </dependencies>
Gradle
BOMs are supported by default in Gradle 5.x or later. Add a platform
dependency on com.google.cloud:libraries-bom
and remove the version from the
dependency declarations in the artifact's build.gradle
file.
The example below demonstrates how you would import the BOM and include the google-cloud-storage-transfer
artifact.
implementation platform('com.google.cloud:libraries-bom: 26.36.0') implementation 'com.google.cloud:google-cloud-storage-transfer'
The platform
and enforcedPlatform
keywords supply dependency versions
declared in a BOM. The enforcedPlatform
keyword enforces the dependency
versions declared in the BOM and thus overrides what you specified.
For more details of the platform
and enforcedPlatform
keywords Gradle 5.x or higher, see
Gradle: Importing Maven BOMs.
If you're using Gradle 4.6 or later, add
enableFeaturePreview('IMPROVED_POM_SUPPORT')
to your settings.gradle
file. For details, see
Gradle 4.6 Release Notes: BOM import.
Versions of Gradle earlier than 4.6 don't support BOMs.
SBT
SBT doesn't support BOMs. You can find recommended versions of libraries from a particular BOM version on the dashboard and set the versions manually. To use the latest version of this library, add this to your dependencies:
libraryDependencies += "com.google.cloud" % "google-cloud-storage-transfer" % "1.40.0"