This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 236652 - Cordova build remove plugins from project
Summary: Cordova build remove plugins from project
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Cordova (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Jan Becicka
URL:
Keywords: RELNOTE
Depends on:
Blocks:
 
Reported: 2013-10-02 13:03 UTC by Jan Becicka
Modified: 2013-10-10 11:22 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2013-10-02 13:03:53 UTC
Plugins sre removed from cordova project after second build. It is caused by https://issues.apache.org/jira/browse/CB-4889

Cordova developers renamed all fully qualified names of core plugins, but NetBeans uses still old names.

Workaround - User must modify $project/nbproject/plugins.properties by hand: he must replace all occurences of "org.apache.cordova.core." with "org.apache.cordova."

for instance line
org.apache.cordova.core.device=https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git 

must be replaced with
org.apache.cordova.device=https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
Comment 1 Jan Becicka 2013-10-02 13:20:57 UTC
Cordova out of the box experience is broken again, but this is simply mission impossible. I can fix it and they will change something else little bit later. This issue was created on Sept 21 and implemented sept 25.

We should create some release note mentioning this issue or fix the bug (fix is trivial - just rename core plugin names in netbeans source).
Comment 2 Vladimir Riha 2013-10-02 13:36:44 UTC
I wouldn't consider it as a stopper, it is just too late for 7.4 and there is at least workaround and user is told to edit plugins.properties to add any plugin. It would be good for patch and I think we could add release note with following:


Description: As a result of latest changes in Cordova, core plugins configured in Project properties dialog are removed from project after second build.

Workaround: Specify plugins manually by editing file ./nbproject/plugins.properties and replace all occurrences of "org.apache.cordova.core." with "org.apache.cordova." For more details see https://netbeans.org/bugzilla/show_bug.cgi?id=236652
Comment 3 Jan Becicka 2013-10-03 08:45:48 UTC
Changeset: f3b322de44d0
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2013-10-03 10:38
Message:
Comment 4 Vladimir Riha 2013-10-07 15:42:47 UTC
Seems OK now, I can see (when building against Android) output like

Iterating over installed plugins: [ 'org.apache.cordova.device-motion' ]

and in 7.4 build, the array is empty

Iterating over installed plugins: []
Comment 5 Vladimir Riha 2013-10-07 15:43:16 UTC
Product Version: NetBeans IDE Dev (Build 201310070001)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b14
System: Mac OS X version 10.8.5 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/tester/Library/Application Support/NetBeans/devCordova
Comment 6 Jan Becicka 2013-10-08 14:56:33 UTC
changeset:   273596:548ca382d721
branch:      release74
parent:      273585:178f3c9b6cee
user:        Jan Becicka <jbecicka@netbeans.org>
date:        Thu Oct 03 10:38:02 2013 +0200
summary:     Issue #236652 - Cordova build remove plugins from project
Comment 7 Vladimir Riha 2013-10-10 08:48:29 UTC
I've tried it in patch works fine.

If user has e.g. project from RC2 which has been already built in RC2, then IDE removes old plugins from RC2 and then adds new ones (but user must add them via Project properties/manually). Project properties shows that no plugins are added to project in case they are in the pre-patch form so it is clear user need to add them again. 

This works fine with some plugins, unfortunately there is a bug [1] in Cordova that could remove plugins that are dependencies to other plugins and if it happens, the dependent plugins cannot be removed from project and build action fails. 

[1] https://issues.apache.org/jira/browse/CB-4992
Comment 8 Vladimir Riha 2013-10-10 11:22:22 UTC
(In reply to Vladimir Riha from comment #7)
> This works fine with some plugins, unfortunately there is a bug [1] in
> Cordova that could remove plugins that are dependencies to other plugins and
> if it happens, the dependent plugins cannot be removed from project and
> build action fails. 

FYI one user reported it as issue 236967.