is manual installation of findbugs plugin in sonarqube ok? - plugins

I have a fairly old sonarqube installation, which for various reasons I can't upgrade. I upgraded however the java plugin to 2.0, and run into an issue with multiple plugins being incompatible. I manually removed those plugins, and reinstalled them from the Upgrade Center once I was able to restart sonarqube. However, for whatever strange reason the findbugs plugin keeps failing to download from the center. I can however manually download the jar file from here:
http://downloads.sonarsource.com/plugins/org/codehaus/sonar-plugins/java/sonar-findbugs-plugin/2.0/sonar-findbugs-plugin-2.0.jar
and manually copied it to extensions/plugins/, as explained here.
when I restart sonar-qube I don't see any problem in the log file, and in fact I see this:
2015.06.25 12:44:44 INFO org.sonar.INFO Register rules [common-java/java]...
2015.06.25 12:44:44 INFO org.sonar.INFO Register rules [common-java/java] done: 6 ms
However, something is fishy: if I go to the update center, I don't see findbugs listed under the installed plugins, and yet I don't see it under the available ones either.
Can somebody clarify what should be done to correctly install manually?
Also, when I go to the Quality Profiles section I see only two rows under Java:
Rules
SonarWay 70 ...
SonarWay with Findbugs 70
This seems a very small number of rules, I know there should be many more...what am I missing?

The Java Plugin version 2.0 embedded FindBugs, so there's no need to download it independently. That's also why you're not seeing it in the download center. You should remove it and restart your server. That may resolve the issue with your profiles as well.

Related

Spring Tool Suite says it could not create BootDashView (or any Spring view)

When I go to the "Boot Dashboard" (Update: actually I see similar messages on each Spring view) view I see the message
Could not create the view: org.springframework.ide.eclipse.boot.dash.views.BootDashView
There is an icon to see the error logs beside it, so I deleted them, reopened STS, and I did not see any error.
Any guidance on how to resolve this or further debug it?
More info
After following Martin's advice and opening the Host OSGi Console and typing ss to get the short status and doing diag <id> on a few different things all I was ever able to get was similar to this,
org.springframework.ide.eclipse.boot.dash [962]
No resolution report for the bundle.
Martin mentioned looking for INSTALLED, but all I saw were ACTIVE, RESOLVED, STARTING, and <<LAZY>>. I ran diag on at least one bundle of each state, but got nothing any different than above (of course the names and IDs were different).
I was facing the similar issue with Spring Boot Dash view and using -clean option and restart STS worked for me.
Just faced the same issue upgrading to latest STS 3.8.3 based on Neon.2 (4.6.2). Starting with the -clean option did nothing for me, neither did uninstalling / reinstalling the Groovy Eclipse feature as discussed.
What resolved it for me was switching to a new clean workspace - the boot dashboard then started working again. Oddly, it also works if I now switch back to the old workspace. Before this, the module was showing as LAZY in the Host OSGi console, now it's ACTIVE:
966 ACTIVE org.springframework.ide.eclipse.boot.dash_3.8.3.201612191259-RELEASE
The problem was one of my Groovy Eclipse compiler plugins (it was 1.8, 1.9, 2.0, 2.1, or 2.2, not sure which). After uninstalling it the Boot Dashboard no longer has an error.
Since part of my question was wondering about how to get better insight into the problem (more than checking the error log, which was empty) I will not mark this answer as accepted.

Coda 2.2 Plugins don't stay installed

I am having a small problem with plugins not staying installed with Coda 2.2 for Mac on OSX 10.6. Every time I close Coda and open it back up and then click on plugins half of them are gone even though the are in the plugins folder for the application. I have to close Coda and uninstall and reinstall the plugin then open it back up. That is only good until I close it then it starts all over again. Is there anything I can do or is there something I am overlooking that is causing this to happen?
-Thanks
I've been working with Panic support and we've discovered there's an issue with certain plugins. Most likely, it's only one that's problematic. For me, it was WVCPs plugin. Removing that from the plugin folder allows all other plugins to work fine.
I found it helpful looking at the Console app for messages from Coda and one by one dropped the plugins back into the plugins folder until I found the one that caused an error about incompatible architecture.
You can ignore the error about two plugins implementing the same class, that seems to be a mutual exclusion sort of warning but still allows the other plugins to work.
One other plugin had a different error but again, appears to work fine so probably it was just a warning.
This is probably your best solution until Panic push out an update, which I am assured is on the way.
Hope that helps!

