Issue in associating simple java project with sonar-eclipse - m2eclipse

I was trying to analyze a simple java project using sonar.
Following are the things I have done so far:
Installed the Sonar2.0 plugin for Eclipse helios 3.6.
Installed the Maven plugin for eclipse.
After setting up the plugins, I created a simple java project .
Then I created the POM.xml file to enable the Maven Dependency In that I have given the GroupId as <ProjectName> and ArtifactId also as <Projectname>
Then I tried to associate the project with Sonar (Using right click on Project >> Configure >> Associate with Sonar)
Here I am stuck up with a problem. When I select http://localhost:9000 as my server and I try to search this project, "project '' with key 'projectname:projectname' not found on server" is displayed as an error
Please help me to solve this issue.

You need to have an actual sonar-server installation. And the Analysis for your project must have run once.
Before those steps your project can't be found on the server, because your server doesn't know it exists.
See: Sonar plugin Eclipse

Related

Eclipse can't determine node.js version

error screenshot
When I use Eclipse to build a maven project. I need SpringBoot so now I want to edit .yml file. But it always pops this interface! I have tried version 10、12. Now the node.js version is v10.20.1. I have edit the .bash_profile and export /usr/local/bin. Should I make some changes in Eclipse?

Lombok installation in Spring Tool Suite 4 for Windows

To install Lombok on one of my spring boot project on STS 4 in Windows 10 OS, I did the following steps:
Added the lombok gradle dependency to build.gradle:
compile 'org.projectlombok:lombok'
Then to install the jar retrieved from building the above dependancy got a lombok-1.16.16.jar.
To compile the jar did a right click on the jar -> Run as Java application.
Lombok Installer appeared, but couldn't detect the IDE from the drives. So manually tried searching for the .exe file of STS4 (which I couldn't find)
So kindly help me find the .exe file of STS, so as to complete the installation
The Spring Tool Suite 4 by default has a name as SpringToolSuite4 which is the executable file. This file doesn't get detected in the Lombok installer.
After googling it for quite a long time, all I could see were results of how to install the same of Mac or Linux.
Finally, had to experiment a little. Following is the solution:
Rename the SpringToolSuite4 (Application(.exe)) file and (Configuration settings (.ini)) to sts and now it is detectable in the Lombok installer.
Complete the installation and restart STS and rebuild-clean your project and it works just fine.
You have to add the Lombok JAR file reference to the ini file. The inif file is in the STS installation directory:
-javaagent:<your-path-to-lobmok>lombok-1.16.16.jar
If you are using Spring Tool Suite4, the name of the app is no longer STS.app on MacOS, however, the installer still uses the old name, which on macOS is part of the path. So if you use the installer, check the path in the .ini file to ensure that the name of the app used in the path is correct.
After following the suggested lombok installation on the page
https://projectlombok.org/setup/eclipse
and if it doesn't work
go to C:\User\.m2\repository\org\projectlombok\lombok folder
and remove all versions of lombok contained in the folder
(do not worry maven will redo the files needed for lombok to work)
if using spring boot put in pom.xml:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
and maven update with the force update option
I'am using
Spring Tool Suite
Version: 3.9.4.RELEASE
Build Id: 201804120943
Platform: Eclipse Neon.3 (4.6.3)

How to download and run grayLog2 code base

I am new to GrayLog I need to run GrayLog code in eclipse so that I can do some code changes and explore it
so far I have cloned the code from git here
I'm not sure how to (which type of project ) import it to eclipse and run it
please help
Graylog is a Maven project.
You can import it like any other Maven project into Eclipse: Using Maven within the Eclipse IDE - Tutorial

Phonegap 3.4.0 fails to build new projects and update old projects

