@Test public void taskEchoTest(){ if(LINUX){ Variable var=new Variable(); var.setKey("~"); var.setValue("/"); try { Project p; String targetName="NAME"; p=Task.buildSimpleProject(targetName,"echo"); p.executeTarget(targetName); } catch (Exception e){ e.printStackTrace(); Assert.fail(e.getLocalizedMessage()); } } else if(WINDOWS){ } }
public static Project buildSimpleProject(String targetName, String... executables) throws IllegalArgumentException { final Project project = new Project(); Target target = new Target(); target.setName(targetName); target.setProject(project); addToTarget(target, buildTask(executables)); project.addTarget(target); project.setDefault(target.getName()); project.init(); return project; }
Task { public static Project buildSimpleProject(String targetName, String... executables) throws IllegalArgumentException { final Project project = new Project(); Target target = new Target(); target.setName(targetName); target.setProject(project); addToTarget(target, buildTask(executables)); project.addTarget(target); project.setDefault(target.getName()); project.init(); return project; } }
Task { public static Project buildSimpleProject(String targetName, String... executables) throws IllegalArgumentException { final Project project = new Project(); Target target = new Target(); target.setName(targetName); target.setProject(project); addToTarget(target, buildTask(executables)); project.addTarget(target); project.setDefault(target.getName()); project.init(); return project; }  }
Task { public static Project buildSimpleProject(String targetName, String... executables) throws IllegalArgumentException { final Project project = new Project(); Target target = new Target(); target.setName(targetName); target.setProject(project); addToTarget(target, buildTask(executables)); project.addTarget(target); project.setDefault(target.getName()); project.init(); return project; }  static void updateEnv(final File props, Environment env); static Variable[] loadVars(final File props); static Project buildSimpleProject(String targetName, String... executables); static Project buildSimpleProject(String targetName, org.apache.tools.ant.Task... tasks); static Project buildProject(final Target... targets); static int connectTargets(final Project project, final boolean updateChild,
                                     final boolean updateParent, final Target... targets); static int connectTasks(final Target target, final boolean updateChild,
                                   final boolean updateParent, final org.apache.tools.ant.Task... tasks); static void addToProject(final Project project, final Target... targets); static void addToTarget(final Target target, final org.apache.tools.ant.Task... tasks); static ExecTask buildTask(final String executable, final File workingDir, final String[] args,
                                     final Variable[] envVars); static ExecTask[] buildTask(String... executables); static ExecTask buildTask(String executable, String[] args); }
Task { public static Project buildSimpleProject(String targetName, String... executables) throws IllegalArgumentException { final Project project = new Project(); Target target = new Target(); target.setName(targetName); target.setProject(project); addToTarget(target, buildTask(executables)); project.addTarget(target); project.setDefault(target.getName()); project.init(); return project; }  static void updateEnv(final File props, Environment env); static Variable[] loadVars(final File props); static Project buildSimpleProject(String targetName, String... executables); static Project buildSimpleProject(String targetName, org.apache.tools.ant.Task... tasks); static Project buildProject(final Target... targets); static int connectTargets(final Project project, final boolean updateChild,
                                     final boolean updateParent, final Target... targets); static int connectTasks(final Target target, final boolean updateChild,
                                   final boolean updateParent, final org.apache.tools.ant.Task... tasks); static void addToProject(final Project project, final Target... targets); static void addToTarget(final Target target, final org.apache.tools.ant.Task... tasks); static ExecTask buildTask(final String executable, final File workingDir, final String[] args,
                                     final Variable[] envVars); static ExecTask[] buildTask(String... executables); static ExecTask buildTask(String executable, String[] args);  }