Customizing Subclipse's commit action to run sonar analysis - eclipse

We are using Eclipse Luna with Subclipse plugin to connect with SVN server (VisualSVN). The requirement is to modify the behaviour of commit action so that before check in , sonar analysis is carried out on all the files lined up for check in.

You should look into SonarLint, which will run checks as you code.

Related

SVN Checkout As Error

I installed both m2e.subversive and Subclipse onto eclipse, but when I tried to paste in an svn URL it gives me the error below. I've looked around the net but can't seem to find a solution.
SVN: 'Checkout As' operation finished with error
Selected resource is not cCheckhecked out.
Selected SVN connector library is not available or cannot be loaded.
If you selected native JavaHL connector, please check if binaries are available or install and select pure Java Subversion connector from the plug-in connectors update site.
If connectors already installed then you can change the selected one at: Window->Preferences->Team->SVN->SVN Connector.
If you have already installed a connector, this sounds like Eclipse bug 518033. See comment 7 for a workaround.

Sonar Lint Eclipse Issue

I'm using Eclipse Neon and SonarQube 5.6.6(LTS). I've install sonarLint version 3.1.0. Following are my question.
In SonarLint whether there is an option to analyze the entire project? I can't able to find such option.
The issue showing in Eclipse reported by sonar lint is different from reported on server. When I'm wantedly creating the sonar issues(based on the rule) in eclipse but SonarLint is not recognizing . why?
From Eclipse I've made the connection to the SonarQube server and the connection was success, Whether it is using the activated quality profile rule?
After resolving the issues, how the issues will be reflected to the sonarQube server ? In case of Maven whether I need to add the sonar properties and sonar-maven plugin and trigger the build?
1. Select your project and in Eclipse's Quick Access, select Analyze - Analyze with SonarLint. You can also assign a keyboard shortcut to this action by going to Window -> Preferences -> General -> Keys.
2. It seems as if you are not running in connected mode. Connecting a SonarQube server is not enough, you also have to bind individual projects. To do this, right click on your project in Eclipse, and select SonarLint -> Bind to a SonarQube project... Search for the name of your project on the server by typing in the box under SonarQube project, as show in the following screenshot:
Once connected, a SonarQube symbol should appear on your project's icon in Eclipse.
3. Once connected, the quality profile of your SonarQube server project will be used.
4. SonarLint only provides on the fly feedback, but does not trigger any analysis server side. Personally I have a clean verify sonar:sonar Maven run configuration for my projects, and run it every now and again within Eclipse.
I recommend reading the SonarLint documentation for more information.
I personally recommend either to change your version or to be sure which configuration really applies to your machine. I had similar problem when i tried to associate my local project with the project name on Sonarqube Server . I was using Eclipse IDE for C/C++ Developers Version: Luna Service Release 2 (4.4.2) with Sonarlint version 4.0 . I uninstalled it(sonarlint) and installed the Sonarlint 3.6 version. After this i could associate my project with Sonarqube Server.
Hope it Helps the main question.

Jenkins and Eclipse Plugin

