Skip to content

Commit

Permalink
Adding bazel build files for all of third_party/java
Browse files Browse the repository at this point in the history
I've added a third_party/java/rules.bzl, which defines the
maven_java_import macro. This includes an imported jar's maven
coordinates as a tag. We can later add an aspect to extract
these coordinates when generating a pom.xml file

This includes two skeleton build files for java/client so we
get a clean build (third_party/java/selenium:htmlunit-driver depends
on these libraries existing).
  • Loading branch information
jleyba committed May 2, 2019
1 parent 2cba710 commit 79c0e12
Show file tree
Hide file tree
Showing 53 changed files with 1,152 additions and 0 deletions.
5 changes: 5 additions & 0 deletions java/client/src/org/openqa/selenium/remote/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Empty library so third_party/java/selenium:htmlunit-driver will build.
java_library(
name = "remote",
visibility = ["//third_party/java/selenium:__pkg__"],
)
5 changes: 5 additions & 0 deletions java/client/src/org/openqa/selenium/support/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Empty library so third_party/java/selenium:htmlunit-driver will build.
java_library(
name = "support",
visibility = ["//third_party/java/selenium:__pkg__"],
)
1 change: 1 addition & 0 deletions third_party/java/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# BUILD file required (even if empty) so bazel can load .bzl extensions in this directory.
12 changes: 12 additions & 0 deletions third_party/java/annotation/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "jsr250-api",
coords = "javax.annotation:jsr250-api:jar:1.0",
jar = "jsr250-api-1.0.jar",
srcjar = "jsr250-api-1.0-sources.jar",
)
22 changes: 22 additions & 0 deletions third_party/java/ant/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "ant",
coords = "org.apache.ant:ant:jar:1.9.9",
jar = "ant-1.9.9.jar",
srcjar = "ant-1.9.9-sources.jar",
deps = [
":ant-launcher",
],
)

maven_java_import(
name = "ant-launcher",
coords = "org.apache.ant:ant-launcher:jar:1.9.9",
jar = "ant-launcher-1.9.9.jar",
srcjar = "ant-launcher-1.9.9-sources.jar",
)
32 changes: 32 additions & 0 deletions third_party/java/asm/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "asm",
coords = "org.ow2.asm:asm:jar:6.0",
jar = "asm-6.0.jar",
srcjar = "asm-6.0-sources.jar",
)

maven_java_import(
name = "asm-commons",
coords = "org.ow2.asm:asm-commons:jar:6.0",
jar = "asm-commons-6.0.jar",
srcjar = "asm-commons-6.0-sources.jar",
deps = [
":asm-tree",
],
)

maven_java_import(
name = "asm-tree",
coords = "org.ow2.asm:asm-tree:jar:6.0",
jar = "asm-tree-6.0.jar",
srcjar = "asm-tree-6.0-sources.jar",
deps = [
":asm",
],
)
12 changes: 12 additions & 0 deletions third_party/java/assertj/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "assertj",
coords = "org.assertj:assertj-core:jar:3.12.2",
jar = "assertj-core-3.12.2.jar",
srcjar = "assertj-core-3.12.2-sources.jar",
)
15 changes: 15 additions & 0 deletions third_party/java/auto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "auto-common",
coords = "com.google.auto:auto-common:jar:0.8",
jar = "auto-common-0.8.jar",
srcjar = "auto-common-0.8-sources.jar",
deps = [
"//third_party/java/guava",
],
)
12 changes: 12 additions & 0 deletions third_party/java/beust/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "jcommander",
coords = "com.beust:jcommander:jar:1.72",
jar = "jcommander-1.72.jar",
srcjar = "jcommander-1.72-sources.jar",
)
19 changes: 19 additions & 0 deletions third_party/java/bytebuddy/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "byte-buddy",
coords = "net.bytebuddy:byte-buddy:jar:1.9.12",
jar = "byte-buddy-1.9.12.jar",
srcjar = "byte-buddy-1.9.12-sources.jar",
)

maven_java_import(
name = "byte-buddy-agent",
coords = "net.bytebuddy:byte-buddy-agent:jar:1.9.12",
jar = "byte-buddy-agent-1.9.12.jar",
srcjar = "byte-buddy-agent-1.9.12-sources.jar",
)
12 changes: 12 additions & 0 deletions third_party/java/commons-codec/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "commons-codec",
coords = "commons-codec:commons-codec:jar:1.12",
jar = "commons-codec-1.12.jar",
srcjar = "commons-codec-1.12-sources.jar",
)
12 changes: 12 additions & 0 deletions third_party/java/commons-io/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "commons-io",
coords = "commons-io:commons-io:jar:2.6",
jar = "commons-io-2.6.jar",
srcjar = "commons-io-2.6-sources.jar",
)
12 changes: 12 additions & 0 deletions third_party/java/commons-logging/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "commons-logging",
coords = "commons-logging:commons-logging:jar:1.2",
jar = "commons-logging-1.2.jar",
srcjar = "commons-logging-1.2-sources.jar",
)
12 changes: 12 additions & 0 deletions third_party/java/commons-net/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "commons-net",
coords = "commons-net:commons-net:jar:3.6",
jar = "commons-net-3.6.jar",
srcjar = "commons-net-3.6-sources.jar",
)
29 changes: 29 additions & 0 deletions third_party/java/commons/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "commons-exec",
coords = "org.apache.commons:commons-exec:jar:1.3",
jar = "commons-exec-1.3.jar",
srcjar = "commons-exec-1.3-sources.jar",
)