How to validate an upgrade before installation

We have an eclipse feature that is licensed and the license is handled by our own code. The user can go in on our update-site and upgrade his feature. The problem we face is when the user's license needs to be updated before he can use the new upgrade.
What I want to do is to validate the feature version against the users license and warn the user that his license needs to be updated before he install.
I thought I would do this using a custom eclipse p2 touchPoint action validateLicense.
Example:
My code is called, where I validate the version against the user's license. If it fails I warn the user and he can then cancel the installation.
So my first question is:
Do I get this right, or is it some other way to do this?
My second question is pretty basic:
Where do I tell eclipse to run my code?
I have looked here at eclipse help where they explain what it is. But I don't understand where to put the information to run my code? Is it in the feature.xml.
Lastly:
Is there an example how to create and use p2 touchPonts?
I implemented a custom action as shown here and I have a system that seems to work. I left out "touchpoint" extension as it's unnecessary in my case, but the rest is the same.
My action is executed during install phase of my feature (instructions.install) but maybe configure phase could work too. Collect phase did not work.
The action is executed during installation process, after the download was already performed. Ideally it would be before the download but it's not a big issue for me. Returning an error status from the action cancels the install. It leaves some downloaded files around but they do not get activated and are probably removed later by p2's garbage collector.
I also managed to do some more interesting things. My actions plugin has a dependency (optional and non-greedy) on my main plugin. So the install works like this:
Actions plugin is downloaded
Custom action is executed
The action detects whether my main plugin is already installed and if yes, it calls into it to retrieve licensing info. The main plugin has to expose an API for the action. The action also checks main plugin's version to detect whether the API is there or not.
The action now can decide whether to proceed or cancel the install. It can even interact with the user using Display#syncExec (this is what the code in checkTrust phase does so I think it's safe). If needed, the action could also detect whether the install is headless.
Some gotchas:
Action itself must be versioned. It's the version you declare in plugin.xml and p2.inf files and it's different from plugin's version. I just replace 1.0.0 with the same version my plugin has. This way the latest version of the action plugin is always downloaded before being executed. This is great because now any problem changes to licensing rules can be implemented in actions plugin.
Actions API changed between Eclipse 3.5 and 3.6. I will probably drop support for 3.5 as it's pretty old anyway.
Actions plugin should probably be signed. It's the case in my case. The system seems almost too powerful to me as just pointing Eclipse to an update site gets it to execute downloaded code.
I still need to test how this works with different versions of Eclipse and other IDEs. I saw a strange (non-blocking) error with 3.6. However the results are promising and it looks like the system might actually work.
Touchpoints are executed at installation time, which means that the resolution (validation) has already happened. I'm not sure they would help. What about creating an Installable Unit (IU) (or Eclipse Feature) that represents the license the user has installed. Then you would put a dependency from your product to that license.
For example, create an IU called com.mycompany.license (1.0.0). You would create another one called com.mycompany.license (2.0.0). When you installed a license, the appropriate IU would be added to the profile.
Now, when you go to install you product, the new version of the product would require license version 2.0.0. If this license was not installed, the resolution would fail.
Does this make sense? Do you think this would help?

Unable to read repository at http://download.eclipse.org/releases/indigo

