bazel-contrib / bazel-contrib/rules_jvm_external
Is there a way to use a local maven repo
- Dominant language
- Java
- Stars
- 373
- Forks
- 301
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 5
Description
Basically, I'd like to replicate what is possible on Gradle via
```groovy
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
```
So far I've tried
```
maven_install(
artifacts = [
"com.facebook.react:react-native:0.63.3",
],
repositories = [
"file:///Users/bruno/repo/node_modules/react-native/android",
],
)
```
and
```
android_library(
name = "main_application",
srcs = [
"MainActivity.java",
"MainApplication.java",
],
manifest = "AndroidManifest.xml",
resource_files = glob(["res/**"]),
deps = [
"@maven//:com_facebook_react_react_native",
],
)
```
but it doesn't seem to be working, and I am getting this error
```
(14:46:46) ERROR: [...] depends on @maven//:com_facebook_react_react_native in repository @maven which failed to fetch. no such package '@maven//': Only artifacts downloaded over http(s) are supported: com.facebook.react:react-native:0.63.3
```
Contributor guide
Research direction
Start with the maven_install configuration and its file:// repository argument, then follow how the @maven dependency is fetched for android_library. Reproduce the setup using MainActivity.java, MainApplication.java, AndroidManifest.xml, and the reported React Native artifact; done means establishing and testing a supported local-repository workflow or documenting that it is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, react-native
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100