Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java')
-rw-r--r--ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java78
1 files changed, 0 insertions, 78 deletions
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java
deleted file mode 100644
index 64e82167f..000000000
--- a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.tests.core.testplugin;
-
-
-import org.eclipse.ant.core.AntRunner;
-import org.eclipse.ant.tests.core.AbstractAntTest;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Responsible for running test ant build files.
- */
-public class AntFileRunner {
-
- private static final String BASE_DIR_PREFIX = "-Dbasedir="; //$NON-NLS-1$
-
- public void run(IFile buildFile, String[] targets, String[] args, String baseDir, boolean captureOutput) throws CoreException {
-
- AntRunner runner = new AntRunner();
-
- String[] runnerArgs = args;
-
- if (baseDir.length() > 0) {
- // Ant requires the working directory to be specified
- // as one of the arguments, so it needs to be appended.
- int length = 1;
- if (args != null) {
- length = args.length + 1;
- }
-
- runnerArgs = new String[length];
- if (args != null) {
- System.arraycopy(args, 0, runnerArgs, 0, args.length);
- }
- runnerArgs[length - 1] = BASE_DIR_PREFIX + baseDir;
- }
- runner.setArguments(runnerArgs);
-
- if (buildFile != null) {
- runner.setBuildFileLocation(buildFile.getLocation().toFile().toString());
- }
- if (targets != null && targets.length > 0) {
- runner.setExecutionTargets(targets);
- }
- if (captureOutput) {
- runner.addBuildLogger(AbstractAntTest.ANT_TEST_BUILD_LOGGER);
- }
-
- runner.run(null);
- }
-
- public void run(String[] args, String baseDir) throws Exception {
-
- AntRunner runner = new AntRunner();
-
- String[] runnerArgs = args;
-
- if (baseDir.length() > 0) {
- // Ant requires the working directory to be specified
- // as one of the arguments, so it needs to be appended.
- runnerArgs = new String[args.length + 1];
- System.arraycopy(args, 0, runnerArgs, 0, args.length);
- runnerArgs[args.length] = BASE_DIR_PREFIX + baseDir;
- }
- runner.setArguments(runnerArgs);
-
- runner.run(args);
- }
-}

Back to the top