migration-tooling icon indicating copy to clipboard operation
migration-tooling copied to clipboard

Update Transitive_maven_jar rule README to include repositories field

Open bot424f54 opened this issue 7 years ago • 3 comments
trafficstars

Currently following the README errors complaining about repositories option missing.

Fix by adding repository field to set the option example:

transitive_maven_jar( name = "dependencies", artifacts = [ "org.springframework.cloud:spring-cloud-config-server:1.3.0.RELEASE", ], repositories = ["",], )

bot424f54 avatar Jan 22 '18 08:01 bot424f54

This is not a documentation issue. It's a real bug. The alternative repositories feature was broken in a5e687403ec59db52383a2c0996003e5ad18b6cf. Even if you specify an empty list it doesn't solve the problem, because that outputs an empty value in the command line, and you get the error:

Unable to parse options: Expected a value after parameter --repositories
Usage: <main class> [options]
...

A workaround is to revert to the previous commit:

http_archive(
	name = "trans_maven_jar",
	url = "https://github.com/bazelbuild/migration-tooling/archive/0f25a7e83f2f4b776fad9c8cb929ec9fa7cac87f.zip",
	type = "zip",
	strip_prefix = "migration-tooling-0f25a7e83f2f4b776fad9c8cb929ec9fa7cac87f",
)

fortuna avatar Jan 30 '18 15:01 fortuna

Hmm it worked when I put a local nexus repo url. Looks like github markdown killed my < URL OF REPO > in the repositories list. I haven't tried maven central as I am behind a proxy.

transitive_maven_jar( name = "dependencies", artifacts = [ "org.springframework.cloud:spring-cloud-config-server:1.3.0.RELEASE", ], repositories = ["< URL OF REPO >",], )

bot424f54 avatar Jan 31 '18 17:01 bot424f54

@bot424f54 It works if you actually specify a url. It doesn't not work if you give an empty string, an empty list, or omit the repositories parameter, which used to be optional before.

fortuna avatar Feb 02 '18 13:02 fortuna