Comments (8)
Noting that I'm able to work around this by using exclusions + http_file
+ resources in the java_binary
. It would be nice if the the rules in this repo could handle it automagically though. Not sure if that's possible.
# WORKSPACE
http_file(
name = "com_almworks_sqlite4java_libsqlite4java_linux_amd64",
downloaded_file_path = "libsqlite4java-linux-amd64-1.0.392.so",
urls = ["https://repo1.maven.org/maven2/com/almworks/sqlite4java/libsqlite4java-linux-amd64/1.0.392/libsqlite4java-linux-amd64-1.0.392.so"],
)
http_file(
name = "com_almworks_sqlite4java_libsqlite4java_osx",
downloaded_file_path = "libsqlite4java-osx-1.0.392.dylib",
urls = ["https://repo1.maven.org/maven2/com/almworks/sqlite4java/libsqlite4java-osx/1.0.392/libsqlite4java-osx-1.0.392.dylib"],
)
http_file(
name = "org_eclipse_jetty_orbit_javax_servlet",
downloaded_file_path = "javax.servlet-3.0.0.v201112011016.jar",
urls = ["https://repo1.maven.org/maven2/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar"],
)
maven_install(
artifacts = [
maven.artifact(
group = "com.amazonaws",
artifact = "DynamoDBLocal",
version = "1.11.477",
exclusions = [
"com.almworks.sqlite4java:libsqlite4java-linux-amd64",
"com.almworks.sqlite4java:libsqlite4java-linux-i386",
"com.almworks.sqlite4java:libsqlite4java-osx",
"com.almworks.sqlite4java:sqlite4java-win32-x64",
"com.almworks.sqlite4java:sqlite4java-win32-x86",
"org.eclipse.jetty.orbit:javax.servlet",
],
),
],
)
# BUILD
java_import(
name = "org_eclipse_jetty_orbit_javax_servlet",
jars = [
"@org_eclipse_jetty_orbit_javax_servlet//file",
],
)
java_binary(
name = "dynamodb-local",
args = [
"-sharedDb",
"-inMemory",
],
data = [
"@com_almworks_sqlite4java_libsqlite4java_linux_amd64//file",
"@com_almworks_sqlite4java_libsqlite4java_osx//file",
],
jvm_flags = [
"-Djava.library.path=$$JAVA_RUNFILES/com_almworks_sqlite4java_libsqlite4java_osx/file/:$$JAVA_RUNFILES/com_almworks_sqlite4java_libsqlite4java_linux_amd64/file/",
],
main_class = "com.amazonaws.services.dynamodbv2.local.main.ServerRunner",
visibility = ["//visibility:public"],
runtime_deps = [
"org_eclipse_jetty_orbit_javax_servlet",
"@maven//:com_almworks_sqlite4java_sqlite4java",
"@maven//:com_amazonaws_DynamoDBLocal",
],
)
from rules_jvm_external.
Marking this as a feature request and thanks for providing the clear workaround.
FWIW, on 2.0.1 I can include the "com.amazonaws:DynamoDBLocal:1.11.477"
artifact in maven_install
and not see a crash. The binaries aren't downloaded so you don't need to write the exclusions in the spec.
from rules_jvm_external.
@jin I tried the same and get errors like
in deps attribute of jvm_import rule @scala_2_11//:com_amazonaws_DynamoDBLocal: rule '@scala_2_11//:com_almworks_sqlite4java_libsqlite4java_linux_i386_so' does not exist"
when building. I had to use a similar workaround as above.
from rules_jvm_external.
log4j exports some test helpers with a packaging as test-jar. Packaging doesn't seem to affect which artifact is actually retrieved. (I think same root issue)
from rules_jvm_external.
Maybe the same problem for com.oracle.substratevm:svm:19.2.0.1
:
external/maven/BUILD:509:11: in deps attribute of jvm_import rule @maven//:org_graalvm_truffle_truffle_nfi: rule '@maven//:org_graalvm_truffle_truffle_nfi_native_darwin_amd64_tar_gz' does not exist
external/maven/BUILD:509:11: in deps attribute of jvm_import rule @maven//:org_graalvm_truffle_truffle_nfi: rule '@maven//:org_graalvm_truffle_truffle_nfi_native_linux_amd64_tar_gz' does not exist
external/maven/BUILD:509:11: in deps attribute of jvm_import rule @maven//:org_graalvm_truffle_truffle_nfi: rule '@maven//:org_graalvm_truffle_truffle_nfi_native_linux_aarch64_tar_gz' does not exist
from rules_jvm_external.
Hitting the exact same issue with the same dependency. So far this has been the only issue I've had with rules_jvm_external.
from rules_jvm_external.
Same for quarkus
@maven//:io_quarkus_quarkus_grpc_codegen: rule '@maven//:com_google_protobuf_protoc_exe_windows_x86_32' does not exist.
It expects JAR, but file have .exe extension...
from rules_jvm_external.
https://github.com/bazelbuild/rules_jvm_external/pull/959/files is not fully automagical but a bit nicer experience
from rules_jvm_external.
Related Issues (20)
- Support in memory PGP signing HOT 1
- bzlmod: when root module overrides a namespace but doesn't change artifacts, do not emit a warning HOT 1
- Expose `PackageInfo` from imported packages
- Bzlmod: maven.artifact repositories argument is ignored HOT 1
- Bzlmod: maven.install repositories has silent last-wins semantics
- Error repinning with maven resolver HOT 2
- a Maven artifact with a transitive dependency on an artifact with packaging=pom does not fully work out of the box HOT 2
- 6.2: transitive dependency without sources generates invalid `http_file` HOT 1
- maven_export macro uses incorrect value of testonly when package default_testonly is True
- [Bazel CI] Bazel fails with `name 'android_ndk_repository' is not defined` HOT 2
- Single Maven Dependency Resolution (Exclude All Deps) HOT 1
- bzlmod: Not found error when using version from BOM HOT 2
- Feature Request - Allow file input for `manifest_entries` on `java_export`
- buildozer message incorrect with --incompatible_use_plus_in_repo_names
- "Accessing transitive dependencies list" not compatible with `strict_visibility`
- Feature Request: constraints support
- bzlmod: Not possible to add a dependency for test only and fetch the source code
- Maven resolver ignores BOM ordering for non-root modules
- FR: Expose maven_publish rule
- Release rules_jvm_external 6.3 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_jvm_external.