You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergey Grebnov (JIRA)" <ji...@apache.org> on 2015/01/12 17:53:34 UTC

[jira] [Reopened] (CB-8216) Adding plugins by relative path fails when CWD is not the project root

     [ https://issues.apache.org/jira/browse/CB-8216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Grebnov reopened CB-8216:
--------------------------------
      Assignee: Sergey Grebnov  (was: Andrew Grieve)

Re-opining since this fix breaks createmobilespec.js script when running on Medic

Error details:
{code}
Adding plugin tests using CLI...
Fetching plugin "plugins\org.apache.cordova.battery-status\tests" via plugin registry
npm ERR! addLocal Could not install plugins\org.apache.cordova.battery-status\tests
Error: ENOENT, open 'C:\bbot\win\AndroidWin\build\mobilespec\plugins\org.apache.cordova.battery-status\tests\package.json'
Creating project from local git repos. If you have any errors, it may be from missing repositories.
{code}
Full output:
{code}
  ./cordova-coho/coho repo-clone -r mobile-spec -r plugin-test-framework -r cli -r lib -r plugman -r android -r js -r plugins
  mkdir cordova-cli/node_modules
  (cd cordova-lib/cordova-lib/ && npm install)
  (cd cordova-plugman/ && npm install)
  mkdir cordova-cli/node_modules
  ln -s ../../cordova-lib/cordova-lib cordova-cli/node_modules
  (cd cordova-cli && npm install)
To update all repositories:
  ./cordova-coho/coho repo-update
Creating project mobilespec...
Creating a new cordova project with name "MobileSpec_Tests" and id "org.apache.cordova.mobilespec" at location "C:\bbot\win\AndroidWin\build\mobilespec"
Using custom www assets from C:\bbot\win\AndroidWin\build\cordova-mobile-spec\www
C:\bbot\win\AndroidWin\build\mobilespec C:\bbot\win\AndroidWin\build
Adding platforms...
Adding Platform: android
platformArg: C:\bbot\win\AndroidWin\build\cordova-cli\bin\cordova C:\bbot\win\AndroidWin\build\cordova-android
Creating android project...
Running command: C:\bbot\win\AndroidWin\build\cordova-android\bin\create.bat --cli C:\bbot\win\AndroidWin\build\mobilespec\platforms\android org.apache.mobilespec mobilespec
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: org.apache.mobilespec
        Name: mobilespec
        Android target: android-19
Copying template files...
Project successfully created.
Command finished with error code 0: C:\bbot\win\AndroidWin\build\cordova-android\bin\create.bat --cli,C:\bbot\win\AndroidWin\build\mobilespec\platforms\android,org.apache.mobilespec,mobilespec
Generating config.xml from defaults for platform "android"
Calling plugman.prepare for platform "android"
Preparing android project
Processing configuration changes for plugins.
Iterating over installed plugins: []
Writing out cordova_plugins.js...
Wrote out Android application name to "mobilespec"
deleted: C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-land-hdpi\screen.png
deleted: C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-land-ldpi\screen.png
deleted: C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-land-mdpi\screen.png
deleted: C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-land-xhdpi\screen.png
deleted: C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-port-hdpi\screen.png
deleted: C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-port-ldpi\screen.png
deleted: C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-port-mdpi\screen.png
deleted: C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-port-xhdpi\screen.png
splash screens: [{"src":"www/splashscreens/android-port-hdpi.png","density":"port-hdpi","platform":"android"},{"src":"www/splashscreens/android-port-xhdpi.png","density":"port-xhdpi","platform":"android"},{"src":"www/splashscreens/android-land-hdpi.png","density":"land-hdpi","platform":"android"},{"src":"www/splashscreens/android-land-xhdpi.png","density":"land-xhdpi","platform":"android"}]
copying image from C:\bbot\win\AndroidWin\build\mobilespec\www\splashscreens\android-port-hdpi.png to C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-port-hdpi\screen.png
copying image from C:\bbot\win\AndroidWin\build\mobilespec\www\splashscreens\android-port-xhdpi.png to C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-port-xhdpi\screen.png
copying image from C:\bbot\win\AndroidWin\build\mobilespec\www\splashscreens\android-land-hdpi.png to C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-land-hdpi\screen.png
copying image from C:\bbot\win\AndroidWin\build\mobilespec\www\splashscreens\android-land-xhdpi.png to C:\bbot\win\AndroidWin\build\mobilespec\platforms\android\res\drawable-land-xhdpi\screen.png
This app does not have launcher icons defined
Wrote out Android package name to "org.apache.mobilespec"
C:\bbot\win\AndroidWin\build
Adding plugins using CLI...
Searchpath:  --searchpath C:\bbot\win\AndroidWin\build\
C:\bbot\win\AndroidWin\build\mobilespec C:\bbot\win\AndroidWin\build
Installing local test framework plugins...
Installing "org.apache.cordova.test.whitelist" for android
Installing "org.apache.cordova.test.echo" for android
Installing "org.apache.cordova.test-framework" for android
Installing "org.cordova.mobile-spec-dependencies" for android
Installing "org.apache.cordova.battery-status" for android
Installing "org.apache.cordova.camera" for android
Installing "org.apache.cordova.console" for android
Installing "org.apache.cordova.contacts" for android
Installing "org.apache.cordova.device" for android
Installing "org.apache.cordova.device-motion" for android
Installing "org.apache.cordova.device-orientation" for android
Installing "org.apache.cordova.dialogs" for android
Installing "org.apache.cordova.file" for android
Installing "org.apache.cordova.file-transfer" for android
Installing "org.apache.cordova.geolocation" for android
Installing "org.apache.cordova.globalization" for android
Installing "org.apache.cordova.inappbrowser" for android
Installing "org.apache.cordova.media" for android
Installing "org.apache.cordova.media-capture" for android
Installing "org.apache.cordova.network-information" for android
Installing "org.apache.cordova.splashscreen" for android
Installing "org.apache.cordova.statusbar" for android
Installing "org.apache.cordova.vibration" for android
Adding plugin tests using CLI...
Fetching plugin "plugins\org.apache.cordova.battery-status\tests" via plugin registry
npm ERR! addLocal Could not install plugins\org.apache.cordova.battery-status\tests
Error: ENOENT, open 'C:\bbot\win\AndroidWin\build\mobilespec\plugins\org.apache.cordova.battery-status\tests\package.json'
Creating project from local git repos. If you have any errors, it may be from missing repositories.
To clone repositories:
  ./cordova-coho/coho repo-clone -r mobile-spec -r plugin-test-framework -r cli -r lib -r plugman -r android -r js -r plugins
  mkdir cordova-cli/node_modules
  (cd cordova-lib/cordova-lib/ && npm install)
  (cd cordova-plugman/ && npm install)
  mkdir cordova-cli/node_modules
  ln -s ../../cordova-lib/cordova-lib cordova-cli/node_modules
  (cd cordova-cli && npm install)
To update all repositories:
  ./cordova-coho/coho repo-update
rm: could not remove directory (code ENOTEMPTY): C:\bbot\win\AndroidWin\build\mobilespec/plugins

{code}

> Adding plugins by relative path fails when CWD is not the project root
> ----------------------------------------------------------------------
>
>                 Key: CB-8216
>                 URL: https://issues.apache.org/jira/browse/CB-8216
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>            Reporter: Andrew Grieve
>            Assignee: Sergey Grebnov
>            Priority: Minor
>
> e.g. cd into the platforms directory, then "cordova plugin add ../../../cordova-plugin-file". It'll try to get it from the registry then fail. The issue is that we chdir() into the project root before the call to add the plugin.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org