[ https://issues.apache.org/jira/browse/CB-11387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15318923#comment-15318923 ]
Tobias Bocanegra edited comment on CB-11387 at 6/7/16 5:21 PM: --------------------------------------------------------------- {noformat} $ ant test Buildfile: /Users/tripod/tmp/testfail/CB-11387-Example/build.xml test: [exec] /Users/tripod/tmp/testfail/CB-11387-Example/testdir [delete] Deleting directory /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms [delete] Deleting directory /Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins [exec] No scripts found for hook "before_platform_add". [exec] No version supplied. Retrieving version from config.xml... [exec] Adding ios project... [exec] PlatformApi successfully found for platform ios [exec] iOS project created with cordova-ios@4.1.1 [exec] Checking for any plugins added to the project that have not been installed in ios platform [exec] No differences found between plugins added to project and installed in ios platform. Continuing... [exec] Generating config.xml from defaults for platform "ios" [exec] Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" [exec] Wrote out iOS Bundle Version to "0.0.1" [exec] iOS Product Name has not changed (still "HelloCordova") [exec] updated project successfully [exec] No scripts found for hook "before_prepare". [exec] Checking config.xml for saved platforms that haven't been added to the project [exec] Checking for any plugins added to the project that have not been installed in ios platform [exec] No differences found between plugins added to project and installed in ios platform. Continuing... [exec] Generating config.xml from defaults for platform "ios" [exec] Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" [exec] Wrote out iOS Bundle Version to "0.0.1" [exec] iOS Product Name has not changed (still "HelloCordova") [exec] updated project successfully [exec] No scripts found for hook "after_prepare". [exec] Checking config.xml for saved plugins that haven't been added to the project [exec] Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project [exec] No scripts found for hook "before_plugin_add". [exec] Calling plugman.fetch on plugin "cordova-plugin-whitelist@1" [exec] Fetching plugin "cordova-plugin-whitelist@1" via npm [exec] Copying plugin "/Users/tripod/.npm/cordova-plugin-whitelist/1.2.2/package" => "/Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins/cordova-plugin-whitelist" [exec] Calling plugman.install on plugin "/Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins/cordova-plugin-whitelist" for platform "ios [exec] Installing "cordova-plugin-whitelist" for ios [exec] Running command: /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms/ios/cordova/version [exec] Command finished with error code 0: /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms/ios/cordova/version [exec] Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only. [exec] No scripts found for hook "before_plugin_install". [exec] Install start for "cordova-plugin-whitelist" on ios. [exec] Beginning processing of action stack for ios project... [exec] Action stack processing complete. [exec] Install complete for cordova-plugin-whitelist on ios. [exec] Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only. [exec] No scripts found for hook "after_plugin_install". [exec] Checking for any plugins added to the project that have not been installed in ios platform [exec] No differences found between plugins added to project and installed in ios platform. Continuing... [exec] Generating config.xml from defaults for platform "ios" [exec] Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" [exec] Wrote out iOS Bundle Version to "0.0.1" [exec] iOS Product Name has not changed (still "HelloCordova") [exec] updated project successfully [exec] No scripts found for hook "after_plugin_add". [exec] Discovered plugin "cordova-testplugin" in config.xml. Adding it to the project [exec] No scripts found for hook "before_plugin_add". [exec] No version specified for null, retrieving version from config.xml [exec] No version for null saved in config.xml [exec] Attempting to use npm info for null to choose a compatible release [exec] Failed to restore plugin "cordova-testplugin" from config.xml. You might need to try adding it again. Error: Error: Invalid package.json [exec] Saving ios@4.1.1 into platforms.json [exec] No scripts found for hook "after_platform_add". {noformat} and when executed directly: {noformat} $ cordova --verbose platform add ios No scripts found for hook "before_platform_add". No version supplied. Retrieving version from config.xml... Adding ios project... PlatformApi successfully found for platform ios iOS project created with cordova-ios@4.1.1 Checking for any plugins added to the project that have not been installed in ios platform No differences found between plugins added to project and installed in ios platform. Continuing... Generating config.xml from defaults for platform "ios" Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" Wrote out iOS Bundle Version to "0.0.1" iOS Product Name has not changed (still "HelloCordova") updated project successfully No scripts found for hook "before_prepare". Checking config.xml for saved platforms that haven't been added to the project Checking for any plugins added to the project that have not been installed in ios platform No differences found between plugins added to project and installed in ios platform. Continuing... Generating config.xml from defaults for platform "ios" Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" Wrote out iOS Bundle Version to "0.0.1" iOS Product Name has not changed (still "HelloCordova") updated project successfully No scripts found for hook "after_prepare". Checking config.xml for saved plugins that haven't been added to the project Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project No scripts found for hook "before_plugin_add". Calling plugman.fetch on plugin "cordova-plugin-whitelist@1" Fetching plugin "cordova-plugin-whitelist@1" via npm Copying plugin "/Users/tripod/.npm/cordova-plugin-whitelist/1.2.2/package" => "/Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins/cordova-plugin-whitelist" Calling plugman.install on plugin "/Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins/cordova-plugin-whitelist" for platform "ios Installing "cordova-plugin-whitelist" for ios Running command: /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms/ios/cordova/version Command finished with error code 0: /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms/ios/cordova/version Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only. No scripts found for hook "before_plugin_install". Install start for "cordova-plugin-whitelist" on ios. Beginning processing of action stack for ios project... Action stack processing complete. Install complete for cordova-plugin-whitelist on ios. Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only. No scripts found for hook "after_plugin_install". Checking for any plugins added to the project that have not been installed in ios platform No differences found between plugins added to project and installed in ios platform. Continuing... Generating config.xml from defaults for platform "ios" Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" Wrote out iOS Bundle Version to "0.0.1" iOS Product Name has not changed (still "HelloCordova") updated project successfully No scripts found for hook "after_plugin_add". Discovered plugin "cordova-testplugin" in config.xml. Adding it to the project No scripts found for hook "before_plugin_add". Calling plugman.fetch on plugin "./src/testplugin" Copying plugin "src/testplugin" => "/Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins/cordova-testplugin" Calling plugman.install on plugin "/Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins/cordova-testplugin" for platform "ios Installing "cordova-testplugin" for ios Running command: /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms/ios/cordova/version Command finished with error code 0: /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms/ios/cordova/version Finding scripts for "before_plugin_install" hook from plugin cordova-testplugin on ios platform only. No scripts found for hook "before_plugin_install". Install start for "cordova-testplugin" on ios. Beginning processing of action stack for ios project... Action stack processing complete. Install complete for cordova-testplugin on ios. Finding scripts for "after_plugin_install" hook from plugin cordova-testplugin on ios platform only. No scripts found for hook "after_plugin_install". Checking for any plugins added to the project that have not been installed in ios platform No differences found between plugins added to project and installed in ios platform. Continuing... Generating config.xml from defaults for platform "ios" Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" Wrote out iOS Bundle Version to "0.0.1" iOS Product Name has not changed (still "HelloCordova") updated project successfully No scripts found for hook "after_plugin_add". Saving ios@4.1.1 into platforms.json No scripts found for hook "after_platform_add". {noformat} was (Author: tripod): {noformat} $ ant test Buildfile: /Users/tripod/tmp/testfail/CB-11387-Example/build.xml test: [exec] /Users/tripod/tmp/testfail/CB-11387-Example/testdir [delete] Deleting directory /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms [delete] Deleting directory /Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins [exec] No scripts found for hook "before_platform_add". [exec] No version supplied. Retrieving version from config.xml... [exec] Adding ios project... [exec] PlatformApi successfully found for platform ios [exec] iOS project created with cordova-ios@4.1.1 [exec] Checking for any plugins added to the project that have not been installed in ios platform [exec] No differences found between plugins added to project and installed in ios platform. Continuing... [exec] Generating config.xml from defaults for platform "ios" [exec] Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" [exec] Wrote out iOS Bundle Version to "0.0.1" [exec] iOS Product Name has not changed (still "HelloCordova") [exec] updated project successfully [exec] No scripts found for hook "before_prepare". [exec] Checking config.xml for saved platforms that haven't been added to the project [exec] Checking for any plugins added to the project that have not been installed in ios platform [exec] No differences found between plugins added to project and installed in ios platform. Continuing... [exec] Generating config.xml from defaults for platform "ios" [exec] Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" [exec] Wrote out iOS Bundle Version to "0.0.1" [exec] iOS Product Name has not changed (still "HelloCordova") [exec] updated project successfully [exec] No scripts found for hook "after_prepare". [exec] Checking config.xml for saved plugins that haven't been added to the project [exec] Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project [exec] No scripts found for hook "before_plugin_add". [exec] Calling plugman.fetch on plugin "cordova-plugin-whitelist@1" [exec] Fetching plugin "cordova-plugin-whitelist@1" via npm [exec] Copying plugin "/Users/tripod/.npm/cordova-plugin-whitelist/1.2.2/package" => "/Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins/cordova-plugin-whitelist" [exec] Calling plugman.install on plugin "/Users/tripod/tmp/testfail/CB-11387-Example/testdir/plugins/cordova-plugin-whitelist" for platform "ios [exec] Installing "cordova-plugin-whitelist" for ios [exec] Running command: /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms/ios/cordova/version [exec] Command finished with error code 0: /Users/tripod/tmp/testfail/CB-11387-Example/testdir/platforms/ios/cordova/version [exec] Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only. [exec] No scripts found for hook "before_plugin_install". [exec] Install start for "cordova-plugin-whitelist" on ios. [exec] Beginning processing of action stack for ios project... [exec] Action stack processing complete. [exec] Install complete for cordova-plugin-whitelist on ios. [exec] Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only. [exec] No scripts found for hook "after_plugin_install". [exec] Checking for any plugins added to the project that have not been installed in ios platform [exec] No differences found between plugins added to project and installed in ios platform. Continuing... [exec] Generating config.xml from defaults for platform "ios" [exec] Wrote out iOS Bundle Identifier to "io.cordova.hellocordova" [exec] Wrote out iOS Bundle Version to "0.0.1" [exec] iOS Product Name has not changed (still "HelloCordova") [exec] updated project successfully [exec] No scripts found for hook "after_plugin_add". [exec] Discovered plugin "cordova-testplugin" in config.xml. Adding it to the project [exec] No scripts found for hook "before_plugin_add". [exec] No version specified for null, retrieving version from config.xml [exec] No version for null saved in config.xml [exec] Attempting to use npm info for null to choose a compatible release [exec] Failed to restore plugin "cordova-testplugin" from config.xml. You might need to try adding it again. Error: Error: Invalid package.json [exec] Saving ios@4.1.1 into platforms.json [exec] No scripts found for hook "after_platform_add". {noformat} > Relative plugin resolution does not work when cordova is executed as sub > process > -------------------------------------------------------------------------------- > > Key: CB-11387 > URL: https://issues.apache.org/jira/browse/CB-11387 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaLib > Affects Versions: 6.2.0 > Reporter: Tobias Bocanegra > Attachments: CB-11387-Example.zip > > > (this used to work in 6.1.1) > if {{cordova platform add}} is invoked as subprocess (for example in an > ant-script), the plugin spec resolution for relative plugins doesn't work. > for example: > {noformat} > <plugin name="cordova-testplugin" spec="./src/testplugin" /> > {noformat} > See the attached script. when running with ant it shows: > {noformat} > $ ant test > Buildfile: /Users/tripod/tmp/testfail/foo/build.xml > test: > [exec] /Users/tripod/tmp/testfail/foo/testdir > [delete] Deleting directory > /Users/tripod/tmp/testfail/foo/testdir/platforms > [delete] Deleting directory /Users/tripod/tmp/testfail/foo/testdir/plugins > [exec] Adding ios project... > [exec] iOS project created with cordova-ios@4.1.1 > [exec] Discovered plugin "cordova-plugin-whitelist" in config.xml. > Adding it to the project > [exec] Fetching plugin "cordova-plugin-whitelist@1" via npm > [exec] Installing "cordova-plugin-whitelist" for ios > [exec] Discovered plugin "cordova-testplugin" in config.xml. Adding it > to the project > [exec] Failed to restore plugin "cordova-testplugin" from config.xml. > You might need to try adding it again. Error: Error: Invalid package.json > {noformat} > please note, that ant sets the pwd correctly. > when running from command line: > {noformat} > $ cd testdir; cordova platform add ios > Adding ios project... > iOS project created with cordova-ios@4.1.1 > Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the > project > Fetching plugin "cordova-plugin-whitelist@1" via npm > Installing "cordova-plugin-whitelist" for ios > Discovered plugin "cordova-testplugin" in config.xml. Adding it to the project > Installing "cordova-testplugin" for ios > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org