From e9f737b8732e6c988402998824707f9245271259 Mon Sep 17 00:00:00 2001 From: Ity Kaul Date: Mon, 28 Jul 2014 20:47:40 -0700 Subject: [PATCH] Added benchmark target to maven_layout() Testing done: https://travis-ci.org/pantsbuild/pants/builds/31105013 Reviewed at: https://rbcommons.com/s/twitter/r/780 --- BUILD | 2 +- src/python/pants/backend/maven_layout/maven_layout.py | 9 +++++---- src/scala/com/pants/testproject/javasources/BUILD | 6 ++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/BUILD b/BUILD index 2efed910c21..ec664837793 100644 --- a/BUILD +++ b/BUILD @@ -7,7 +7,7 @@ source_root('src/java', annotation_processor, jvm_binary, java_library, page) source_root('src/protobuf', java_protobuf_library, page) source_root('src/python', page, python_binary, python_library, resources) source_root('src/resources', page, resources, jaxb_library) -source_root('src/scala', jvm_binary, page, scala_library) +source_root('src/scala', jvm_binary, page, scala_library, benchmark) source_root('src/thrift', java_thrift_library, page, python_thrift_library) source_root('tests/java', java_library, junit_tests, page) diff --git a/src/python/pants/backend/maven_layout/maven_layout.py b/src/python/pants/backend/maven_layout/maven_layout.py index 88cc130e2ca..1e383a53a74 100644 --- a/src/python/pants/backend/maven_layout/maven_layout.py +++ b/src/python/pants/backend/maven_layout/maven_layout.py @@ -15,6 +15,7 @@ from pants.backend.core.targets.doc import Page from pants.backend.core.targets.resources import Resources from pants.backend.jvm.targets.annotation_processor import AnnotationProcessor +from pants.backend.jvm.targets.benchmark import Benchmark from pants.backend.jvm.targets.java_agent import JavaAgent from pants.backend.jvm.targets.java_library import JavaLibrary from pants.backend.jvm.targets.java_tests import JavaTests @@ -42,15 +43,15 @@ def root(path, *types): SourceRoot.register(os.path.join(parse_context.rel_path, basedir, path), *types) root('src/main/antlr', JavaAntlrLibrary, Page, PythonAntlrLibrary) - root('src/main/java', AnnotationProcessor, JavaAgent, JavaLibrary, JvmBinary, Page) + root('src/main/java', AnnotationProcessor, JavaAgent, JavaLibrary, JvmBinary, Page, Benchmark) root('src/main/protobuf', JavaProtobufLibrary, Page) root('src/main/python', Page, PythonBinary, PythonLibrary) root('src/main/resources', Page, Resources) - root('src/main/scala', JvmBinary, Page, ScalaLibrary) + root('src/main/scala', JvmBinary, Page, ScalaLibrary, Benchmark) root('src/main/thrift', JavaThriftLibrary, Page, PythonThriftLibrary) - root('src/test/java', JavaLibrary, JavaTests, Page) + root('src/test/java', JavaLibrary, JavaTests, Page, Benchmark) root('src/test/python', Page, PythonLibrary, PythonTests) root('src/test/resources', Page, Resources) - root('src/test/scala', JavaTests, Page, ScalaLibrary, ScalaTests) + root('src/test/scala', JavaTests, Page, ScalaLibrary, ScalaTests, Benchmark) diff --git a/src/scala/com/pants/testproject/javasources/BUILD b/src/scala/com/pants/testproject/javasources/BUILD index 46174db0e01..7998dda8eaa 100644 --- a/src/scala/com/pants/testproject/javasources/BUILD +++ b/src/scala/com/pants/testproject/javasources/BUILD @@ -9,3 +9,9 @@ scala_library( ], sources = rglobs('*.scala') ) + +benchmark(name='benchmark', + dependencies=[ + ], + sources=rglobs('com/pants/testproject/javasources/*.scala') +)