Mercurial > public > ssdtant
diff src/org/ssdt_ohio/tools/ant/AddDependencyTask.java @ 5:de1522a9d4bc
Ignore missing target in adddependency
author | smith@nwoca.org |
---|---|
date | Mon, 08 Aug 2011 13:38:54 -0400 |
parents | 82fc5e17cc59 |
children |
line wrap: on
line diff
--- a/src/org/ssdt_ohio/tools/ant/AddDependencyTask.java Thu Jun 09 12:24:29 2011 -0400 +++ b/src/org/ssdt_ohio/tools/ant/AddDependencyTask.java Mon Aug 08 13:38:54 2011 -0400 @@ -8,7 +8,6 @@ /** @author smith */ public class AddDependencyTask extends Task { - private String target; private String depends; @@ -22,13 +21,15 @@ } Target t = (Target) getProject().getTargets().get(target); + if (t != null) { - if (t.dependsOn(depends)) { - log(target + " already depends on " + depends, Project.MSG_VERBOSE); - } else { - log("Adding \"" + depends + "\" dependency to \"" + target + "\"", Project.MSG_VERBOSE); + if (t.dependsOn(depends)) { + log(target + " already depends on " + depends, Project.MSG_VERBOSE); + } else { + log("Adding \"" + depends + "\" dependency to \"" + target + "\"", Project.MSG_VERBOSE); - t.addDependency(depends); + t.addDependency(depends); + } } } @@ -40,4 +41,3 @@ this.depends = depends; } } -