简体   繁体   English

为什么netbeans 8要安装未使用的cordova插件

[英]why does netbeans 8 want to install unused cordova plugins

I'm trying to emulate a Cordova project in Netbeans 8. I'm getting an error while it tries to clone plugins for the project. 我正在尝试在Netbeans 8中模拟一个Cordova项目。在尝试克隆该项目的插件时遇到错误。 I would also like to resolve that issue, but moreso don't understand why it needs these plugins. 我也想解决该问题,但是不明白为什么它需要这些插件。 I am not using features that need the camera, file-transfer, or many others. 我没有使用需要相机,文件传输或其他功能的功能。

I can use npm to run cordova plugin add xxx , but when i rerun, netbeans just tries to git clone the next plugin that i don't need. 我可以使用npm运行cordova plugin add xxx ,但是当我重新运行时,netbeans只是尝试git clone我不需要的下一个插件。 Why and how do i tell netbeans to skip them? 为什么以及如何告诉Netbeans跳过它们?

ant -f C:\\DATA\\TripChi\\dev\\tripchimobile\\nbproject -Dandroid.target.device.arg=emulate -Denv.DISPLAY=:0.0 "-Dupdate.task.jar=C:\\Program Files\\NetBeans 8.0\\webcommon\\ant\\extra\\org-netbeans-modules-cordova-projectupdate.jar" -Dandroid.sdk.home=C:\\Android\\android-sdks -Dandroid.build.target=android-17 -Dstart.file=index.html -Dandroid.project.activity=tripchimobile -Dconfig=android "-Dios.certificate.name=iPhone Developer" -Dsite.root=www "-Dcordova.version=3.4.1-0.1.0
" sim-android
check-android-template:
check-cordova-version:
check-cordova-project:
upgrade-to-cordova-project:
create-android:
update-plugins:
cordova.cmd plugins 
cordova.cmd -d plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git
Calling plugman.fetch on plugin "https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git"
Fetching plugin "https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git" via git clone
Fetching plugin via git-clone command: git clone "https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git" "c:\DOCUME~1\ELIA~1.TAY\LOCALS~1\Temp\plugman\git\1400970893221"
Error: Command failed: cmd.exe /s /c "git clone "https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git" "c:\DOCUME~1\ELIA~1.TAY\LOCALS~1\Temp\plugman\git\1400970893221""
fatal: could not create work tree dir 'c:\DOCUME~1\ELIA~1.TAY\LOCALS~1\Temp\plugman\git\1400970893221'.: No such file or directory

    at ChildProcess.exithandler (child_process.js:729:12)
    at ChildProcess.EventEmitter.emit (events.js:110:17)
    at maybeClose (child_process.js:992:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1059:5)
C:\DATA\TripChi\dev\tripchimobile\nbproject\build.xml:232: exec returned: 1
BUILD FAILED (total time: 2 seconds)

quickly found the answer, comment out plugintask in build.xml 快速找到答案,在build.xml中注释掉plugintask

    <target name="update-plugins">
<!--    <plugintask/>-->
    </target>   

This does not solve the issue that my installation of Netbeans 8 cannot clone the repositories 这不能解决我的Netbeans 8安装无法克隆存储库的问题

my mistake, while the above works, the seemingly better approach is via 我的错误,虽然上述方法可行,但似乎更好的方法是通过

Project > Properties > Cordova > Plugins

and deselect the ones you don't want included!) 并取消选择您不想包含的内容!)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM