Environment:
Eclipse Luna 4.4.0
SonarQube 4.3.1
SonarQube Eclipse plugin 3.4.0.20140404-0949-RELEASE
Windows 7 and Mac OSX 10.9.4
On the SonarQube server, I have several projects which are already analyzed. Most of them are in Java, and I used Maven to analyse them. All of them have the same groupId (com.mycompany) but a different artifactId (productname). The project keys in SonarQube are thus com.mycompany:productfoo, com.mycompany:productbar, etc.
I have installed and configured the SonarQube Eclipse plugin, as described in the documentation. Connection with the server was tested.
I have checked out the Maven projects from source control.
I was able to associate most Eclipse projects with the corresponding SonarQube project.
However, for one project, when I try to associate it, the plugin always associates it with the wrong project. It does not matter if I enter the product name or the product key in the search box.
I associated with the wrong project anyway, closed Eclipse and then edited .settings/org.sonar.ide.eclipse.core.prefs: I changed the value of projectKey to the correct value (com.mycompany\:productbaz). If I then restart Eclipse and run an analysis, it seems to work.
So my question is: How can I associate with the right project, without needing to manually edit the prefs file?
Related
I'm going through this difficulty, I'm new to using this technology. Before formatting the machine, this project was running perfectly, I backed up everything and formatted. Now that I try to import the project into the software I come across some errors.
I performed the import through Maven->existing maven projects, the build runs, but returns the following errors:
Error in pom.xml file.
Some maven dependencies are missing.
Build path specifies JavaSE-11 execution environment. There are no
JREs installed in the workspace that are strictly compatible with
this environment.
The compiler compliance specified is 11 but a JRE 17 is used.
Please,look at the prints:
Since then I have been trying to resolve these issues, I have checked the versions of java, jre, jdk and the like. I managed to partially solve the jre problem but after some time I had conflicts again, but involving maven dependencies I didn't get any success.
Honestly I don't understand the reason for the errors, I kept the same computer settings before formatting, that is, I installed the versions that were before.
I would suggest to look into the preferences for the installed JDKs/JREs for your workspace. You can find those settings via Preferences -> Java -> Installed JREs. There you can see which JREs are configured to be used by the IDE for your projects (in general).
Then, please also take a look at the Execution Environment category below that preference node. There you can define which JRE should be used for which execution environment. Your project seem to require a JavaSE-11 environment. When you select that environment from the list, you will see which installed JRE the IDE will use to fulfill that JavaSE-11 requirement of the project.
I would also run a Maven -> Update Project---, since the dependences that are marked in the pom.xml file seem to be just fine, so probably a broken download of those dependencies, but also hard to say without the exact errors being mentioned.
I am trying out Eclipse (because of frustrations with apparent version incompatibilities when upgrading another IDE), but it is proving equally problematic. This is a perfectly clean Eclipse installation (windows installer, second variant option), so it's an ootb issue.
(Simplified, theoretically-reproducable version): I downloaded two copies of a basic Java 17 project from Spring Initializr with no dependencies; one as Gradle, one as Maven (tester & tester2 respectively). The Gradle build shows errors where there are none, per the screenshot.
Note that in the one class in the besic, clean SpringBoot application, it sees the package name, the class name, and even the definition of String as being errors. But the same code in the Maven version is fine.
There are further issues that appear to derive from this, but keeping it simpleā¦
At some point during my testing, some message/error showed up that suggested it was building with Gradle 6.8.3, which I believe would be a problem as that version doesn't support Java 16+. Eclipse is configured to use 7.3.
How do I tell Eclipse to recognise a valid project, so it can be worked with?
I am trying to setup Anypoint Studio 6.6 on my MacBook, I have been using it on windows and it works fine. I have installed Java 8 and Maven 3.6.3 and I have also set up the environment variables so I can use java and maven on the terminal and the works good. On preferences, the Installed JREs and classpath variables are all pointing to the JDK but when I try to run a project with maven, I get the error - There was an error running the studio:studio goal on project projectname.
I updated the settings.xml as instructed by the documentation https://docs.mulesoft.com/mule-runtime/3.9/configuring-maven-to-work-with-mule-esb, but I am still getting this error. How can I fix this please?
Those instructions are to set Maven to work with Mule. You also need to point Studio to your Maven installation, which I suspect you already did. For the error related to studio:studio, you should have pasted the complete error in the question, however I guess you need to add the plugins repository: https://stackoverflow.com/a/24557069/721855
I've been using Eclipse for programming and testing Storm just fine, however, I created an SVN account, where I commit the project, and for that, I needed the SVN plugin for Eclipse. It worked, but after that, i get this message on a popup error window when I try to launch:
Referenced classpath provider does not exist:
org.eclipse.m2e.launchconfig.classpathProvider
I realised that in the "configure" menu, the option "convert to maven project" (right click on project) disappeared. The "runAs" options for the java topology doesn't run with this error, and the "pom.xml" cannot be run as maven.
Possible fix tried:
I tried to reinstall all maven builders to Eclipse(it doesn't let me to unninstall).
I tried to rebuild config by:
mvn eclipse:clean eclipse:eclipse
None of this worked, my Eclipse version is:
Eclipse Java EE IDE for Web Developers.
Version: Mars.1 Release (4.5.1)
Build id: 20150924-1200Eclipse Java EE IDE for Web Developers.
On Ubuntu Gnome 14.04.
As I said, it was running perfect until I installed SVN plugin.
EDIT
I realised that I have installed two plugins of m2e:
Maven integration for Eclipse (Luna and newer)1.5
Maven integration for Eclipse (Luna)1.5.0
Both in marketplace, but I have no way to uninstall them, it says:
[plugin] cannot be fully uninstalled because other installed software requires it. The parts that are not required will be uninstalled.
EDIT 2
In the "Installation History" within the "Help>Installation details" menu, I saw that "Maven integration for Eclipse (Luna)1.5.0" was installed by (or with) SVN plugin, so I think the problem is there, nevertheless, I can't uninstall it as I said in my first "EDIT".
If anyone has a clue about what is happening, please, help me.
Thanks in advance!
We use Subclipse in Eclipse (Kepler and Mars) without problems (Did you install Subclipse or Subversive?).
To check out projects as Maven projects, you should install a m2e connector. Subversive has one in the "Discovery" catalog while for Subclipse there is a separate update site.
If your eclipse plugin configuration is somehow broken, I would start again with a virgin eclipse (Mars.1, Mars.2 or Neon) which already contains m2e in version 1.6 or 1.7. Then you can install Subclipse or Subversive and try again.
Workaround proposal: simply don't deal with SVN within eclipse!
Instead, you can use "git svn" on ubuntu.
Meaning: with git svn you can create a local git repository, that allows you to commit/fetch to a remote SVN server. But to your eclipse ... that repository looks a common of garden GIT repository.
In other words: using that tool, you can still connect to SVN (although I don't understand why anybody would want to do that in 2016); but you have all the features of git available to you as well (including full support within eclipse; without installing any additional plugins).
I created a maven project in myeclipse project as:
1) mvn clean install
2) mvn eclipse:myeclipse
I, then, imported project into myeclipse but I got loads of build errors like
enum should not be used as identifier, since it is a reserved keyword from source level 1.5...
I have used maven 3.2.5 for building and creating project with maven.
I am using myeclipse 10.7.0 with Java 1.7.0 JDK.
Please help.
You have a variable with name enum. Since enum is a reserved word in java 1.5 or higher you should rename the variable.
For more information you should add your code and the stacktrace.
From the error message, it looks like you have a project that is defined as a Java 1.4 (or earlier) project, but you have Java 1.5 code (enums) and that is producing the Java editor validation messages. Check your pom to see if it defines a Java source level. If so, ensure it is correct, or else define one, or change the java compiler level in the project properties. If you change the pom, make sure you right click on the project and select Maven4MyEclipse->Update Project.
Just an additional note. You do not need to run mvn eclipse:myeclipse to import a maven project and this is likely to result in a bad MyEclipse project as that Maven plug-in is not provided with MyEclipse. Instead, use Import->Maven4MyEclipse->Existing Maven Projects.
A further note is that 10.7 is no longer fully supported, it's recommended that you switch to the latest release (2015 Stable 1.0 or 2015 CI 11).
The problem has been solved by installing latest version of the eclipse. It automatically installed the m2e for myeclipse and compiled the projects without any errors.