I was trying to add the PDT,
Indigo - http://download.eclipse.org/releases/indigo
Unable to read repository at http://download.eclipse.org/releases/indigo.
Unable to read repository at http://download.eclipse.org/releases/indigo.
http://download.eclipse.org/releases/indigo is not a valid repository location.
So what's the correct url ? I went and looked lots of places. Can someone point me to the exact link ?
Edit :
Problem once you go to http://download.eclipse.org/releases/indigo , you will see the below error. So I guess its moved somewhere.
This software repository URL, http://download.eclipse.org/releases/indigo/ , provides access to the software repository for the Eclipse indigo release. Until its released in June 2011, it will contain milestone builds.
The repository site URL is typically pre-populated in the list of software repositories when you install the Eclipse Platform or SDK.
For more information about installing or updating software, see the Eclipse Platform Help.
There is also a collection of handy, downloadable all-in-one zip files available for many interests and platforms. Many people find these all-in-one packages the easiest way to get started.
Can you connect to internet at all through Eclipse?
Open the internal webbrowser. In Eclipse: Window -> show view -> Other -> General: Internal web browser.
Look up any normal adress, is it working?
Can you connect to another update site? Try for example Eclipse Emma:
http://update.eclemma.org/
Do you see anything there?
What are your proxy preferences? Go to Window -> preferences -> General: Network connections.
The active provider:
Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes settings that were discovered in the OS to be used.
If internet is working fine outside of Eclipse, try changing to Native. After that, try Direct.
I have encountered problems where an update site would not load, then I had to remove it and add it again. This forces Eclipse to reread the contents of the site even if it has a cached copy. So, if you still get no connection to the indigo update site, but everything else is working, try that. Go to Window -> Preferences -> Install/update: Available Software sites. Then remove and add the indigo site. Just remember to copy the adress so you can add it again.
As suggested in a comment below by #lostiniceland, this is a simpler way to achieve the above:
Goto Window -> Preferences -> Install Update -> Available Software Sites => select the entry and click the "Reload" button to the right. This is sometimes also helpful when you have a local updatesite for testing custom plugins
I had the same problem and resolved it by
Deleting the cache directory \eclipse\p2\org.eclipse.equinox.p2.repository\cache
Refreshing the repositories.
Preferences -> Install Update -> Available Software Sites => select the entry
Click the "Reload"
Check if you are able to connect to eclipse market place url (http://marketplace.eclipse.org/) from browser. If its working then the issue is because of proxy server using in your network.
We have to update eclipse with proxy server details used in our network.
Go to :- Windows-> Preference -> General -> Network Connections.
And edit HTTP ,with proxy details.
Click OK
Done.
I was having this problem and it turned out to be our firewall. It has some very general functions for blocking ActiveX, Java, etc., and the Java functionality was blocking the jar downloads as Eclipse attempted them.
The firewall was returning an html page explaining that the content was blocked, which of course went unseen. Thank goodness for Wireshark :)
Another way to solve this kind of error is to start eclipse with this argument
-vmargs -Djava.net.preferIPv4Stack=true
Working fine with Eclipse (x64) 4.3.1
Had this problem in Linux, and I found that the user doesn't have permission to update the eclipse directory
change the owner of eclipse folder recursively, or run eclipse with user who has write permission to the folder
In Windows 7 32-bit version, I started the eclipse with as an administrator. This worked for me.
I had the same problem. Try to deactivate your Firewall (I had avast!), which worked for me.
(Sorry for my English I'm French :D)
Please make sure you are using correct url. If You are using url - http://download.eclipse.org/releases/indigo on your eclipse luna(v4.4) then it might be not working in this case you should use - http://download.eclipse.org/releases/luna
I have tried this and its working.
What worked for me:
Since yesterday, I have been trying to install the Eclipse plugin - "Remote System Explorer" from the Eclipse marketplace on a freshly downloaded Eclipse 4.8 as shown below,
and everytime I was getting this error:
Unable to read repository at http://download.eclipse.org/releases/kepler/.
Unable to read repository at http://download.eclipse.org/releases/kepler/201306260900/content.jar.
download.eclipse.org:80 failed to respond
which brought me to this SO post.
I tried a few solutions mentioned here in the different answers like this one and this one and this one, but none of them worked. I just gave up almost, thinking that either the corporate network here is somehow blocking the specific download requests or the 4.8 version of Eclipse is buggy.
Discovery:
I could not reload all the paths under 'Window' -> 'Preferences' -> 'Install/Update' -> 'Available Software Sites'.
Preconditions:
What did work for me from the beginning was:
I could open google.com from the internal web browser of eclipse and,
some of the update paths, I could reload even. (As was mentioned as a possible solution or test, in some of the answers here, like this one.)
Finally, this answer put me on the right track - for my specific case, at least. Just my step was to do the exact opposite of what that answer was doing.
Solution:
I had to change all the http:\\ paths to https:\\ and suddenly it started to work. I don't know who - either IE/Edge on Windows 10 or the Windows 10 firewall or the company firewall is blocking HTTP communications. But with HTTPS, I can finally install plugins from the Marketplace.
HTTPS reload works
I must say, what is strange is that not all the paths required https. Except a few, the rest seemed to have had no problem working with HTTP. But I anyways changed all to HTTPS, just for good measure.
Then reload all the repositories one by one. Press "Apply and close".
Then check for updates. Eclipse will update itself successfully now.
Restart after update.
Finally you can install whichever Plugin you would like to from the Eclipse Marketplace.
Note: In case during the update, this same error pops up again, then see in the repositories that any new paths added by eclipse during the update, are also HTTPS and not HTTP.
Kudos to #Fredrik above. His answer didn't work for me, but lead me to the resolution of my issue:
In 'Window'|'Preferences'|'Install/Update'|'Available Software Sites'. The location that I was attempting to install from the 'Marketplace' was getting inserted with an https:// URL. Editing this to http:// allowed me to then use 'Help'|Install New Software ...' to select the repository from the drop down 'Work with:' combobox instead of having the https:// one automatically inserted and used.
For eclipse, there are normally different options available:
If you want to use the PHP development environment (only), you should go with the corresponding distro of eclipse. There is a distro for PHP provided by Zend.
You may add PDT to an indigo release by doing the following steps:
Check if an update site for PDT is included in your eclipse installation:
Open the Help > Install New Software dialog.
Click there on the link Available Software Sites.
In the list, the URL http://download.eclipse.org/releases/indigo should be marked.
Close the dialog.
Select from the Work with list the site with the right URL.
Enter in the filter box PDT and search in the list for the PDT tooling you want to install.
Install the PDT tooling.
If that does not work, you may download a complete update site from the PDT project site.
Visit the site (URL above).
Click on downloads.
Search there for the string "all in one update site".
Download the zip file.
Install it in your Indigo installation. Help > Install New Software > Add... > Enter name and select from button Archive the zip file
I hope some of the installation instructions will work for you.
This is the correct URL. Chances are Eclipse cannot read it properly because of the Internet connexion.
Are you using a proxy to get Internet access? If this is the case you need to notify Eclipse via the "Preferences/General/Network Connections" menu.
That URL works fine. The message you report is normal when you look at it in a browser. My copy of Eclipse has no problems talking to it. If yours does, I suspect a proxy configuration error in your copy of eclipse.
Also try it by turning off the firewall, and similar services. It worked for me!
If you can't access https://dl-ssl.google.com/android/eclipse/ simply
try to use http://
instead of https://
I spent whole my day figuring out this and found the following. And it works great now.
This is basically an issue with your gateway or proxy, If you are under proxy network, Please go to the network settings and set the proxy server settings(server, port , user name and password). If you are under direct gateway network, your firewall may be blocking the http get request from your eclipse.
I was also unable to read the repository. Even after the disabling most of the entries under Available Software Sites things were still not working.
I had no proxy to worry about and even disabling the firewall (which I do not recommended) as a last resort did not help.
Viewing the error log, from the dialog box which Eclipse displayed, there was mention of a cache directory under .eclipse in my home directory. I deleted the two cache directories I found and Eclipse was working again.
For my setup the two directories I deleted were:
.eclipse/org.eclipse.platform_4.4.2_119745494_macosx_cocoa_x86_64/p2/org.eclipse.equinox.p2.core/cache
.eclipse/org.eclipse.platform_4.4.2_119745494_macosx_cocoa_x86_64/p2/org.eclipse.equinox.p2.repository/cache
NB: My setup is Eclipse Luna 4.4.2 running on Mac OS X Yosemite 10.10.3
In my case, I discovered that the major issue why my eclipse won't connect to internet is my Internet Service Provider. I was only able to browse some websites but unable to browse other website. Fixing the issue with the ISP worked.
My issue was the Eclipse Marketplace client needed updating.
After trying Fredriks solution of
Go to Window -> Preferences -> Install/update: Available Software sites. Then remove and add the indigo site. Just remember to copy the adress so you can add it again.
The Marketplace client wouldn't load. But I could access it via a browser.
So, I went to the Help -> Eclipse Marketplace
it loaded fine
Clicked on Installed and found the Eclipse Marketplace Client and it had so i clicked it it updated and then when I did the standard update everything worked.
Sometimes, there will be firewalls and restrictions in the network preventing the plugin to get downloaded. We can try some other network. This actually resolved my issue.
I was facing the issue while adding team explorer plugin to eclipse from https://marketplace.eclipse.org/content/team-explorer-everywhere.
Used team explorer plugin for ecplise for internal use of xamarin for mac.
Error:
unable to read repository at http://marketplace.eclipse.org/content/team-explorer-everywhere
org.eclipse.equinox.p2.core.provisionexception unable to read repository
Unknown host exception
Goto https://github.com/microsoft/team-explorer-everywhere/releases
Download: TFSEclipsePlugin-UpdateSiteArchive-14.135.0.zip
From Eclipse->Help->Install new software.
From Add Repository window select Archive select the downloaded zip file.
Continue installation.
Also try if in the eclipse paths there is some duplicated
Luna - http://download.eclipse.org/releases/luna
Luna - http://download.eclipse.org/releases/luna/1234567...
Try both of them, one may work.
In my case, with 2 eclispes installed, in one of them the path
Luna - http://download.eclipse.org/releases/luna
works, in the other one, i must select:
Luna - http://download.eclipse.org/releases/luna/123456...
In both the internal browser can access to internet. Both are Luna (but one is RCM, the other one i don't remember).
No meu caso era o anti-vírus que estava bloqueando a conexão do eclipse, desativei o anti-víruse tudo funcionou o//.
Translation:
In my case it was the anti-virus that was blocking the connection from eclipse. I disabled the anti-virus and everything worked.

P2 headless update not working

I have taken the org.eclipse.equinox.p2.examples.rcp.prestartupdate project and adapted it for use in my RCP application. I then setup an update repository that gets updated as part of my nightly build.
When I open my application it goes through the motions like it is updating - it finds the update site, generates an uninstall and install operand for each bundle correctly and says that it finished with no errors. The problem is that the plugins never actually get installed in the plugins folder even though the profile gets updated (a subsequent run states there are no updates). Next time my build runs it correctly identifies there are updates, but the same thing happens again.
I have spent days debugging and the only thing that looks out of the ordinary (not that I fully understand what is going on) is that during the final configure phase none of the TouchpointData objects have any instructions so it doesn't look like configure is doing what it should.
I really have no clue where to look next and would like to see if anyone else has any ideas.
Update:
I finally figured out what was going on.
The problem started when I built my product without the generating the metadata repository. When building through Eclipse I didn't check the "Generate metadata repository" in the export product wizards because I didn't need a p2 repository, just the product. The problem is that without checking that button the product does not install as P2 enabled causing side effects such as not generating a profile among other things.
I tried to compensate for this by manually creating a profile in code which I have since found out is a really bad idea. My original problems were created because my profile wasn't set up correctly.
Once I started exporting the product with "Generate metadata repository" checked the update started correctly installing the new plugins.
The problem I have now is that although the plugins are being installed correctly, the executable is getting trashed and I cannot launch my application any more. I am building my update site through Hudson and the binary folder which is present when I use the Eclipse Export Product wizard is missing. I am assuming that is what is going wrong now.
Any ideas why the binaries would not be building in my headless PDE build?
Figured this out also. I had assumed that all I needed was the individual launcher plugins for the platforms I wanted to build on. Since I was trying to understand the process I was copying over plugins one by one to the build server. It turns out to include the platform specific binaries in the build you need to have the org.eclipse.equinox.executable feature from the delta pack. Once I added that to the build the binaries started showing up in the output. With the binaries the update mechanism works exactly as intended.
I had assumed that all I needed was the individual launcher plugins for the platforms I wanted to build on. Since I was trying to understand the process I was copying over plugins one by one to the build server. It turns out to include the platform specific binaries in the build you need to have the org.eclipse.equinox.executable feature from the delta pack. Once I added that to the build the binaries started showing up in the output. With the binaries the update mechanism works exactly as intended.