Jenkins and Eclipse Plugin - eclipse

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.

Related

How to deploy an Eclipse Plugin?

Environment: Eclipse Oxygen.3a Release (4.7.3a), Build id: 20180405-1200
I have completely developed my new Eclipse Plugin. I have debugged it successfully and It´s ready to be deployed for beta testing by other developers in my organization.
The Overview tab in plugin.xml Eclipse editor offers an Export Wizard that works and produces a .jar file (theoretically) containing the plugin to be installed in other Eclipse installations.
After exporting the plugin to a local folder in my computer I tried to install it in Eclipse by using Help > Install new software... > [Add...] > [Archive...], selecting the .jar file generated and clicking [Ok].
However, I get the error message "Could not find jar:file:*<the selected plugin file>*!" and the [Finnish] button remains disabled.
What is missing to make my new plugin fully installable?
The most robust way to publish a plug-in (or Feature) for others to consume is to produce an Update Site. Then you can direct users to that site so they can install your plug-is/features via the Install New Software UI. It also provides an easy way to publish updates to your plug-ins.
Here is documentation about creating an Update Site.

Customizing Subclipse's commit action to run sonar analysis

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.

GitHub Mylyn Connector installation

If i try to install the GitHub Mylyn Connector, i get this error:
Cannot complete the install because one or more required items could not be found.
Software being installed: Eclipse GitHub integration with task focused interface 3.3.0.201403021825-r (org.eclipse.mylyn.github.feature.feature.group 3.3.0.201403021825-r)
Missing requirement: Eclipse GitHub integration with task focused interface 3.3.0.201403021825-r (org.eclipse.mylyn.github.feature.feature.group 3.3.0.201403021825-r) requires 'org.eclipse.mylyn_feature.feature.group 3.7.0' but it could not be found
- I could not find any other post with this error-message :/
I already installed EGit, and I also tried to install the Github Mylyn Connector with the Eclipse Marketplace but it didn't change anything.
I use Eclipse 4.3 for Mac OS X
Thanks for any help
The GitHub Mylyn Connector has been broken in the Eclipse Marketplace for at least a month now.
To manually install it, visit the EGit home page
http://eclipse.org/egit/download/
And copy the update link you want to use. I use the following:
http://download.eclipse.org/egit/github/updates
In Eclipse, go to
Help > Install New Software... > Click the Add... button
In the Name field type GitHub Mylyn Connector for future reference, and past the update URL in the Location field.
Click the OK button.
You should now see the Collaboration option, and you can expand it to verify that it will install "Eclipse GitHub integration with task focused interface".
Click Next, agree to the terms, Next, have Eclipse restart, and you should be ready to go.
After Eclipse starts up again, open the Task Repositories view > right-click in the view > click Add Task Repository.. > Choose GitHub Issues > Then continue on with configuring for GitHub and creating a New Query.

Using SonarQube in Eclipse

I just installed SonarQube in Eclipse, but I don't know how to use it :
Here It said:
Link projects to Sonar server
What is the server? Should we create another project somewhere else with the same name as the project in Eclipse?
It's really confusing, I will appreciate if someone could help by a small example.
To be able to use Sonar Eclipse, you first need to install a Sonar server 5.1 or older as described here: http://docs.sonarqube.org/display/SONAR/SonarQube+in+Eclipse
Then, you will have to run a first analysis (out of Eclipse) of your project to have it referenced in the Sonar server. See http://docs.sonarqube.org/display/SONAR/Analyzing+Source+Code
After those 2 steps, then you'll be able to run analyses directly within Eclipse once you have associated your local project with the Sonar server.
UPDATE:
Sonar 5.2+ is no longer supporting sonar eclipse plugin in favor of sonarlint. Unfortunately sonarlint has no customization options.
We will make this feature available in upcoming versions, probably by
requiring to "connect" SonarLint with an existing SonarQube server
instance.
Sonar can be run now localy to analyse the java project
for more information visit sonar eclipse
Eclipse update site
Installation guide
Eclipse marketplace
Also you can visit DZONE for step by step installation procedure

Installing Git on Eclipse

