Maven SCM Handler for CVS in Eclipse (Juno) - eclipse

I'm a longtime Eclipse and Maven user, but am just now upgrading to the more recent Eclipse builds (Luna- 4.4.1).
I've noticed that while Luna ships with m2e (1.5), the m2e marketplace no longer seems to have the 'Maven SCM Handler for CVS' as it did in the past. Has this handler been discontinued? Are there any other handlers that would allow for clean integration of Eclipse/Maven/CVS?
Without that handler, importing a Maven project from CVS is a rather painful affair; import generic cvs project, apply java project wizard, convert project to maven project. Once that's done, you then have to reconfigure other project settings such as Java source, resources, etc. All of this was automatically handled in m2e 1.0.x with the CVS handler.

For CVS SCM connector (if you want to import maven project from cvs repository):
Install new software: http://repository.tesla.io:8081/nexus/content/sites/m2e.extras/m2eclipse-cvs/0.13.0/N/0.13.0.201304101743/
More info: Maven Eclipse (m2e) SCM connector for subclipse 1.10 (svn 1.8)
(In case you're wondering, it also worked on Eclipse Mars)
First solution
How to install the SCM connector:
download zip org.sonatype.m2e.subclipse.feature-0.13.0-SNAPSHOT-site.zip or files from above repository location
unzip the file to an empty folder somewhere, remember that folder (or put the files from repository in that folder)
In Eclipse,
go to Help/Install New Software…
Click “Add…” to add a new site
In the window, click on “Local…” and choose the folder where you unzipped the site before. The result in the Location field should look like file:/C:/theUnzipFolder/
Click OK, choose all available packages to install, and continue the installation as usual
Second solution
Open Eclipse
Go to Help -> Install New Software -> Enter above repository location and hit enter
Select Maven Integration for Eclipse CVS Team Provider -> Finish
Alternative solution to SCM connector:
Checkout your project in workspace
Open cmd.exe and go to project location in that workspace. Then execute the following
mvn eclipse:eclipse
Open Eclipse with that workspace path as target
Right click in Project Explorer panel, Import -> Maven -> Existing Maven Projects -> Select project location from workspace and you should see the projects in here
Right click on your project in Project Explorer panel -> Maven -> Update project -> Select all projects -> Ok
Don't forget to:
set your corresponding JDK in Window -> Preferences -> Java -> Installed JREs
set your corresponding compiler level in Window -> Preferences -> Java -> Compiler -> Compiler compliance level
set JAVA_HOME environment variable

Related

Setting up project is eclipse

I want to setup my work project in Eclipse, with following features:
1) Connect to SVN repository
2) It is a maven - multi module project
3) It is a spring project
If I import this project as Maven project I am not able to connect it to SVN repository.
If I check - out SVN repository, I am not able to set it up as Maven/Spring project.
And ideally I want to make it hot deployable, (as eclipse dynamic web project), so Development can be efficient.
How can I possibly do this.
I have setup eclipse Juno SR1 with Maven, STS, and SVN plugins.
What you can do is follow the below steps :-
Checkout from svn to your local drive.
As it is a mave nbuild project you will have the pom.xml file in the root of the project. Do a mvn eclipse:eclipse -Dwtpversion=2.0 on the project.
3.Open eclipse and go to File-->Import--> Existing projects into workspace.
This should do.
FYR see this
After the project is checked out into the Eclipse workspace, just remove the project by using the following action: -
right click at the project ---> delete ---> click ok
Please take a note, do not check the check box named "Delete project content on disk". We have just want to remove and re-import again.
All we need to do is re-importing by using the following action: -
File ---> Import ---> Maven ---> Existing Maven projects
This will help us to integrate the Maven with the SVN in Eclipse. We will see the revision information after the project name, folders, packages, classes, etc.
Anyhow to use Maven in the Eclipse, you should install the Maven Integration (m2e). Furthermore there is a useful plug-in to integrate the Eclipse WTP with the Maven as well. It is named Maven Integration for WTP.
I hope this may help.

Eclipse Maven: no "Checkout Maven project from SCM" option

