hmvictor / radar-netbeans

A SonarQube plugin for Netbeans
Other
33 stars 22 forks source link

Go to source is not working #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get issues from server
2. double click on an issue type
3. right click on an issue and click Go to Source

What is the expected output? What do you see instead?
It is expected to go to the line the issue detected, but it does not do 
anything.

What version of the product are you using? On what operating system?
Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25
Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b26
System: Windows 8 version 6.2 running on amd64; Cp1252; en_US (nb)

Original issue reported on code.google.com by mehdi.te...@gmail.com on 13 Apr 2015 at 4:05

GoogleCodeExporter commented 9 years ago
I forgot to mention that I use Version: 2.3.1 of radar plugin 

Original comment by mehdi.te...@gmail.com on 13 Apr 2015 at 4:08

mario-s commented 8 years ago

I have the same issue with NetBeans 8.1 and Java 1.8.0_66. I'm using version 2.6 of the plugin. I get an error dialog with a message like this: Project not found with key: XXX This happens only on a Maven multi-module project, when I choose "Get Issue from server" for a sub module.

Stacktrace: qubexplorer.ProjectNotFoundException at qubexplorer.ui.issues.IssueLocation.getFile(IssueLocation.java:101) at qubexplorer.ui.issues.IssueLocation.getFileObject(IssueLocation.java:119) [catch] at qubexplorer.ui.SonarIssuesTopComponent.openIssueLocation(SonarIssuesTopComponent.java:683) at qubexplorer.ui.SonarIssuesTopComponent.access$300(SonarIssuesTopComponent.java:108) at qubexplorer.ui.SonarIssuesTopComponent$4.actionPerformed(SonarIssuesTopComponent.java:173) at qubexplorer.ui.SonarIssuesTopComponent.issuesTableMouseClicked(SonarIssuesTopComponent.java:551)

hmvictor commented 8 years ago

Hi @Mario-S, let me check this out. I haven't tested Radar with SonarQube 5.6 that is available since this month. What version of SonarQube are you using?

adrianolabate commented 8 years ago

I also experience the same issue "Project not found with key: ch.blabla.framework.epayment:xframework-epayment-ei". I have also a multi-module Maven project where ch.blabla.framework.epayment is the parent project and xframework-epayment-ei is one of the modules.

radar-netbeans is version 2.6, sonar is version 4.5, netbeans is version 8.1 patch 1.

CobaltChicken commented 8 years ago

I've just submitted an issue with project key prefixes, which may be the same problem in other guise. Problem seems to be that Radar assumes project key from sonar = project name in Netbeans, which is not always the case.

sahlex commented 7 years ago

Same for me. I'm working with NB 8.2, radar plugin 2.7, SonarQube 6.2.

The problem seems to be occurring when the code in question is contained in a sub-project, which itself is not a project of it's own right in sonar. At least it doesn't show up in the project list. However, when selecting the sub-project in sonar UI , the link pointing to the subproject shows the correct (sub-) project page.

So maybe the project list downloaded from SonarQube does not contain the sub projects and because of this it's not found by netbeans-radar?

hmvictor commented 7 years ago

Hi, @sahlex. Do you have an example to reproduce this issue?

Thanks in advance.

sahlex commented 7 years ago

Hi @hmvictor.

Unfortunately all of our code is closed-source so I can't provide you access to neither our code nor the sonar server.

In the meantime I tried with the sonar runner in each of the subprojects/modules, which is working fine. But of course I'd like to work with the issues from sonar server as the sonar runner needs local processing which takes a lot of time.

How could I help you by other means?

Alexander

hmvictor commented 7 years ago

A sample project, not real code, but something to replay this issue would be useful.

Nice day.

sahlex commented 7 years ago

I'll prepare it, Hang on.

sahlex commented 7 years ago

Ok, Here you go.

Steps to reproduce:

  1. compile project (see zip file below)
  2. execute sonar maven plugin with: mvn sonar:sonar -Dsonar.host.url=https://your.sonar.host -Dsonar.login=****** -Dsonar.branch=master -Dsonar.language=java -Dsonar.java.source=1.8 -Dsonar.java.target=1.8
  3. load project in netbeans
  4. on main (aggregator) project (radarIssue) call SonarQube -> Get Issues From Server
  5. In SonarQube Tool Window open Summary and double-click on an issue. Issue Tool Tab opens up.
  6. In Issues Tab double-click the first issue
  7. voilá

image radarIssue-master-3f787d0b1215f9913cf7e372cdbde4bf55351538.zip

sahlex commented 7 years ago

However, in sonar the projects show up perfectly:

image

sahlex commented 7 years ago

So is it solved? Any progress?

hmvictor commented 7 years ago

I have tested with your example but I had to remove the parent from the main pom file in your folder because I don't have such parent pom. In this scenary, issues in subprojects are correctly opened.

image

image

sahlex commented 7 years ago

OK. I removed the parent dependency, recompiled and re-run sonar analysis.

Still, I get the very same error.

What's the difference?

hmvictor commented 7 years ago

What version of the sonar-maven-plugin are you using to analyze your project? Maybe that's the difference.

jiai commented 7 years ago

<groupId>org.sonarsource.scanner.maven</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>3.3.0.603</version>

My profile differs from the the one suggested by SonarQube because only Jenkins executes it in a scheduled build. Therefore, there are no entries in settings.xml and only a reduced configuration exists in the pom.xml. Does radar-netbeans try to extract some information from these entries in settings.xml or pom.xml?

Jenkins uses "Enable injection of SonarQube server configuration as build environment variables".

fishermans commented 7 years ago

👍 Any news here? Some issue occured. Cannot use the plugin.