summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2017-04-13 14:14:55 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2017-04-13 14:14:55 +0900
commitc80d8c59013804c5709bd873a2fec96f03dedbcc (patch)
tree4cc7ce0058c587f2cf3a4afe6eeb9bc7c9d2515c
parentfe5437e96b91222e30d9105e7bab490fd68c2d52 (diff)
downloadjgit-c80d8c59013804c5709bd873a2fec96f03dedbcc.tar.gz
jgit-c80d8c59013804c5709bd873a2fec96f03dedbcc.zip
Bazel: Restrict src globs to Java source files
Generating the src list with an unrestricted wildcard causes all files in the source tree to be included. This results in junk files such as .orig (generated during merge conflict resolution) to be included, which causes in a build error: in srcs attribute of java_library rule //org.eclipse.jgit:jgit: file '//org.eclipse.jgit:src/org/eclipse/jgit/gitrepo/RepoCommand.java.orig' is misplaced here (expected .java, .srcjar or .properties). Modify the globs to only include Java source files. Change-Id: Iaef3db33ac71d71047cd28acb0378e15cb09ece9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r--org.eclipse.jgit.archive/BUILD2
-rw-r--r--org.eclipse.jgit.http.apache/BUILD2
-rw-r--r--org.eclipse.jgit.http.server/BUILD2
-rw-r--r--org.eclipse.jgit.junit.http/BUILD2
-rw-r--r--org.eclipse.jgit.junit/BUILD2
-rw-r--r--org.eclipse.jgit.lfs.server/BUILD2
-rw-r--r--org.eclipse.jgit.lfs/BUILD2
-rw-r--r--org.eclipse.jgit.pgm/BUILD2
-rw-r--r--org.eclipse.jgit.ui/BUILD2
-rw-r--r--org.eclipse.jgit/BUILD2
10 files changed, 10 insertions, 10 deletions
diff --git a/org.eclipse.jgit.archive/BUILD b/org.eclipse.jgit.archive/BUILD
index dfdbfdccba..8c65fc0181 100644
--- a/org.eclipse.jgit.archive/BUILD
+++ b/org.eclipse.jgit.archive/BUILD
@@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "jgit-archive",
srcs = glob(
- ["src/**"],
+ ["src/**/*.java"],
exclude = ["src/org/eclipse/jgit/archive/FormatActivator.java"],
),
resource_strip_prefix = "org.eclipse.jgit.archive/resources",
diff --git a/org.eclipse.jgit.http.apache/BUILD b/org.eclipse.jgit.http.apache/BUILD
index c1538ab1c6..5ea118c732 100644
--- a/org.eclipse.jgit.http.apache/BUILD
+++ b/org.eclipse.jgit.http.apache/BUILD
@@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "http-apache",
- srcs = glob(["src/**"]),
+ srcs = glob(["src/**/*.java"]),
resource_strip_prefix = "org.eclipse.jgit.http.apache/resources",
resources = glob(["resources/**"]),
deps = [
diff --git a/org.eclipse.jgit.http.server/BUILD b/org.eclipse.jgit.http.server/BUILD
index 876c5fa85f..9d5673b14a 100644
--- a/org.eclipse.jgit.http.server/BUILD
+++ b/org.eclipse.jgit.http.server/BUILD
@@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "jgit-servlet",
- srcs = glob(["src/**"]),
+ srcs = glob(["src/**/*.java"]),
resource_strip_prefix = "org.eclipse.jgit.http.server/resources",
resources = glob(["resources/**"]),
deps = [
diff --git a/org.eclipse.jgit.junit.http/BUILD b/org.eclipse.jgit.junit.http/BUILD
index be6e1ae3ba..2a29accd1b 100644
--- a/org.eclipse.jgit.junit.http/BUILD
+++ b/org.eclipse.jgit.junit.http/BUILD
@@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "junit-http",
testonly = 1,
- srcs = glob(["src/**"]),
+ srcs = glob(["src/**/*.java"]),
resources = glob(["resources/**"]),
# TODO(davido): we want here provided deps
deps = [
diff --git a/org.eclipse.jgit.junit/BUILD b/org.eclipse.jgit.junit/BUILD
index 350b25f97d..74498fdf62 100644
--- a/org.eclipse.jgit.junit/BUILD
+++ b/org.eclipse.jgit.junit/BUILD
@@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "junit",
testonly = 1,
- srcs = glob(["src/**"]),
+ srcs = glob(["src/**/*.java"]),
resource_strip_prefix = "org.eclipse.jgit.junit/resources",
resources = glob(["resources/**"]),
deps = [
diff --git a/org.eclipse.jgit.lfs.server/BUILD b/org.eclipse.jgit.lfs.server/BUILD
index fa14e8a206..f3b9005f94 100644
--- a/org.eclipse.jgit.lfs.server/BUILD
+++ b/org.eclipse.jgit.lfs.server/BUILD
@@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "jgit-lfs-server",
- srcs = glob(["src/**"]),
+ srcs = glob(["src/**/*.java"]),
resource_strip_prefix = "org.eclipse.jgit.lfs.server/resources",
resources = glob(["resources/**"]),
deps = [
diff --git a/org.eclipse.jgit.lfs/BUILD b/org.eclipse.jgit.lfs/BUILD
index c4c9f8aad3..0c7b1b2c4c 100644
--- a/org.eclipse.jgit.lfs/BUILD
+++ b/org.eclipse.jgit.lfs/BUILD
@@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "jgit-lfs",
- srcs = glob(["src/**"]),
+ srcs = glob(["src/**/*.java"]),
resource_strip_prefix = "org.eclipse.jgit.lfs/resources",
resources = glob(["resources/**"]),
deps = [
diff --git a/org.eclipse.jgit.pgm/BUILD b/org.eclipse.jgit.pgm/BUILD
index 6d3279031e..07922687e3 100644
--- a/org.eclipse.jgit.pgm/BUILD
+++ b/org.eclipse.jgit.pgm/BUILD
@@ -1,6 +1,6 @@
java_library(
name = "pgm",
- srcs = glob(["src/**"]),
+ srcs = glob(["src/**/*.java"]),
resource_strip_prefix = "org.eclipse.jgit.pgm/resources",
resources = glob(["resources/**"]),
visibility = ["//visibility:public"],
diff --git a/org.eclipse.jgit.ui/BUILD b/org.eclipse.jgit.ui/BUILD
index 85ae5c0847..eec4a384db 100644
--- a/org.eclipse.jgit.ui/BUILD
+++ b/org.eclipse.jgit.ui/BUILD
@@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "ui",
- srcs = glob(["src/**"]),
+ srcs = glob(["src/**/*.java"]),
resource_strip_prefix = "org.eclipse.jgit.ui/resources",
resources = glob(["resources/**"]),
deps = ["//org.eclipse.jgit:jgit"],
diff --git a/org.eclipse.jgit/BUILD b/org.eclipse.jgit/BUILD
index 75f4fe69c1..a8a53f2742 100644
--- a/org.eclipse.jgit/BUILD
+++ b/org.eclipse.jgit/BUILD
@@ -5,7 +5,7 @@ INSECURE_CIPHER_FACTORY = [
]
SRCS = glob(
- ["src/**"],
+ ["src/**/*.java"],
exclude = INSECURE_CIPHER_FACTORY,
)