@@ -824,7 +824,7 @@ public class ComponentHelper { | |||||
if (uri.isEmpty()) { | if (uri.isEmpty()) { | ||||
uri = ProjectHelper.ANT_CORE_URI; | uri = ProjectHelper.ANT_CORE_URI; | ||||
} | } | ||||
if (!uri.startsWith(ProjectHelper.ANTLIB_URI)) { | |||||
if (!uri.startsWith(MagicNames.ANTLIB_PREFIX)) { | |||||
return; // namespace that does not contain antlib | return; // namespace that does not contain antlib | ||||
} | } | ||||
if (checkedNamespaces.contains(uri)) { | if (checkedNamespaces.contains(uri)) { | ||||
@@ -38,7 +38,7 @@ import org.xml.sax.AttributeList; | |||||
*/ | */ | ||||
public class ProjectHelper { | public class ProjectHelper { | ||||
/** The URI for ant name space */ | /** The URI for ant name space */ | ||||
public static final String ANT_CORE_URI = "antlib:org.apache.tools.ant"; | |||||
public static final String ANT_CORE_URI = MagicNames.ANTLIB_PREFIX + "org.apache.tools.ant"; | |||||
/** The URI for antlib current definitions */ | /** The URI for antlib current definitions */ | ||||
public static final String ANT_CURRENT_URI = "ant:current"; | public static final String ANT_CURRENT_URI = "ant:current"; | ||||
@@ -49,7 +49,7 @@ public class ProjectHelper { | |||||
public static final String ANT_ATTRIBUTE_URI = "ant:attribute"; | public static final String ANT_ATTRIBUTE_URI = "ant:attribute"; | ||||
/** The URI for defined types/tasks - the format is antlib:<package> */ | /** The URI for defined types/tasks - the format is antlib:<package> */ | ||||
public static final String ANTLIB_URI = "antlib:"; | |||||
public static final String ANTLIB_URI = MagicNames.ANTLIB_PREFIX; | |||||
/** Polymorphic attribute */ | /** Polymorphic attribute */ | ||||
public static final String ANT_TYPE = "ant-type"; | public static final String ANT_TYPE = "ant-type"; | ||||
@@ -463,12 +463,12 @@ public abstract class Definer extends DefBase { | |||||
if (definerSet) { | if (definerSet) { | ||||
tooManyDefinitions(); | tooManyDefinitions(); | ||||
} | } | ||||
if (!antlib.startsWith("antlib:")) { | |||||
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 antlib:"); | ||||
} | } | ||||
setURI(antlib); | setURI(antlib); | ||||
this.resource = antlib.substring("antlib:".length()).replace('.', '/') | |||||
this.resource = antlib.substring(MagicNames.ANTLIB_PREFIX.length()).replace('.', '/') | |||||
+ "/antlib.xml"; | + "/antlib.xml"; | ||||
definerSet = true; | definerSet = true; | ||||
} | } | ||||