[
https://issues.apache.org/jira/browse/CB-6415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13963452#comment-13963452
]
ASF GitHub Bot commented on CB-6415:
------------------------------------
Github user martincgg commented on the pull request:
https://github.com/apache/cordova-cli/pull/158#issuecomment-39902600
I've tracked down this problem, and I've found the problem.
The custom path in check_requirements function in blackberry10_parser.js,
It looks for a custom path, declared into the project, under .cordova/config.js
and checks if exists any match with blackberry10.
When a blackberry library is cloned from Github.com, as
'cordova-blackberry', blackberry10 library is located under this cloned
repository, I assume that this settlement is because several blackberry
platforms can be added here, as it is for 'cordova-windows' that contains
windows8 and 7, or as windows-phone that contains wp7 and wp8.
Tracking this problem, I've found that lazy_load.js, joins the url and the
platform subdirectory:
https://github.com/apache/cordova-cli/blob/master/src/lazy_load.js#L63
Therefore, the requirements check, it should be handle under the same
conditions.
Adding path.join, it only will add the custom_path + 'blackberry10' --->
lib name and it will normalize the path as well.
> [Blackberry] Unable to add platform, using custom library
> ---------------------------------------------------------
>
> Key: CB-6415
> URL: https://issues.apache.org/jira/browse/CB-6415
> Project: Apache Cordova
> Issue Type: Bug
> Components: BlackBerry
> Affects Versions: 3.4.0
> Environment: Windows 7, Native development environment for
> blackberry10 properly configured.
> Reporter: Martin Gonzalez
> Assignee: Martin Gonzalez
> Labels: blackberry, blackberry10, cli
> Fix For: 3.5.0
>
>
> Working on some tests, for a new node module for cordova, I've found a
> problem when I try to work with custom libraries, this problem only applies
> to Blackberry, it doesn't resolve correctly a uri path in a config.json file,
> My configuration in the project:
> .cordova/config.json ---->
> {
> "id": "org.apache.cordova",
> "name": "mobilespec",
> "lib": {
> "blackberry10": {
> "uri": "C:\\Users\\Administrator\\cordova-blackberry"
> },
> "wp8": {
> "uri": "C:\\Users\\Administrator\\cordova-coho\\cordova-wp8"
> },
> "windows8": {
> "uri": "C:\\Users\\Administrator\\cordova-coho\\cordova-windows"
> }
> }
> }
> The problem is that it never resolves the path, with the folder that contains
> blackberry10 library, which is inside of cordova-blackberry.
> When I try to add the full path to the project:
> "blackberry10":{"uri":"C:\\Users\\Administrator\\cordova-coho\\cordova-blackberry\\blackberry10"}
> It pass the requirements check, but when it produce an error at running the
> command to add the project at superspawn.js.
> What's happening here is, that it pass the requirements check, but when it
> try to use the library use is trying to use this path:
> C:\\Users\\Administrator\\cord
> ova-blackberry\\blackberry10\\blackberry10\\bin\\create
> So the usage path is obtained trying to look for 'blackberry10', under
> 'cordova-blackberry', and the requirements check requires the whole path:
> "blackberry10":{"uri":"C:\\Users\\Administrator\\cordova-coho\\cordova-blackberry\\blackberry10"}
> According to my trace, the requirements check it should resolve the path
> correctly, looking under 'cordova-blackberry'.
> I'll assign this to me, I have a simple solution for it when custom paths are
> used.
--
This message was sent by Atlassian JIRA
(v6.2#6252)