IBM MobileFirst Platform(mfp)CLI 7.1适配器不会使用mfp push命令进行部署

时间:2017-04-06 18:39:44

标签: cordova ibm-mobilefirst mobilefirst-adapters mobilefirst-cli

与此问题相同:MFP CLI 7.1 adapter wont deploy with mfp push command

但是我所说的运行mfp deploy的解决方案不是我认为的最佳解决方案。

运行mfp deploy DOES技术上有用,但不推荐使用。

为什么mfp推不推我的适配器?

就我而言,我有一个cordova项目(CordovaTest)。在该项目中,我创建了我使用mfp create(CordovaTestMobileFirst)创建的mobilefirst运行时。在那个运行时里面我创建了我的适配器(CordovaTestAdapter)。运行mfp push输出以下内容:

c:\ecomproj\CordovaTest\CordovaTestMobileFirst\adapters\CordovaTestAdapter>mfp push
Preparing for push...
Verifying Server Configuration...
Runtime 'CordovaTestMobileFirst' will be used to push the project into.
Embedded Cordova Command: cordova prepare android
Embedded Cordova Command: cordova prepare ios
Pushing to Server...
Deploying c:\ecomproj\CordovaTest\mobilefirst\com_ibm_CordovaTest-android-1.0.0.wlapp...
Deploy complete for c:\ecomproj\CordovaTest\mobilefirst\com_ibm_CordovaTest-android-1.0.0.wlapp.
Deploying c:\ecomproj\CordovaTest\mobilefirst\com_ibm_CordovaTest-iphone-1.0.0.wlapp...
Deploy complete for c:\ecomproj\CordovaTest\mobilefirst\com_ibm_CordovaTest-iphone-1.0.0.wlapp.
c:\ecomproj\CordovaTest\mobilefirst\com_ibm_CordovaTest-android-1.0.0.wlapp has been deployed.
c:\ecomproj\CordovaTest\mobilefirst\com_ibm_CordovaTest-iphone-1.0.0.wlapp has been deployed.
Push Completed Successfully.

此时,未部署适配器。我必须运行mfp deploy才能部署适配器。

关于上面的输出,我希望从adapter / CordovaTestAdapter目录运行mfp push只会构建和部署适配器,而不是整个项目。它似乎表现得好像我在根项目文件夹中。无论如何,它构建并推动了Cordova项目。

我创建了一个没有cordova的运行时,并为其添加了一个适配器。当我从运行时的根目录运行mfp push时,它成功地推送了适配器。似乎这个问题仅存在于Cordova项目内的运行时。

c:\ecomproj\MobileFirstTest2>mfp push
Preparing for push...
Verifying Server Configuration...
Runtime 'MobileFirstTest2' will be used to push the project into.
Pushing to Server...
Deploying c:\ecomproj\MobileFirstTest2\bin\MobileFirstTest2Adapter.adapter...
Deploy complete for c:\ecomproj\MobileFirstTest2\bin\MobileFirstTest2Adapter.adapter.
c:\ecomproj\MobileFirstTest2\bin\MobileFirstTest2Adapter.adapter has been deployed.
Push Completed Successfully.

0 个答案:

没有答案