I have to compile and run a Maven project that some colleagues of mine developed some years ago. I'm using Eclipse Helios on Microsoft Windows Server 2008.
In their documentation about how to compile it with Eclipse, I read that I have to install on my Eclipse:
Maven plugin (from http://m2eclipse.sonatype.org/sites/m2e )
Maven plugin extra (from http://m2eclipse.sonatype.org/sites/m2e-extras )
Subclipse plugin ( http://subclipse.tigris.org )
After installed these plugins, their document says to select the option "Checkout Maven Project from SCM" and other operations.
I've tried to install these plugins, but, first, I realized that they are antiquated.
I discovered that Maven Plugin changed name and address (now is Maven Integration for Eclipse 1.2), and that Maven Plugin Extra does not exist anymore.
Subclipse, instead, is available.
So I installed these plugins, but, afterwords, no "Checkout Maven Project from SCM" functionality was present on my Eclipse.
Then I searched online to solve this problem, and I found this thread on StackOverflow.com. It suggested to install the Maven SCM handler for Subclipse.
I've searched it on the plugin repository of Elcipse but it does not exist anymore.
Which Eclipse plugin may I use to get the "Checkout Maven Project from SCM" functionality on my Eclipse IDE ?
Thanks a lot
When you go to Window -> Preferences -> Maven -> Discovery, you have a button "Open Catalog", which opens a plugin marketplace specific to the m2e plugin. There you'll find a plugin called m2e-subclipse, which should give you the appropriate options:
Change the installed sub version to have m2 plugin. then check out as maven shows up.
Eclipse Marketplace -> Installed -> Subversive SVN -> Change -> Subversive SVN Integration for the M2E Project (Optional) and install it.
see images below.
I have recently run into same issue and found solution, as preferences trick mentioned in this post did not work for me.
All you need to do is to go back to your SVN installation (tested for subversive, guess similar for subclipse) and check m2e integration plug-in.
In my case: Eclipse Marketplace -> Installed -> Subversive SVN -> Change -> Subversive SVN Integration for the M2E Project (Optional) and install it.
I have a workaround , since I was not able to find m2e-subclipse in Window -> Preferences -> Maven -> Discovery.You need to check out the project.Once done, right click on the Project Explorer and Import->Maven->Existing Maven Project and select the checked out project and click Finish.
Just a heads up for anybody seeing this again for future versions of Eclipse.
Sonatype is no longer maintaining this:
You can either use the fork currently being maintainted in github [https://github.com/subclipse/m2e]:
https://dl.bintray.com/subclipse/releases/m2e/1.0.x/
Or you can use the eclipse maintained link for the eclipse version:
https://download.eclipse.org/technology/m2e/releases/1.9/1.9.1.20180912-1601/
Install either one by using the "install new software" link in Eclipse above "Eclipse Marketplace"
I used eclipse version 2022-12 from this website https://mergedoc.osdn.jp/
After I face this problem and try many ways. Finally, I got the solution.
Right-click on repo
Select Find/Check Out As...
Choose Check out as a project with the name specified, then input your project name alias
After checkout is finished. Right-click on the project.
Select Configure > Convert to Maven Project.

eclipse m2e: can't open declarations after importing maven projects

Okay so the situation is simple so I'm not sure what the problem is and I've spent over three frustrating hours debugging with no luck!
I cloned a maven project from GitHub (using git) to ~/workspace/MyCompany/MyProject.
Then I did File -> Import... -> Existing Maven Projects and then selected MyProject as the root directory.
It appears like the import was a success but eclipse doesn't recognize any classes, even String and ArrayList! Whenever I right-click and choose Open Declaration, I get the following error message:
Problems opening an editor. Reason: project_name does not exist.
I'm using eclipse Juno and m2e 1.2.0. m2e was installed via Help->Install New Software...

Eclipse-Maven: Doesn't show Maven project from SCM

I have installed the Maven plugin and the svn connector for sublipse. Afterwards I right clicked in the project explorer (empty workspace) and clicked New -> Other -> Maven -> Maven project from SCM, entered the URL and it started downloading.
After download finished, it didn't show up in the "Project-Explorer". What do I have to do, in order to checkout a Maven project from SVN so it shows up in the "Project-Explorer".
In order to get the "Checkout as Maven Project" functionality to work I have had to install the following:
From the Eclipse Marketplace:
Maven Integration for Eclipse
Subclipse
From the m2eclipse-extras update site (http://m2eclipse.sonatype.org/sites/m2e-extras/):
Maven SCM handler for Subclipse
EDIT:
Also make sure that your project explorer view is setup correctly. Verify that your top level items are projects.

Checkout Maven project from SCM - no connectors

I have a problem with checkout Maven project in Eclipse Indigo. I've installed m2e plugin, Subclipse, Git, but can't select appropriate SCM type ? How to solve this ?
Affan was correct. The connectors are all still there in Indigo, just hidden a little.
Start Eclipse and open preferences.
Find the Maven group and expand it.
Select the "Discovery" item and click "Open Catalog".
A dialog will pop up with all the goodies. The connectors are at the bottom.
I ran into this issue with Eclipse where when you would try to Import a project via:
"Check out Maven Projects from SCM" from the project expoler the "scm url" drop down box would be empty.
After googling around, you must have subclipse installed from the Eclipse Marketplace (which I did) AND "Maven SCM handler for Subclipse" from the "Help->Install new software" dialog box (which I did not).
How to get Maven SCM Handler for Subclipse:
Assumption: You have Subclipse installed.
Click Help->Install New Software
Click "Add..." to add a new software site.
Add this site: http://subclipse.tigris.org/m2eclipse/1.0 (Alternative URL: http://subclipse.tigris.org/m2eclipse/latest/)
Select the Maven SCM handler for Subclipse
Install
You can now use the Project Explorer context menu of "Import -> Maven -> Check out Maven Projects from SCM" and actually have a SCM URL to choose from in the drop down box, namely "svn".
Tested with Eclipse Juno
Looks like there is some incompatibility issue between Indigo and m2eclipse. This discussion gives more details including a possible solution.
Hope this helps.
Edit 1: Uninstalled m2eclipse 0.12.x from Indigo and installed m2e from Eclipse's m2e releases repository. This version shows a link to download m2e scm connectors from Eclipse marketplace (when you try to check out a maven project from scm). I could see connectors for cvs, git and subversive.
For those using subclipse 1.8.x there is a patched version of the m2e connector.
Here is the update site: http://subclipse.tigris.org/m2eclipse/1.0
(Thanks to RockyMM for posting the link to the WONTFIX issue, which contained the link to the patched version.)
Indigo comes with m2e pre-installed. To get the connectors just click on link where it says find more connectors in the m2e marketplace. From there i installed the m2e-subclipse connector. This is a different approach from previous versions of Eclipse where you had to install another plugin from market place called "Maven Integration for Eclipse (Extras)".
There was an unofficial update of SVN connector. To install it go to http://subclipse.tigris.org/issues/show_bug.cgi?id=1557 download attachment org.sonatype.m2e.subclipse.feature-0.13.0-SNAPSHOT-site.zip and follow the steps:
Unzip the file to an empty folder somewhere, remember that folder
In Eclipse,
go to Help/Install New Software…
Click “Add…” to add a new site
In the window, click on “Local…” and choose the folder where you unzipped the
site before. The result in the Location field should look like file:/C:/
theUnzipFolder/
Click OK, choose all available packages to install, and continue the
installation as usual
This is related answer by "technocrat" with new update site URLs.
This is working with Eclipse 2019-12:
The problem: "Check out Maven Projects from SCM" from the project explorer the "scm url" drop down box is be empty.
You must have subclipse installed from the Eclipse Marketplace AND "Maven SCM handler for Subclipse".
How to get Maven SCM Handler for Subclipse:
Background: The original website of this project (http://subclipse.tigris.org/) redirects to https://github.com/subclipse. The subproject "m2e" is important.
Here, you will find a link to an Eclipse update site: https://dl.bintray.com/subclipse/releases/m2e/1.0.x/. Add this to the eclipse update sites.
Now you will see "Maven SCM handler for Subclipse". Install it.
You can now use the Project Explorer context menu of "Import -> Maven -> Check out Maven Projects from SCM" and actually have a SCM URL to choose from in the drop down box, namely "svn".