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?

Zoe
  • 27,060
  • 21
  • 118
  • 148
Harvey
  • 171
  • 2
  • 2
  • 5

4 Answers4

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.

Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56
  • 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? – Harvey Aug 12 '12 at 14:28
  • 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" – Nicholas Albion Aug 12 '12 at 14:33
  • That's one way, but it's not the easiest. See my answer below – Michael Aug 13 '12 at 22:51
  • 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. – eis Apr 11 '13 at 13:01
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

Tomer
  • 2,398
  • 1
  • 23
  • 31
  • 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: http://mytechnologythought.blogspot.com/2013/12/an-internal-error-occurred-during.html – Dao Lam Jun 25 '14 at 18:50
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).

Michael
  • 1,014
  • 1
  • 8
  • 23
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.