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.
We need a way: . to set the default is to install the modules globally (or into the install directory) automatically instead of the user directory . to warn the user when the default selected mode is changed from globally to user directory and vice versa. ... without modify the NB autoupdate module code. Previously we directly modified the NB autoupdate code (in particular SignVerifier.java & ResultPanel.java) to provide this feature. I will attach a diff with NB 4.0.
Here is the diff of what was changed in NB autoupdate code to provide the required behavior: 1. autoupdate/src/org/netbeans/modules/autoupdate/SignVerifier.java @@ -144,6 +144,11 @@ return; ModuleUpdate mu = (ModuleUpdate)it.next(); + +// comment="default to be in the installation dir" +// This looks very suspicious! + mu.setToInstallDir( true ) ; +// 2. autoupdate/src/org/netbeans/modules/autoupdate/ResultsPanel.java -312,16 +312,37 @@ return; } - if (Downloader.bannedWriteToInstall (mu)) { - NotifyDescriptor.Message nd = - new NotifyDescriptor.Message( getBundle( "MSG_InstallNoWrite" ) ); - DialogDisplayer.getDefault().notify( nd ); - return; - } +// /* if (Downloader.bannedWriteToInstall (mu)) { +// NotifyDescriptor.Message nd = +// new NotifyDescriptor.Message( getBundle( "MSG_InstallNoWrite" ) ); +// DialogDisplayer.getDefault().notify( nd ); +// return; +// } */ if ( mu.isToInstallDir() ) - mu.setToInstallDir( false ); +// give warning on attempt to install to install dir. +// mu.setToInstallDir( false ); +// ==== + { + NotifyDescriptor.Message nd = + new NotifyDescriptor.Message( getBundle( "MSG_InstallInUserdir" ) ); + DialogDisplayer.getDefault().notify( nd ); + } +// else { +// +// + if ( Downloader.bannedWriteToInstall(mu) ) { + NotifyDescriptor.Message nd = + new NotifyDescriptor.Message( getBundle( "MSG_InstallNoWrite" ) ); + DialogDisplayer.getDefault().notify( nd ); + return; + } +//
Peter, why did you lower this to P3? I think that this is a must-have feature for us.
Doesn't help a new parameter in NBM/info.xml? E.g. boolean isGlobal, false as default. If it's true then the global mode will check on on this update.
I think it would work if we can specify "isGlobal" in the NBM's info.xml. Can you give us more details on how we can set this up in the nbm build target? Thanks.
Needs to new version the schema of NBM's info.xml (i.e.autoupdate-catalog-2_2.dtd -> autoupdate-catalog-2_3), modify antsrc/MakeNBM task and reflect this change in AutoUpdate module. The attribute isGlobal will be not mandatory and false is default.
*** Issue 27913 has been marked as a duplicate of this issue. ***
Hint for me: issue 12705.
Created attachment 20488 [details] a possible patch
The patch makes possible to mark a NBM as global, will be installed to global install dir. This attribute is read from Info.xml from NBM header. Property is not mandatory and the default value is false. If the ant property "nbm.is.global" is set to true then the NBM will generated with this attribute set to true. Must be tested before integration. The property "nbm.is.global" should be in <module_dir>/nbproject/project.properties (for specific module) or in <nb_all>/nbbuild/templates/projectized.xml (global for all NBMs).
Implemented. RCS file: /cvs/www/www/dtds/autoupdate-catalog-2_3.dtd,v done Checking in www/www/dtds/autoupdate-catalog-2_3.dtd; /cvs/www/www/dtds/autoupdate-catalog-2_3.dtd,v <-- autoupdate-catalog-2_3.dtd initial revision: 1.1 done RCS file: /cvs/www/www/dtds/autoupdate-info-2_3.dtd,v done Checking in www/www/dtds/autoupdate-info-2_3.dtd; /cvs/www/www/dtds/autoupdate-info-2_3.dtd,v <-- autoupdate-info-2_3.dtd initial revision: 1.1 done Checking in www/www/dtds/catalog; /cvs/www/www/dtds/catalog,v <-- catalog new revision: 1.37; previous revision: 1.36 done Checking in nbbuild/antsrc/org/netbeans/nbbuild/MakeListOfNBM.java; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/MakeListOfNBM.java,v <-- MakeListOfNBM.java new revision: 1.31; previous revision: 1.30 done Checking in nbbuild/antsrc/org/netbeans/nbbuild/MakeNBM.java; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/MakeNBM.java,v <-- MakeNBM.java new revision: 1.61; previous revision: 1.60 done Checking in nbbuild/antsrc/org/netbeans/nbbuild/MakeUpdateDesc.java; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/MakeUpdateDesc.java,v <-- MakeUpdateDesc.java new revision: 1.24; previous revision: 1.23 done Checking in nbbuild/antsrc/org/netbeans/nbbuild/ModuleTracking.java; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/ModuleTracking.java,v <-- ModuleTracking.java new revision: 1.5; previous revision: 1.4 done Checking in autoupdate/libsrc/org/netbeans/updater/resources/autoupdate-catalog-2_3.dtd; /cvs/autoupdate/libsrc/org/netbeans/updater/resources/autoupdate-catalog-2_3.dtd,v <-- autoupdate-catalog-2_3.dtd new revision: 1.2; previous revision: 1.1 done Checking in autoupdate/libsrc/org/netbeans/updater/resources/autoupdate-info-2_3.dtd; /cvs/autoupdate/libsrc/org/netbeans/updater/resources/autoupdate-info-2_3.dtd,v <-- autoupdate-info-2_3.dtd new revision: 1.2; previous revision: 1.1 done Checking in autoupdate/src/org/netbeans/modules/autoupdate/Bundle.properties; /cvs/autoupdate/src/org/netbeans/modules/autoupdate/Bundle.properties,v <-- Bundle.properties new revision: 1.150; previous revision: 1.149 done Checking in autoupdate/src/org/netbeans/modules/autoupdate/Downloader.java; /cvs/autoupdate/src/org/netbeans/modules/autoupdate/Downloader.java,v <-- Downloader.java new revision: 1.40; previous revision: 1.39 done Checking in autoupdate/src/org/netbeans/modules/autoupdate/ModuleUpdate.java; /cvs/autoupdate/src/org/netbeans/modules/autoupdate/ModuleUpdate.java,v <-- ModuleUpdate.java new revision: 1.58; previous revision: 1.57 done Checking in autoupdate/src/org/netbeans/modules/autoupdate/ResultsPanel.java; /cvs/autoupdate/src/org/netbeans/modules/autoupdate/ResultsPanel.java,v <-- ResultsPanel.java new revision: 1.56; previous revision: 1.55 done Checking in autoupdate/src/org/netbeans/modules/autoupdate/Wizard.java; /cvs/autoupdate/src/org/netbeans/modules/autoupdate/Wizard.java,v <-- Wizard.java new revision: 1.73; previous revision: 1.72 done Checking in autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java; /cvs/autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java,v <-- XMLAutoupdateType.java new revision: 1.30; previous revision: 1.29 done
Functionally specification: New 'global' attribute in Autoupdate Catalog/Info schema file, not mandatory and won't be filled in in most cases. How it works? A. Attribute 'global' is no there. - everything works as before, no change B. Attribute 'global' is true - the NBM, which has 'global' attr set 'true' in own info.xml, is offered as Global in Autoupdate wizard and there is no way to change it to local. - an user is notified by InfoMessage box that isn't allowed when s/he trying it. C. Attribute 'global' is false - it is paired with above - the NBM, which has 'global' set 'false', isn't offered as Global in Autoupdate wizard (Global option is not checked) and there is no way to change it to global. - an user is notified by InfoMessage box that isn't allowed when s/he trying it. How to fill up this attribute? There are several options: A. Invoke the ant's 'nbm' target with -Dnbm.is.global=true or false - it's effective for only once NBM generating B. In netbeans project's you can declare the property 'nbm.is.global' in <module_root>/nbproject/project.properties - it's effective for all generating NBM for this module A. Declare 'nbm.is.global' in <nb_all>/nbbuild/templates/projectized.xml - it's effective for all NBMs generating for all module - Not recommended!
Can you send me the new autoupdate module .jar so that I can test this out?