{"id":15297570,"url":"https://github.com/lahsivjar/gcp-storage-wagon","last_synced_at":"2025-07-09T05:03:24.805Z","repository":{"id":57726050,"uuid":"151919617","full_name":"lahsivjar/gcp-storage-wagon","owner":"lahsivjar","description":"Maven wagon provider for google cloud storage","archived":false,"fork":false,"pushed_at":"2023-12-05T22:20:06.000Z","size":62,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-09T05:02:38.733Z","etag":null,"topics":["gcp","gcp-storage","gcp-storage-wagon","google-cloud-storage","java-8","maven","maven-extension","maven-wagon","wagon"],"latest_commit_sha":null,"homepage":"https://search.maven.org/artifact/com.lahsivjar/gcp-storage-wagon","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lahsivjar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-07T08:12:34.000Z","updated_at":"2023-09-18T11:28:28.000Z","dependencies_parsed_at":"2024-10-23T14:04:55.592Z","dependency_job_id":null,"html_url":"https://github.com/lahsivjar/gcp-storage-wagon","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lahsivjar/gcp-storage-wagon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Fgcp-storage-wagon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Fgcp-storage-wagon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Fgcp-storage-wagon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Fgcp-storage-wagon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lahsivjar","download_url":"https://codeload.github.com/lahsivjar/gcp-storage-wagon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Fgcp-storage-wagon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264396588,"owners_count":23601539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcp","gcp-storage","gcp-storage-wagon","google-cloud-storage","java-8","maven","maven-extension","maven-wagon","wagon"],"created_at":"2024-09-30T19:18:20.046Z","updated_at":"2025-07-09T05:03:24.592Z","avatar_url":"https://github.com/lahsivjar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maven GCP Storage Wagon [![Build Status](https://travis-ci.com/lahsivjar/gcp-storage-wagon.svg?branch=master)](https://travis-ci.com/lahsivjar/gcp-storage-wagon) [![Maven Central](https://img.shields.io/maven-central/v/com.lahsivjar/gcp-storage-wagon.svg)](https://search.maven.org/artifact/com.lahsivjar/gcp-storage-wagon) [![Coverage Status](https://coveralls.io/repos/github/lahsivjar/gcp-storage-wagon/badge.svg?branch=master)](https://coveralls.io/github/lahsivjar/gcp-storage-wagon?branch=master)\n\n[Maven wagon](https://maven.apache.org/wagon/) provider for [Google Cloud Storage](https://cloud.google.com/storage/). It allows publishing and downloading of artifacts from Google Cloud Storage bucket.\n\n## Usage\n\n1\\. To allow the plugin to access the bucket configure access to the GCP by following instructions [here](https://cloud.google.com/docs/authentication/getting-started). The easiest way to do so is by using [IAM Service Accounts](https://cloud.google.com/iam/docs/understanding-service-accounts) and configuring environment variable `GOOGLE_APPLICATION_CREDENTIALS`.\n\n2\\. Configure the target project to use maven wagon for handling transport via `pom.xml`:\n\n```xml\n  \u003cbuild\u003e\n      \u003cextensions\u003e\n          \u003cextension\u003e\n              \u003cgroupId\u003ecom.lahsivjar\u003c/groupId\u003e\n              \u003cartifactId\u003egcp-storage-wagon\u003c/artifactId\u003e\n              \u003c!-- Replace gcp.storage.wagon.version with the correct version --\u003e\n              \u003cversion\u003e${gcp.storage.wagon.version}\u003c/version\u003e\n          \u003c/extension\u003e\n      \u003c/extensions\u003e\n  \u003c/build\u003e\n```\nMaven loads parent pom before loading any wagon thus if the parent pom also relies on wagon plugin we have to use `.mvn/extensions.xml` file released in [Maven 3.3.1](https://maven.apache.org/docs/3.3.1/release-notes.html) in the root of the target project. Example:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cextensions\u003e\n    \u003cextension\u003e\n        \u003cgroupId\u003ecom.lahsivjar\u003c/groupId\u003e\n        \u003cartifactId\u003egcp-storage-wagon\u003c/artifactId\u003e\n        \u003c!-- Replace gcp.storage.wagon.version with the correct version --\u003e\n        \u003cversion\u003e${gcp.storage.wagon.version}\u003c/version\u003e\n    \u003c/extension\u003e\n\u003c/extensions\u003e\n```\n\n3\\. Setup distribution management in the target project to deploy artifacts to:\n\n```xml\n  \u003cdistributionManagement\u003e\n      \u003csnapshotRepository\u003e\n          \u003cid\u003egcp-bucket-snapshot\u003c/id\u003e\n          \u003c!-- Replace gcp.project-id and gcp.maven.bucket with correct values --\u003e\n          \u003curl\u003egs://${gcp.project-id}#${gcp.maven.bucket}/snapshot\u003c/url\u003e\n      \u003c/snapshotRepository\u003e\n      \u003crepository\u003e\n          \u003cid\u003egcp-bucket-release\u003c/id\u003e\n          \u003c!-- Replace gcp.project-id and gcp.maven.bucket with correct values --\u003e\n          \u003curl\u003egs://${gcp.project-id}#${gcp.maven.bucket}/release\u003c/url\u003e\n      \u003c/repository\u003e\n  \u003c/distributionManagement\u003e\n```\n__NOTE__: Check [Project Id Resolution](#gcp-project-id-resolution) section to find all supported ways of resolving GCP project id.\n\n4\\. To use the deployed modules in another project add extension as described in step `2` to the target project and specify a repository with the wagon configured:\n\n```xml\n  \u003crepositories\u003e\n      \u003crepository\u003e\n          \u003cid\u003egcp-bucket-snapshot\u003c/id\u003e\n          \u003c!-- Replace gcp.project-id and gcp.maven.bucket with correct values --\u003e\n          \u003curl\u003egs://${gcp.project-id}#${gcp.maven.bucket}/snapshot\u003c/url\u003e\n      \u003c/repository\u003e\n      \u003crepository\u003e\n          \u003cid\u003egcp-bucket-release\u003c/id\u003e\n          \u003c!-- Replace gcp.project-id and gcp.maven.bucket with correct values --\u003e\n          \u003curl\u003egs://${gcp.project-id}#${gcp.maven.bucket}/release\u003c/url\u003e\n      \u003c/repository\u003e\n  \u003c/repositories\u003e\n```\n__NOTE__: Check [Project Id Resolution](#gcp-project-id-resolution) section to find all supported ways of resolving GCP project id.\n\n## GCP Project Id resolution\nProject id of GCP can be resolved in the following two ways(in decreasing priority):\n\n1. By specifying it as part of the repository url. For example: `gs://${gcp.project-id}#${gcp.maven.bucket}/`\n2. By setting environment variable `WAGON_GCP_PROJECT_ID`. In this case the url must be of the form `gs://${gcp.maven.bucket}/...`\n\n__NOTE__: It is priority based so if project id can be resolved via a higher priority resolver then the lower priority won't be considered\n\n## Environment variable interpolation\nHash based project id resolution scheme supports environment variable interpolation by specifying the repository url as `gs://${env.GCP_PROJECT_ID}#${env.BUCKET_NAME}` with `GCP_PROJECT_ID` and `BUCKET_NAME` exported as environment variables.\n\n## Issues\n\nReport any issues or bugs to https://github.com/lahsivjar/gcp-storage-wagon/issues\n\n## Changelog\n### 3.0\n* Update module to support Java 11\n\n### 2.1\n* (Bugfix #19) Handle small files in single blob request\n\n### 2.0\n* Environment variable interpolation for hash separated project id resolution\n\n### 1.0\n* Add support for environment variable based project id resolution\n\n### 0.1\n* Add basic wagon for GCP storage\n* Support resolving project id via the repository url\n\n## License\nThe project is licensed under Apache-2.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flahsivjar%2Fgcp-storage-wagon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flahsivjar%2Fgcp-storage-wagon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flahsivjar%2Fgcp-storage-wagon/lists"}