I recently updated phonegap, node, and npm. I have an existing project I previously built with Phonegap version 3.3.0. I then attempted to update my existing project using phonegap platform update ios and received an error stating that the '/platforms' directory does not exist.
I don't think it makes any difference, but I also tried to use the cordova command instead of the phonegap command, but I just get the same error as above. I even created a completely new project with phonegap create Test and I am able to get a project built successfully, but when I try to run/build I get a similar error: Error: /platforms does not exist. Please specify an existing parent folder. [error] /Users/mftcmbp1/.cordova/lib/ios/cordova/3.4.0/bin/create: Command failed with exit code 1 Even stranger, I am able to successfully create a project with the cordova command, build ios and android platforms, and emulate the project, yet I can't do this with the phonegap command like I could before I updated.Any help or suggestions of why this would be occurring will be helpful.
Thanks!
Not sure if there is a bug with Phonegap 3.4.0, but I fixed my issue by uninstalling the latest Phonegap version and installing Phonegap version 3.3.0-0.19.4.
1- you need to 'cd' to your project and add platform first before build
cd Test
2- then add platform
iOS
phonegap platform add ios
android
phonegap platform add android
3- then you can build your project
iOS
phonegap build ios
android
phonegap build android
I ran into this over the weekend, have you tried:
$ mkdir project_directory/platforms
As I remember it, that solved the issue as a hotfix.
The error occured after a project was cloned from github without the platforms directory.
I ran into the same issue, and it looks like an error in the update script, and specifically this file:
node_modules/phonegap/node_modules/cordova/src/util.js
The quick fix is, in the function isRootDir, to change "config.xml" to ".cordova", i.e.:
- if (fs.existsSync(path.join(dir, 'config.xml'))) {
+ if (fs.existsSync(path.join(dir, '.cordova'))) {
The old version identified the base project directory via the existence of the .cordova directory. The new version is incorrectly looking for a directory that contains these three items:
www/
config.xml
platforms/
config.xml should not be in the base directory, it's under www/, which is why it fails.
The script does have fail-safe, which is to look for www/config.xml. However, the way it does this is to continue traversing the tree towards root, and if at any time it finds another www/config.xml, will assume this is a better candidate for the project directory.
In your situation, I'm guessing you have a /www/config.xml off of your root directory, and PhoneGap is erroneously thinking that is your project directory.

publish red5 web project in linux

I have created a dynamic web project in eclipse and published it via red5-eclipse plugin in Windows.
I need to publish the same application in red 5 server installed in Linux machine.
In case of Windows just copying the application folder under webapps and restarting the red5 server works.
But when i try the same in Linux its not working.
Any inputs would be greatly appreciated.
Even on windows you shouldn't be doing the work of copy/paste into the webapps folder.
Thats the very reason to use the Red5 plugin in eclipse, i.e to make your life easier.
I assume you are using the JAVA EE version of eclipse. Just follow this old tutorial, which is still very much valid:
http://trac.red5.org/wiki/Red5Plugin
Once configured properly, you will see the Red5 Server in the bottom panel under the "Servers" tab. There you can directly publish your app to the server, debug, start/stop etc.
For your Linux specific issue, in most probability, you have to set the correct permissions for the Red5 webapps directory in order to put new projects in there. There is no reason otherwise for it to work differently than Windows.
Solution Using Netbeans and Glassfish Server:
Red5 can be installed as stand alone server or as a war deployment.
The procedure is to create war deployment of red5 version 0.8(old version). (Lengthy, please bear with me).
Download and install jdk1.6, glassfish2.1 and netbeans 6.5 on linux.
Download "Red5War_0.8.0.war".
I am sharing in the hope that the following may help the community to create a deployable war red5 version 0.8 on glassfish2.1 by following the steps using in Netbeans 6.5:
Step 1: Un-zip the Red5War_0.8.0.war
Step 2: Create a web project named "red5" in Netbeans
Step 3: Copy the content of "/WEB-INF/classes" of inflated war folder and paste it in "Source Packages" of Netbeans Project.
Step 4: Right Click "Libraries", add "JAR/Folder", navigate to "/WEB-INF/lib" of inflated war folder, select all the dependency jars and Click On "Open" of Netbeans Project.
Step 5: Delete WEB-INF of Netbeans Project (Note : Ignore Warning/Error).
Step 6: Delete META-INF of the inflated folder.
Step 7: Copy the remaining content ("/WEB-INF/classes" and "/WEB-INF/lib") of the inflated folder to "Web Pages" of Netbeans Project.
Step 8: Open the following ports in the firewall TCP/843,TCP/1935,TCP/5229,TCP/5080
Step 9: Run the project
Step 10: Deployable war file "red.war" is created in the Netbeans Project Folder(../NetBeansProjects/red5/dist/)
Please share your findings in creating new version(1.0, 1.0.1, 1.02) war deployments using new version netbeans, jdk on new version glassfish server(3.x).
Best wishes!
Arumugam A.V

Resources