You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jared Erickson (JIRA)" <ji...@apache.org> on 2013/09/05 18:34:52 UTC

[jira] [Commented] (CB-3015) create.bat error "Path not Found"

    [ https://issues.apache.org/jira/browse/CB-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13759206#comment-13759206 ] 

Jared Erickson commented on CB-3015:
------------------------------------

I also ran into this bug on Windows using PhoneGap 2.6.0 and 2.7.0.  Here is my fix:

function downloadAntContrib(){
    if (!fso.FileExists(ROOT + '\\bin\\templates\\project\\lib\\ant-contrib\\ant-contrib-1.0b3.jar')) {
      // We need the .jar
      var url = 'http://central.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar';
      var libPath = ROOT + '\\bin\\templates\\project\\lib';
      var libsPath = libPath + '\\ant-contrib';
      var savePath = libsPath + '\\ant-contrib-1.0b3.jar';
      if (!fso.FileExists(savePath)) {
        if (!fso.FolderExists(libPath)) {
            fso.CreateFolder(libPath);
        }
        if(!fso.FolderExists(libsPath)) {
            fso.CreateFolder(libsPath);
        }
        // We need the zip to get the jar
        var xhr = WScript.CreateObject('MSXML2.XMLHTTP');
        xhr.open('GET', url, false);
        xhr.send();
        if (xhr.status == 200) {
          var stream = WScript.CreateObject('ADODB.Stream');
          stream.Open();
          stream.Type = 1;
          stream.Write(xhr.ResponseBody);
          stream.Position = 0;
          stream.SaveToFile(savePath);
          stream.Close();
        } else {
          WScript.Echo('Could not retrieve the antcontrib. Please download it yourself and put into the bin/templates/project/lib directory. This process may fail now. Sorry.');
        }
      }
      //var app = WScript.CreateObject('Shell.Application');
      //var source = app.NameSpace(savePath).Items();
      //var target = app.NameSpace(libsPath);
      //target.CopyHere(source, 256);
    }
}
                
> create.bat error "Path not Found"
> ---------------------------------
>
>                 Key: CB-3015
>                 URL: https://issues.apache.org/jira/browse/CB-3015
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: BlackBerry
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Lorin Beer
>
> From the posting: https://groups.google.com/d/msg/phonegap/UKxdP-byW8M/qXcmFEhBGQMJ
> so, If I open a command prompt and navigate to the phonegap installation's blackberry folder and issue the following command:
> bin\create.bat c:\dev\test99 helloworld com.jwargo.helloworld
> I get an error that says:
> "c:\phonegap-2.6.0\lib\blackberry\bin\create.js>53, 13> Microsoft JScript runtime error: Path Not Found"
> Looking at the JavaScript file I see that the error is being generated by this line:
> fso.CreateFolder(libsPath);
> I've tried all sorts of permutations of the command line and I get the same error. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira