You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Szymon Drosdzol (JIRA)" <ji...@apache.org> on 2016/08/09 06:34:20 UTC

[jira] [Created] (CB-11683) Cordova-Android fails to properly add the source of a custom plugin if its source-file.source points to a directory and plugin is being installed in --link mode

Szymon Drosdzol created CB-11683:
------------------------------------

             Summary: Cordova-Android fails to properly add the source of a custom plugin if its source-file.source points to a directory and plugin is being installed in --link mode
                 Key: CB-11683
                 URL: https://issues.apache.org/jira/browse/CB-11683
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 3.5.0
         Environment: Windows 10
            Reporter: Szymon Drosdzol
            Priority: Minor


I have cerated a custom plugin. In my plugin.xml I've added java sources directory with the following XML tag:

{{<source-file src="src/com/thisisdir/" target-dir="src/com/" />}}

Next I tried to install that plugin using the following command:

{{cordova plugin add ..\AuthenticatorPlugin --link}}

Unfortunatetly that only creates a useless 0-byte file in the destination folder instead of proper link.

This resembles behaviour of Windows' mklink command, which does exactly this when trying to create the link to the directory without the /D parameter. This is clearly bad design. The command failed to do its job but exited normally instead of presenting any error message. Cordova shoudln't replicate that behaviour and handle folder linking on its own. Therefore we should either:
* fail the task on attempts to link a directory,
* handle directory linking properly.

I think the second option is way better :)



--
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