def build_libs_dir(self, target, ivyxml, conf): all_deps = OrderedSet() all_sources = ['dummy'] def extract_jars(ttarget): for jar_dep in ttarget.jar_dependencies: if jar_dep.rev: all_deps.add(copy(jar_dep)) target.walk(extract_jars) def create_meta_target(): return JavaLibrary(target.name + '.deps', all_sources, dependencies = all_deps, is_meta = True) meta_target = target.do_in_context(create_meta_target) local_ivy = os.path.abspath(ivyxml) + ".local" AntBuilder.generate_ivy(self.workspace_root, local_ivy, meta_target) libs_dir = os.path.join(os.path.dirname(os.path.abspath(ivyxml)), 'libs', conf) if not os.path.exists(libs_dir): os.makedirs(libs_dir) classpath_result = subprocess.call([ 'java', '-jar', self.ivy_jar, '-settings', self.ivy_settings, '-ivy', local_ivy, '-confs', conf, '-retrieve', "%s/[artifact]-[revision].[ext]" % libs_dir, "-symlink", "-sync"])
def _generate_ivy(self, ide_target): jvmbuilder = AntBuilder(self.error, self.root_dir) antargs = [] if self.options.clean: antargs.extend([ 'clean-all', 'compile' ]) _, ivyfile, _ = jvmbuilder.generate_and_build([ide_target], antargs, name = self.project_name) return ivyfile, os.path.join(self.root_dir, 'build-support', 'ivy', 'ivysettings.xml')
def _jvm_build(self, targets): try: # TODO(John Sirois): think about moving away from the ant backend executor = AntBuilder(self.error, self.root_dir, self.is_ide, self.ide_transitivity) if self.options.quiet: self.build_args.insert(0, "-logger") self.build_args.insert(1, "org.apache.tools.ant.NoBannerLogger") self.build_args.insert(2, "-q") return executor.build(targets, self.build_args) except: self.error("Problem executing AntBuilder for targets %s: %s" % (targets, traceback.format_exc()))
def _jvm_build(self, targets): try: # TODO(John Sirois): think about moving away from the ant backend executor = AntBuilder(self.error, self.root_dir) if self.options.quiet: self.build_args.insert(0, "-logger") self.build_args.insert(1, "org.apache.tools.ant.NoBannerLogger") self.build_args.insert(2, "-q") if self.options.time: self.build_args.insert(0, "-lib") self.build_args.insert(1, "build-support/antlib") self.build_args.insert(2, "-listener") self.build_args.insert(3, "net.sf.antcontrib.perf.AntPerformanceListener") return executor.build(targets, self.build_args) except: self.error("Problem executing AntBuilder for targets %s: %s" % (targets, traceback.format_exc()))
def _jvm_build(self, targets): try: # TODO(John Sirois): think about moving away from the ant backend executor = AntBuilder(self.error, self.root_dir) if self.options.quiet: self.build_args.insert(0, "-logger") self.build_args.insert(1, "org.apache.tools.ant.NoBannerLogger") self.build_args.insert(2, "-q") if self.options.time: self.build_args.insert(0, "-lib") self.build_args.insert(1, "build-support/antlib") self.build_args.insert(2, "-listener") self.build_args.insert( 3, "net.sf.antcontrib.perf.AntPerformanceListener") return executor.build(targets, self.build_args) except: self.error("Problem executing AntBuilder for targets %s: %s" % (targets, traceback.format_exc()))
def create_ivyxml(self, target): builder = AntBuilder(self.error, self.workspace_root, False, False) buildxml, ivyxml = builder.create_ant_builds(self.workspace_root, dict(), set(), target) return ivyxml
def _create_ivy_file(self, target): ivy_file = os.path.abspath(os.path.join(self.target_path, 'ivy.xml')) AntBuilder.generate_ivy(self.root_dir, ivy_file, target) return ivy_file
def _create_ivy_file(self, target, target_path): ivy_file = os.path.abspath(os.path.join(target_path, 'ivy.xml')) AntBuilder.generate_ivy(self.root_dir, ivy_file, target) return ivy_file