@@ -218,7 +218,7 @@ public final class MagicNames { | |||||
* Value: {@value} | * Value: {@value} | ||||
*/ | */ | ||||
public static final String PROJECT_HELPER_SERVICE = | public static final String PROJECT_HELPER_SERVICE = | ||||
"META-INF/services/org.apache.tools.ant.ProjectHelper"; | |||||
"META-INF/services/" + PROJECT_HELPER_CLASS; | |||||
/** | /** | ||||
* Name of ProjectHelper reference that we add to a project. | * Name of ProjectHelper reference that we add to a project. | ||||
@@ -465,7 +465,7 @@ public abstract class Definer extends DefBase { | |||||
} | } | ||||
if (!antlib.startsWith(MagicNames.ANTLIB_PREFIX)) { | if (!antlib.startsWith(MagicNames.ANTLIB_PREFIX)) { | ||||
throw new BuildException( | throw new BuildException( | ||||
"Invalid antlib attribute - it must start with antlib:"); | |||||
"Invalid antlib attribute - it must start with " + MagicNames.ANTLIB_PREFIX); | |||||
} | } | ||||
setURI(antlib); | setURI(antlib); | ||||
this.resource = antlib.substring(MagicNames.ANTLIB_PREFIX.length()).replace('.', '/') | this.resource = antlib.substring(MagicNames.ANTLIB_PREFIX.length()).replace('.', '/') | ||||
@@ -92,7 +92,7 @@ public class ExecutorTest implements BuildListener { | |||||
private Project getProject(String e, boolean f, boolean k) { | private Project getProject(String e, boolean f, boolean k) { | ||||
Project p = buildRule.getProject(); | Project p = buildRule.getProject(); | ||||
p.setNewProperty("ant.executor.class", e); | |||||
p.setNewProperty(MagicNames.ANT_EXECUTOR_CLASSNAME, e); | |||||
p.setKeepGoingMode(k); | p.setKeepGoingMode(k); | ||||
if (f) { | if (f) { | ||||
p.setNewProperty("failfoo", "foo"); | p.setNewProperty("failfoo", "foo"); | ||||
@@ -37,6 +37,7 @@ import java.util.Properties; | |||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.BuildFileRule; | import org.apache.tools.ant.BuildFileRule; | ||||
import org.apache.tools.ant.MagicNames; | |||||
import org.apache.tools.ant.util.regexp.RegexpMatcherFactory; | import org.apache.tools.ant.util.regexp.RegexpMatcherFactory; | ||||
import org.junit.After; | import org.junit.After; | ||||
import org.junit.Before; | import org.junit.Before; | ||||
@@ -182,7 +183,7 @@ public class EchoPropertiesTest { | |||||
buildRule.executeTarget("testWithRegex"); | buildRule.executeTarget("testWithRegex"); | ||||
// the following line has been changed from checking ant.home to ant.version | // the following line has been changed from checking ant.home to ant.version | ||||
// so the test will still work when run outside of an Ant script | // so the test will still work when run outside of an Ant script | ||||
assertThat(buildRule.getFullLog(), containsString("ant.version=")); | |||||
assertThat(buildRule.getFullLog(), containsString(MagicNames.ANT_VERSION + "=")); | |||||
} | } | ||||
private void testEchoPrefixVarious(String target) throws Exception { | private void testEchoPrefixVarious(String target) throws Exception { | ||||