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

Richard B Knoll commented on CB-11186:
--------------------------------------

The issue is that we try and get a list of platforms to pass to the 
{{before_build}} and {{after_build}} hooks. The timeline looks like this:

{noformat}
before_build -> *Restore Platforms* -> before_prepare -> after_prepare -> 
before_compile -> after_compile -> after_build
{noformat}

Unfortunately, the platform restoration is part of prepare.js and not build.js, 
so this might get a little tricky. We might not be able to make build a true 
alias.


> "cordova build" fails while "cordova prepare && cordova compile" works
> ----------------------------------------------------------------------
>
>                 Key: CB-11186
>                 URL: https://issues.apache.org/jira/browse/CB-11186
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: 6.1.1
>         Environment: Ubuntu 15.10
>            Reporter: Lex Mourek
>            Priority: Minor
>              Labels: reproduced, triaged
>
> Cordova CLI help says {{cordova build}} is just an alias for {{cordova 
> prepare && cordova compile}}, but I got two different results:
> In confix.xml I have a few {{<plugin/>}}'s and {{<engine/>}}'s.
> Assume I have not built platforms and plugins yet ({{rm -rf plugins/ 
> platforms/}}):
> {code}
> $ cordova build
> Error: No platforms added to this project. Please use `cordova platform add 
> <platform>`.
> {code}
> {code}
> $ cordova prepare && cordova compile
> Restoring platform [email protected] referenced on config.xml
> Adding android project...
> Creating Cordova project for the Android platform:
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to