You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@apache.org on 2002/05/04 12:30:45 UTC
cvs commit: jakarta-ant/proposal/mutant/src/java/start/org/apache/ant/start Main.java
conor 02/05/04 03:30:44
Modified: proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser
ProjectHandler.java
proposal/mutant/src/java/init/org/apache/ant/init
InitConfig.java
proposal/mutant/src/java/start/org/apache/ant/start
Main.java
Log:
Keep gumpalump happy
Revision Changes Path
1.7 +1 -5 jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ProjectHandler.java
Index: ProjectHandler.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ProjectHandler.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -u -r1.6 -r1.7
--- ProjectHandler.java 17 Apr 2002 15:51:06 -0000 1.6
+++ ProjectHandler.java 4 May 2002 10:30:44 -0000 1.7
@@ -173,17 +173,13 @@
} catch (ModelException e) {
throw new SAXParseException(e.getMessage(), getLocator(), e);
}
- } else if (localName != null) {
+ } else {
// everything else is a task
BuildElementHandler buildElementHandler = new BuildElementHandler();
buildElementHandler.start(getParseContext(), getXMLReader(),
this, getLocator(), attributes, getElementSource(),
qualifiedName);
project.addTask(buildElementHandler.getBuildElement());
- } else {
- // ignore namespaced elements
- throw new SAXParseException("namespace support is not "
- + "currently recognized (" + qualifiedName + ")", getLocator());
}
}
1.7 +6 -4 jakarta-ant/proposal/mutant/src/java/init/org/apache/ant/init/InitConfig.java
Index: InitConfig.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/init/org/apache/ant/init/InitConfig.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -u -r1.6 -r1.7
--- InitConfig.java 4 Apr 2002 04:36:13 -0000 1.6
+++ InitConfig.java 4 May 2002 10:30:44 -0000 1.7
@@ -116,11 +116,12 @@
/**
* Constructor for the Initialization configuration
*
+ * @param libraryClass - a class loaded from the Ant library area.
* @exception InitException if the configuration cannot be initialized
*/
- public InitConfig() throws InitException {
+ public InitConfig(Class libraryClass) throws InitException {
try {
- URL antLibURL = getAntLibURL();
+ URL antLibURL = getAntLibURL(libraryClass);
setLibraryURL(antLibURL);
URL antHome = new URL(antLibURL, "..");
@@ -331,12 +332,13 @@
/**
* Get a URL to the Ant Library directory.
*
+ * @param libraryClass - a class loaded from the Ant library area.
* @return the URL for the Ant library directory
* @throws MalformedURLException if there is a problem constructing the
* library URL
*/
- private URL getAntLibURL() throws MalformedURLException {
- URL initClassURL = ClassLocator.getClassLocationURL(getClass());
+ private URL getAntLibURL(Class libraryClass) throws MalformedURLException {
+ URL initClassURL = ClassLocator.getClassLocationURL(libraryClass);
String initURLString = initClassURL.toString();
int index = initURLString.lastIndexOf("/");
1.12 +3 -3 jakarta-ant/proposal/mutant/src/java/start/org/apache/ant/start/Main.java
Index: Main.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/start/org/apache/ant/start/Main.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -u -r1.11 -r1.12
--- Main.java 12 Apr 2002 14:59:57 -0000 1.11
+++ Main.java 4 May 2002 10:30:44 -0000 1.12
@@ -135,7 +135,7 @@
public void start(String frontend, String defaultClass, String[] args)
throws InitException {
try {
- InitConfig config = new InitConfig();
+ InitConfig config = new InitConfig(getClass());
URL frontendJar = new URL(config.getLibraryURL(),
"frontend/" + frontend + ".jar");
@@ -149,8 +149,8 @@
if (frontendJar.getProtocol().equals("file")) {
File jarFile = new File(frontendJar.getFile());
if (!jarFile.exists()) {
- throw new InitException("Could not jar for frontend \""
- + frontend + "\"");
+ throw new InitException("Could not find jar for frontend \""
+ + frontend + "\" - expected at " + frontendJar);
}
}
String mainClass = getMainClass(frontendJar);
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>