Same as this issue: MFP CLI 7.1 adapter wont deploy with mfp push command
But the stated solution of running mfp deploy is not the best solution I think.
Running mfp deploy DOES technically work, but it is deprecated.
Why does mfp push not push my adapters?
In my case, I have a cordova project (CordovaTest). Inside that project I have created my mobilefirst runtime that I made with mfp create (CordovaTestMobileFirst). Inside that runtime I have created my adapter (CordovaTestAdapter). Running mfp push outputs the following:
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.
At this point, the adapter is not deployed. I must run mfp deploy in order for the adapter to deploy.
Regarding the above output, I expect that running mfp push from the adapters/CordovaTestAdapter directory would only build and deploy the adapter, not the entire project. It seems to behave as though I were in the root project folder. It builds and pushes the Cordova project anyway.
I've created a runtime without cordova, and added an adapter to it. When I ran mfp push from the runtime's root directory, it pushes the adapter successfully. Seems like this issue only exists for runtimes inside a Cordova project.
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.