Skip to content

Commit

Permalink
Fix a bug in jvm_compile.
Browse files Browse the repository at this point in the history
Not all JVM languages have runtime deps.
  • Loading branch information
Benjy committed Apr 7, 2014
1 parent 36f5bcb commit 30feb5d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/python/pants/tasks/jvm_compile/jvm_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,12 @@ def get_lang_specific_option(opt):
self._confs = context.config.getlist(config_section, 'confs', default=['default'])

# Runtime dependencies.
self._runtime_deps_key = self._language + '-runtime-deps'
runtime_deps = context.config.getlist(config_section, 'runtime-deps', default=[])
self.register_jvm_tool(self._runtime_deps_key, runtime_deps)
if runtime_deps:
self._runtime_deps_key = self._language + '-runtime-deps'
self.register_jvm_tool(self._runtime_deps_key, runtime_deps)
else:
self._runtime_deps_key = None

# Set up dep checking if needed.
def munge_flag(flag):
Expand Down Expand Up @@ -403,7 +406,8 @@ def execute(self, targets):
self._register_products(relevant_targets, sources_by_target, self._analysis_file)

# Update the classpath for downstream tasks.
runtime_deps = self._jvm_tool_bootstrapper.get_jvm_tool_classpath(self._runtime_deps_key)
runtime_deps = self._jvm_tool_bootstrapper.get_jvm_tool_classpath(self._runtime_deps_key) \
if self._runtime_deps_key else []
for conf in self._confs:
egroups.update_compatible_classpaths(group_id, [(conf, self._classes_dir)])
for dep in runtime_deps:
Expand Down

0 comments on commit 30feb5d

Please sign in to comment.