I wanted to execute an ant build file from java code using the org.apache.tools.ant.Project APIs.. Even though I was able to run the ant script successfully through the ant perspective of the IDE, I am getting error calling the script from java.. Not much information is available in using Project project = new Project(); project.init();..
Could anyone help me find more information in calling an ant build file from java code?
D:\Workspaces\SSDownload\SS Download\src\ddlutils-ant-build.xml:27: Could not parse or write data file D:\Workspaces\SSDownload\SS Download\src\db-data.xml
org.apache.ddlutils.DdlUtilsException: java.net.MalformedURLException: unknown protocol: d
This error I do not get running the build file directly!!! I am trying to migrate a database using the DDLUtils API inside the ant build file. Any tips?
Joined: Mar 22, 2005
That sounds like the path you're providing ("D:\...") can't be processed; at least that's what I think the "unknown protocol: d" might mean. Try prefixing it by "file:///" so that it becomes an actual URL (instead of a file name).