Dear all,
I am trying to install an update of a plugins via command line. I need to do it offline, thus I downloaded the nbm file.
However both snap --nosplash --nogui --modules --update and snap --nosplash --nogui --modules --install try to make a refresh of plugins list getting to a failure.
Is there a way to force the offline installation ?
(I know this is possible through the GUI but I do not have access to it)
Thanks a lot!
Can you specify the plugin you are attempting to install?
Dear Diana,
I am trying to update opttbx-c2rcc-11.0.1.nbm, but I have the same problem for any plugin.
Here an example with idepix
snap --nosplash --nogui --modules --install idepix-olci-11.0.0.nbm
OpenJDK 64-Bit Server VM warning: Option AggressiveOpts was deprecated in version 11.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/usr/local/snap/platform/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Refreshing SNAP Supported Plugins
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I am just wondering if I can avoid
Refreshing SNAP Supported Plugins
Maybe this thread can help. At least the same exception is reported. Maybe you are using a proxy too. If so, this might also be helpful Configure Proxy - SNAP
You can try to disable the update centers by adding the following line
enabled=false
in each of the following .properties files:
snap_update_center.properties
snap_toolboxes_update_center.properties
snap_community_plugins_update_center.properties
snap_supported_plugins_update_center.properties
On windows, they are located under:
C:\Users\<user>\AppData\Roaming\SNAP\config\Preferences\org\netbeans\modules\autoupdate
On linux:
/home/test/.snap/system/config/Preferences/org/netbeans/modules/autoupdate/
The content of the file should look like this:
Thank you Marco,
I had seen this post but ourIT administrator says this fix cannot be implemented in our system
Thank you Diana.
I tried and I do not get anymore the error related to the refresh.
Still it does not work since it says
with --install:
Cannot install. No match for [idepix-olci-11.0.0.nbm].
with --update opttbx-c2rcc-11.0.1.nbm
Nothing to update. The pattern [opttbx-c2rcc-11.0.1.nbm] has no match among available updates.
Could you describe the process you used for the offline update?
I just typed
snap --nosplash --nogui --modules --update opttbx-c2rcc-11.0.1.nbm
where opttbx-c2rcc-11.0.1.nbm is the whole path to the file I downloaded from the update center.
I got the same result also trying to update snap-gpf-11.0.1.nbm before to avoid errors due to dependencies
I apologize for keeping you waiting.
To install new modules offline, you’ll need to set up a local update center. Please follow these steps:
-
Download the
.nbm
files for the modules you want to update from the Update Center, along with the correspondingupdates.xml
file.
-
In the location where the four previously disabled Update Center files are stored, add a new file named
local_optical_plugins.properties
with the following content:
categoryName=Community Contributed Plugin
displayName=Local Update Center - Optical Plugins
enabled=true
originalCategoryIconBase=org/netbeans/modules/autoupdate/services/resources/icon-community.png
trusted=true
url=file:/E:/LocalOpticalPlugins/updates.xml
- Run the install/update command for the desired module using the module name (not the file path). Example:
snap64 --nosplash --nogui --modules --install org.esa.snap.idepix.core
or
snap64 --nosplash --nogui --modules --update eu.esa.opt.opttbx.c2rcc
Note:
Please be aware that version 11.0.1 of the module eu.esa.opt.opttbx.c2rcc
requires the prior installation of the following modules:
I’m available if you need any further information.
thanks a lot Diana,
it works perfectly for the SNAP updates. So I have all the prerequisite modules updated to 11.0.1. I did it downloading everything from /Index of /updatecenter/11.0/snap/ and running
snap --nosplash --nogui --modules --update-all
however, it does not work if I do exactly the same with Index of /updatecenter/11.0/snap-toolboxes/
I will make a fe other trials and let you know.
many thanks again
Dear Diana,
I confirm you that it works perfectly to install idepix or others plugins as snappy.
Even if it says it did not installed anything it did it.
On the other hand I am not able to update any toolbox.
snap --nosplash --nogui --modules --update eu.esa.opt.opttbx.c2rcc
gives me
OpenJDK 64-Bit Server VM warning: Option AggressiveOpts was deprecated in version 11.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/usr/local/snap/platform/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Nothing to update. The pattern [eu.esa.opt.opttbx.c2rcc] has no match among available updates.
updates=0
I even tried changing the content like
categoryName=SNAP Supported Plugins
without success
Have you tried to download the entire content of the snap
and snap-toolboxes
update centers and install all the available updates using the command:
snap --nosplash --nogui --modules --update-all
?
It worked for http://step.esa.int/updatecenter/11.0/snap/but not for /updatecenter/11.0/snap-toolboxes/
I also tried to delete .snap/ and tried again from scratch but as a result I got that now I do not see anymore the updates I made yesterday. They seems being brought back to 11.0.0 when I list them…
Could you please compile an archive of all the local update centers you are currently using and share it with me privately? I’d like to try an update using exactly the same .nbm files you’re using.