CB-10406 Fixes an exception, thrown when building using Ant. This closes #250

This commit is contained in:
Vladimir Kotikov 2016-01-21 11:56:54 +03:00
parent 9d3ee3d56e
commit 89d982a8e4

View File

@ -45,7 +45,7 @@ util.inherits(AntBuilder, GenericBuilder);
AntBuilder.prototype.getArgs = function(cmd, opts) { AntBuilder.prototype.getArgs = function(cmd, opts) {
var args = [cmd, '-f', path.join(this.root, 'build.xml')]; var args = [cmd, '-f', path.join(this.root, 'build.xml')];
// custom_rules.xml is required for incremental builds. // custom_rules.xml is required for incremental builds.
if (hasCustomRules()) { if (hasCustomRules(this.root)) {
args.push('-Dout.dir=ant-build', '-Dgen.absolute.dir=ant-gen'); args.push('-Dout.dir=ant-build', '-Dgen.absolute.dir=ant-gen');
} }
if(opts.packageInfo) { if(opts.packageInfo) {
@ -99,7 +99,7 @@ AntBuilder.prototype.prepEnv = function(opts) {
AntBuilder.prototype.build = function(opts) { AntBuilder.prototype.build = function(opts) {
// Without our custom_rules.xml, we need to clean before building. // Without our custom_rules.xml, we need to clean before building.
var ret = Q(); var ret = Q();
if (!hasCustomRules()) { if (!hasCustomRules(this.root)) {
// clean will call check_ant() for us. // clean will call check_ant() for us.
ret = this.clean(opts); ret = this.clean(opts);
} }