Reputation: 41
I've downloaded the 2 NBM's for JUnit. In Netbeans 8 I'm using the Tools->Plugins->Downloaded window and have added the pertinent NMBs. They are both check-marked and when I press "Install" Netbeans then pops open a dialog that says (approximately) "Installer will download, verify, then install the selected modules". It then does attempt to use the Internet to download - and fails. This machine has no access to the Internet (hence the offline approach).
Have I not downloaded the proper NBMs (they were ZIP files and I renamed them to NBM - read that was the thing to do)? Is there some other piece that I'm missing?
Upvotes: 2
Views: 4483
Reputation: 51
The reason is that the .external file contrains URL to files to be downloaded from an active internet connection.
For example, in my case (netbeans 8.0) org-netbeans-libs-junit4.nbm contains the file
/netbeans/modules/ext/junit-4.10.jar.external
which contents is
CRC:3480621823
SIZE:253160
URL:http://repo1.maven.org/maven2/junit/junit/4.10/junit-4.10.jar
URL:m2:/junit:junit:4.10:jar
if you need to perform an offline installation of the plugins in netbeans you need to transform the .nbm files : replace the .external in .nbm file by the file refenced by URL.
In my case :
1) donwload http://repo1.maven.org/maven2/junit/junit/4.10/junit-4.10.jar
2) in the org-netbeans-libs-junit4.nbm, replace
/netbeans/modules/ext/junit-4.10.jar.external
by the donwloaded file at this location in the .nbm archive
/netbeans/modules/ext/junit-4.10.jar
3) save the transformed archive, 4) do the same for the other nbm archive 5) you can add and install the the .nbm files as plugin in Netbeans
remarks :
in `org-netbeans-libs-junit4.nbm, I had to replace
/netbeans/modules/ext/junit-4.10.jar.external
in `/netbeans/modules/ext/junit-4.10.jar.external, I had to replace
/netbeans/modules/ext/junit-3.8.2.jar.external
/netbeans/docs/junit-3.8.2-api.zip.external
/netbeans/docs/junit-4.10-javadoc.jar.external
/netbeans/docs/junit-4.10-sources.jar.external
Upvotes: 5