Checking out Maven project from SVN in Eclipse
Asked Answered
S

4

7

I have just downloaded and installed the latest Eclipse Juno. I have also installed Maven and SVN through the Eclipse Market Place. The problem I am getting is that when I check-out a project from my SVN repository, the project doesn't get checked out as a Maven project.

I am using Windows 7 x64 OS. Could anyone shed some light on this matter? Am I doing something wrong?

Stubbed answered 11/8, 2012 at 18:52 Comment(2)
How did you try that? Do you have m2e installed?Posy
My problem exactly. Thanks for asking.Caliban
B
8

With m2e installed, you can right click on the project and:

  • "Configure"->"Convert to maven project" (and it will read your pom.xml) or
  • "Maven"->"Disable maven nature"

I often use both steps (in reverse order) to "reboot" the maven configuration.

Boggs answered 12/8, 2012 at 14:7 Comment(4)
Hi Nickolas, Thanks for you reply. I tried this and it worked however my project now isn't synced with svn. If I go to the 'Team' menu item, in the menu that appears when you right-click on the project, I get nothing where as before I used to get options such as 'update', 'commit' 'sync with repository' etc... Any ideas?Stubbed
Did you delete the project and start again, importing as a Maven project? There's no need to do that - you can add/remove maven & SVN natures at any time. Try right-clicking on the project and selecting "Team->Share"Boggs
That's one way, but it's not the easiest. See my answer belowPlatina
Basically this answer in addition to answer by @Tomer did the trick for me. For parent pom, "Configure"->"Convert" was enough, for child modules, import was needed. However I don't understand why this won't work as easily as it used to work.Caliban
S
2

The project doesn't need to be checked out as a maven project. What you need to do is, after checking out your project ( using the SVN perspective ) go to the Java perspective and import it as a maven project.

This will work if your project has a pom.xml file.

enter image description here

Swaggering answered 12/8, 2012 at 13:44 Comment(1)
This works for me except I needed to do extra steps like following: 1)Right-click on your project, select Maven -> Remove Maven Nature. 2)Open you terminal, go to your project folder and do “mvn eclipse:clean” 3)Right click on your Project and select “Configure -> Convert into Maven Project” This is the error to solve this use above steps. Credits go to Vipul Gulhane: mytechnologythought.blogspot.com/2013/12/…Gingili
P
1

You can install a plugin called m2e-subclipse to do that, but it's not currently that support. You might need to build it yourself.

Link to m2eclipse-subclipse.

Alternatively, what I prefer to do, is check out the project using TortoiseSVN (or a similar client for mac/linux). Subclipse will still pick up that it is a SVN project, and I'll use m2e to import the project (Import existing Maven project).

Platina answered 13/8, 2012 at 22:50 Comment(0)
F
1
  1. Go to SVN repository Exploring perspective and checkout the project.
  2. Then go to Java perspective, right click the project and select Configure->Convert to Maven project

This works for me in Eclipse Luna.

Felten answered 22/10, 2014 at 18:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.