Hello,

I have a problem with the ANT Deploy task. The error message is "java.net.MalformedURLException: unknown protocol: c". I have found in the archives that some people identified a bug that was giving the exact same message. The problem has been fixed at that time in catalina-ant.jar. However, I am running the latest versions of all libraries ... Here are the details:

Tomcat: installed from jakarta-tomcat-5.5.9.exe
Ant: version 1.6.4
Java: SUN'JVM "1.5.0_03"
OS:Windows XP

Ant script extract:

<target name="install">
   <deploy url="${manager.url}"
       username="${manager.username}"
       password="${manager.password}"
       path="${app.path}"
       localWar="file:/C:/Training/training.war"
    />
</target>

In order to valide the syntax of the localWar argument, I wrote the following program:

import ...

public class Test {

   public static void main(String args[]) {
       URL url = Test.class.getResource("/training.war");
       System.out.println(url);

       DeployTask deployTask = new DeployTask();
       deployTask.setLocalWar(url.toString());
       deployTask.setUsername(...);
       deployTask.setPassword(...);
       deployTask.setUrl(...);
       deployTask.setPath(...);
       deployTask.execute();
       return;
  }
}

I don't have the error message and the web app is indeed deployed. However, when I copy-paste the result of url.toString() in the XML version of the ANT script (cf. extract), I have the error message.

Any idea ?

Bertrand

_________________________________________________________________
Free blogging with MSN Spaces  http://spaces.msn.com/?mkt=nl-be


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to