How can I install Git on Eclipse? I found tutorials on http://cho.hapgoods.com/wordpress/?p=159 but there was said that "You should then see the eight Eclipse projects 'org.spearce.something.'" I don't see those eight projects.
Just add http://download.eclipse.org/egit/updates to your Eclipse update manager.
Do you have Egit installed yet? If not, go to Window->Preferences->Install/Updates->Available Software Sites. Click on add and paste this link http://download.eclipse.org/egit/updates
For Name, you can just put "EGit". After you have EGit installed, follow this tutorial. It helped me a lot!
Checkout this tutorial Eclipse install Git plugin – Step by Step installation instruction
Eclipse install Git plugin – Step by Step installation instruction
Step 1) Go to: http://eclipse.org/egit/download/ to get the plugin repository location.
Step 2.) Select appropriate repository location. In my case its http://download.eclipse.org/egit/updates
Step 3.) Go to Help > Install New Software
Step 4.) To add repository location, Click Add. Enter repository name as “EGit Plugin”. Location will be the URL copied from Step 2. Now click Ok to add repository location.
Step 5.) Wait for a while and it will display list of available products to be installed. Expend “Eclipse Git Team Provider” and select “Eclipse Git Team Provider”. Now Click Next
Step 6.) Review product and click Next.
Step 7.) It will ask you to Accept the agreement. Accept the agreement and click Finish.
Step 8.) Within few seconds, depending on your internet speed, all the necessary dependencies and executable will be downloaded and installed.
Step 9.) Accept the prompt to restart the Eclipse.
Your Eclipse Git Plugin installation is complete.
To verify your installation.
Step 1.) Go to Help > Install New Software
Step 2.) Click on Already Installed and verify plugin is installed.
egit was included in Indigo (2011) and should be there in all future Eclipse versions after that.
Just go to ![(Help->Install New Software)]
Then Work with: --All Available Sites--
Then type egit underneath and wait (may take a while) !
Then click the checkbox and install.
I made an installation guide for Egit on Eclipse so I thought I would share it.
INSTALL EGIT plugin in eclispe which is pretty easy. If EGit is missing in your Eclipse installation, you can install it via the Eclipse Update Manager via: Help → Install new Software. EGit can be installed from the following URL: http://download.eclipse.org/egit/updates
Under Eclipse Git Team Provider, tick ONLY "Eclipse EGit" and then download the plugin.
CONNECT TO YOUR LOCAL REPOSITORY. I right clicked on the project, selected "team > share project" and then ticked "use or create repository"
GIT IGNORE. Mark the "bin" folder as "ignored by Git", either by right-clicking on it and selecting Team > Ignore or by creating a .gitignore file. My file was generated for me, I just had to make it visible. Here's how in eclipse: In your package explorer, pull down the menu and select "Filters ...". You can adjust what types of files are shown/hidden there.
IDENTIFY YOURSELF. Click Preferences > Team > Git > Configuration and make sure your name & email are there so we know which user committed/pushed what.
NOW YOU ARE READY TO ADD/COMMIT/PUSH/PULL files with the plugin!
There are two ways of installing the Git plugin in Eclipse
Installing through Help -> Install New Software..., then add the location http://download.eclipse.org/egit/updates/
Installing through Help -> Eclipse Marketplace..., then type Egit and installing it.
Both methods may need you to restart Eclipse in the middle. For the step by step guide on installing and configuring Git plugin in Eclipse, you can also refer to Install and configure git plugin in Eclipse
It's Very Easy To Install By Following Below Steps In Eclipse JUNO version
Help-->Eclipse Marketplace-->Find: beside Textbox u can type "Egit"-->select Egit-git team provider intall button-->follow next steps and finally click finish
You didn't mention which version of Eclipse you are using, but others have already posted good answers for modern versions of Eclipse. Unfortunately one of my legacy projects requires Eclipse Europa; the old EGit project homepage states the following:
The plugin only works on Eclipse 3.4 (Ganymede) or newer. Eclipse 3.3 (Europa) is not supported anymore. Since the plugin is still very much work-in-progress we want to take advantage of new platforms features to facilitate progress.
So I guess I'm SOL - back to the graphical GitHub client for me! Lucky it's a legacy project.
Try with this link:
http://download.eclipse.org/egit/github/updates
1)Go to Help-> Install new Software
2)Click on Add...
3)Name: eGit
Location:http://download.eclipse.org/egit/github/updates
4)Click on OK
5)Accept the licence.
You are good to go