diff options
author | Colin Marc <colinmarc@gmail.com> | 2016-05-03 15:50:01 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2016-05-03 21:31:26 +0000 |
commit | 5666be187ccafa49913dce6ab31b73cbd5b6d9c9 (patch) | |
tree | 4071b98c14ecd1a4ef7de5ff5ef5965ecab8707b /src/test/java/com/google/devtools | |
parent | f07b76e5fc9a07cbc0b2b45d5bfe8eb4b1ec2e03 (diff) |
Add a //file target to external jar repositories
Fixes https://github.com/bazelbuild/bazel/issues/990.
It's sometimes useful to be able to access the file pulled down
with maven_jar; for example, scala macro jars don't work with ijar,
so it's necessary to pull them into the compile-time classpath
unharmed.
--
Change-Id: I1d9e1cb30ea6fa56c18cbfcc68ee9b203524dfd4
Reviewed-on: https://bazel-review.googlesource.com/#/c/3550
MOS_MIGRATED_REVID=121379551
Diffstat (limited to 'src/test/java/com/google/devtools')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/repository/JarDecompressorTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/repository/JarDecompressorTest.java b/src/test/java/com/google/devtools/build/lib/rules/repository/JarDecompressorTest.java index 852640287b..76ee90d559 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/repository/JarDecompressorTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/repository/JarDecompressorTest.java @@ -50,6 +50,16 @@ public class JarDecompressorTest { } @Test + public void testTargets() throws Exception { + Path outputDir = DecompressorValue.decompress(descriptorBuilder.build()); + assertThat(outputDir.exists()).isTrue(); + String buildContent = + new String(FileSystemUtils.readContentAsLatin1(outputDir.getRelative("jar/BUILD"))); + assertThat(buildContent).contains("java_import"); + assertThat(buildContent).contains("filegroup"); + } + + @Test public void testWorkspaceGen() throws Exception { Path outputDir = DecompressorValue.decompress(descriptorBuilder.build()); assertThat(outputDir.exists()).isTrue(); |