I am new to Jenkins. How Jenkins is helpful for a developer using Eclipse IDE? In simple, how to set up Continuous Integration with Eclipse and Jenkins?
Please guide me to a link where I can follow steps to set up Eclipse with Jenkins plugin and trigger builds from developer machine.
Thanks in advance!
If you are new to Jenkins Tutorials Point has a good tutorial that will guide you through the basics
http://www.tutorialspoint.com/jenkins/
Jenkins also have a step-by-step guide
Plugin tutorial: https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
Using Eclipse with Jenkins: https://wiki.jenkins-ci.org/display/JENKINS/Setting+up+Eclipse+to+build+Jenkins
The critical connection you have to have is a build process, using either Gradle or Maven. Once you can build your project from the command line using your build script, you can start to automate it in Jenkins. If you don't have that build process yet, you won't be able to automate it with Jenkins.
You'll also need a source code management (SCM) system, like git or Subversion. In general, you don't want to have to trigger builds manually, you want builds to trigger automatically when new code is checked into git or subversion. Plugins in your SCM or in Jenkins can "watch" your code repository for new checkins, and spawn builds from that.
I just tried something which actually worked for me and I think sharing the recipe will be helpful for the newbies to the DevOps-Development integrated environment.
Drag and drop this plugin (Hudson/Jenkins Mylyn Builds Connector) in your Eclipse workspace and proceed with the installation process with Eclipse marketplace wizard. Once it is installed you will be asked to restart your Eclipse in order to reflect the new changes.
*If there is any issue installing the plugin then it means, plugins that you have are conflicting with the ones attempted to be installed. Once it computes the alternate paths, it pops up the next wizard page. You should be able to see what the conflicts are and choose one of the necessary actions.
Next, in you Eclipse IDE, go to Window ---> Show View ---> Other ---> Mylyn ---> Builds
Select Builds and click Open.
You will now see a Build page in your Eclipse IDE. Just go ahead and click on "Create a new build server". A new window will pop up, select Hudson(supports Jenkins) and click Next.
Copy paste your Jenkins server URL in the Server field and give it a name (Label), click Finish.
You will see your new build server under Builds. Right click on it ---> Plan ---> Open in browser.
This will open your Jenkins dashboard inside the Eclipse IDE. You will be able to perform any operation and trigger a Build pipeline job from here.

GGTS - SVN check out never complete

I am using GGTS (64 bit) for a small Grails project.
I created SVN repository on Google drive using TortoiseSVN and checked-in the project.
On second computer, I tried to check-out the project but it seems that GGTS cannot complete the checkout.
I can see the "Check out" task is stack in 98%, I can see all files in the newly created project in the workspace, but the task never ends.
I can also see other tasks running:
Refresh DSLD scripts
Refresh external folders
Decoration calculation
Resources changed
Using latest Subversive with SVNKit 1.8 64bit.
What's the point of storing Subversion repository in Google Drive? Don't do this.
Can you reproduce this using a command-line client?

How do you get Eclipse/Mylyn to fill out your commit messages for you?

I've setup the following:
Installed Mylyn in Eclipse
Installed the Bugzilla connector
Installed Subversive SVN Integration for the Mylyn Project
I've gone to Windows -> Preferences -> Tasks -> Team and clicked Change Set Management and left it with the default Commit Comment Template:
${task.status} - ${connector.task.prefix} ${task.key}: ${task.description}
${task.url}
However, if I activate a bugzilla bug in the Task List, and then edit a file, when I commit the changes the commit message isn't filled in.
Also, in the Synchronisation perspective there isn't a change set for the task I'm working on.
I've tried following the instructions on the Eclipse wiki's Mylyn FAQ for Why does task change set not appear when I modify files? but the bullet point:
Verify that the configured Synchronize View is configured for change sets. points to a section that is no longer in the document.
I have a Show Change Sets button, but clicking it only shows me incoming change sets, there aren't any outgoing change sets.
What am I missing?
Did you activate the checkbox "Automatically create and manage with task context" in the group "Change Set Management" in the preference page?
I had a quick look at the Eclipsepedia article for Mylyn and you havent mentioned the Mylyn-Bridge in your installation. Did you install this feature?.
The article also says that you also need enabling features for the Client you are using
I am on Eclipse 3.4 with Mylyn 3.3.2 and this works just fine. There is probably something missing in your configuration.
Here is what is installed on my system (with the standard CVS-Client):
Mylyn Bridge: Eclipse IDE
Mylyn Bridge: Java Development
Mylyn Bridge: Team Support
Mylyn Connector: Bugzilla
Mylyn Task List
Mylyn Task-Focused Interface
If you are using Subversive you also need the Subversive Team Provider and similar it goes for Subclipse.
What worked for me was using the task focused changesets as in here:
http://wiki.eclipse.org/Mylyn/User_Guide#Task-focused_Change_Sets
I had to install Subversive SVN Integration for the Mylyn Project from http://download.eclipse.org/technology/subversive/2.0/update-site/
I had the issue even though the properties were set correctly and I had all connector installed.
To fix issue, it was necessary to:
disable the checkbox "Automatically create and manage with task context under MyLyn/Team preferences,
Apply modifies
Recheck the box.
After applying of these modifies, automatic message re-appeared to my comments