maven_java_import(
name = "commons-lang3",
coords = "org.apache.commons:commons-lang3:jar:3.8.1",
jar = "commons-lang3-3.8.1.jar",
srcjar = "commons-lang3-3.8.1-sources.jar",
)

maven_java_import(
name = "commons-text",
coords = "org.apache.commons:commons-text:jar:1.6",
jar = "commons-text-1.6.jar",
srcjar = "commons-text-1.6-sources.jar",
deps = [
":commons-lang3",
],
)
40 changes: 40 additions & 0 deletions third_party/java/contrib/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "opentracing-concurrent",
coords = "io.opentracing.contrib:opentracing-concurrent:jar:0.1.0",
jar = "opentracing-concurrent-0.1.0.jar",
srcjar = "opentracing-concurrent-0.1.0-sources.jar",
deps = [
"//third_party/java/opentracing:opentracing-api",
"//third_party/java/opentracing:opentracing-noop",
],
)

maven_java_import(
name = "opentracing-okhttp3",
coords = "io.opentracing.contrib:opentracing-okhttp3:jar:0.1.0",
jar = "opentracing-okhttp3-0.1.0.jar",
srcjar = "opentracing-okhttp3-0.1.0-sources.jar",
deps = [
":opentracing-concurrent",
"//third_party/java/okhttp3:okhttp",
"//third_party/java/opentracing:opentracing-api",
"//third_party/java/opentracing:opentracing-noop",
],
)

maven_java_import(
name = "opentracing-tracerresolver",
coords = "io.opentracing.contrib:opentracing-tracerresolver:jar:0.1.5",
jar = "opentracing-tracerresolver-0.1.5.jar",
srcjar = "opentracing-tracerresolver-0.1.5-sources.jar",
deps = [
"//third_party/java/opentracing:opentracing-api",
"//third_party/java/opentracing:opentracing-util",
],
)
16 changes: 16 additions & 0 deletions third_party/java/enterprise/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "cdi-api",
coords = "javax.enterprise:cdi-api:jar:1.0",
jar = "cdi-api-1.0.jar",
srcjar = "cdi-api-1.0-sources.jar",
deps = [
"//third_party/java/annotation:jsr250-api",
"//third_party/java/inject:javax.inject",
],
)
15 changes: 15 additions & 0 deletions third_party/java/github/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "org.eclipse.egit.github.core",
coords = "org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:2.1.5",
jar = "org.eclipse.egit.github.core-2.1.5.jar",
srcjar = "org.eclipse.egit.github.core-2.1.5-sources.jar",
deps = [
"//third_party/java/gson",
],
)
12 changes: 12 additions & 0 deletions third_party/java/gson/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "gson",
coords = "com.google.code.gson:gson:jar:2.8.5",
jar = "gson-2.8.5.jar",
srcjar = "gson-2.8.5-sources.jar",
)
30 changes: 30 additions & 0 deletions third_party/java/guava/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "guava",
coords = "com.google.guava:guava:jar:27.1-jre",
jar = "guava-27.1-jre.jar",
srcjar = "guava-27.1-jre-sources.jar",
deps = [
":failureaccess",
":listenablefuture",
],
)

maven_java_import(
name = "listenablefuture",
coords = "com.google.guava:listenablefuture:jar:1.0",
jar = "listenablefuture-1.0.jar",
srcjar = "listenablefuture-1.0-sources.jar",
)

maven_java_import(
name = "failureaccess",
coords = "com.google.guava:failureaccess:jar:1.0.1",
jar = "failureaccess-1.0.1.jar",
srcjar = "failureaccess-1.0.1-sources.jar",
)
22 changes: 22 additions & 0 deletions third_party/java/hamcrest/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
load("//third_party/java:rules.bzl", "maven_java_import")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

maven_java_import(
name = "hamcrest-core",
coords = "org.hamcrest:hamcrest-core:jar:1.3",
jar = "hamcrest-core-1.3.jar",
srcjar = "hamcrest-core-1.3-sources.jar",
)

maven_java_import(
name = "hamcrest-library",
coords = "org.hamcrest:hamcrest-library:jar:1.3",
jar = "hamcrest-library-1.3.jar",
srcjar = "hamcrest-library-1.3-sources.jar",
deps = [
":hamcrest-core",
],
)
Loading

0 comments on commit 79c0e12

Please sign in to comment.