Google Cloud Storage backed Maven

Hi All,

Looking for some guidance on using Gradle with Google Cloud Storage backed Maven. I’ve read the docs but can’t find a good worked example anywhere. In particular, I’m not sure what needs to be done to make sure Gradle can connect with my bucket. Any advice gratefully received.

Thanks,
Steve

A few more details:

Here is the jar in GCS that I would like to use as a dependency in a gradle project:

15

The build.gradle file for the project includes:

repositories {
	maven {
		url "gcs://rusa_api_poc/maven2"
    	}
	jcenter()
}

dependencies {
	compile group: 'rusaapi', name: 'Domain', version: '1.0'
}

But when I refresh the Gradle project, I get
Could not resolve: rusaapi:Domain:1.0

Any ideas?

Can someone help, please?

Bump in at least 20 chars

Hi did you ever solve this issue. I am also running into an issue where my build gradle includes:

repositories {
    maven {
        url "gcs:/${repoBucketName}/maven2/"
    }
    mavenCentral()
}

dependencies {
	compile('com.company:ig_proto:0.1.0')
}

The error I get is:

* What went wrong:
Could not determine the dependencies of task ':jar'.
> Could not resolve all files for configuration ':compile'.
   > Could not resolve com.company:ig_proto:0.1.0.
     Required by:
         project :
      > Could not resolve com.company:ig_proto:0.1.0.
         > Could not get resource 'gcs:/invisible_guard_jars/maven2/com/company/ig_proto/0.1.0/ig_proto-0.1.0.pom'.
            > Required parameter bucket must be specified.

Even if I hard code the bucket, I get the same error. Can someone please help.

Hello, you need to publish using maven-publish to ensure the required metadata is also included.

Also, you’re missing the second slash in the gcs url I think.