Intland's free requirements, development and test management hosting.
This server hosts 110,000+ users on the cloud!
Support import of Maven projects from multiproject repository#12942/v2
Tags:  not added yet

Support import of Maven projects from multiproject repository[CRQ-12942]

Tracker: Change Requests Priority: NormalNormal Status: New
Submitted by: cmjartan Sep 20, 2010 11:03 Modified by: hgeclipse Mar 17, 2011 04:39 Assigned to: ilya_ivanov Sep 20, 2010 11:03
Category: Usability Severity: -- Resolution: --
Release: -- Detected: --
Currently projects from a multi-project repository are only available for import by Import / Clone Existing Mercurial Repository, if the eclipse .project file is part of the versioned files.

We currently use Maven in all of our projects and do not check in the Eclipse files which are generated by "mvn eclipse:eclipse" (what seems to be best practice). We use the flat project layout (no nested projects) - we don't use m2eclipse for stability reasons.

We cannot import these projects directly from inside eclipse, because in this case, it creates an Eclipse project and .project file only for the repository root. Afterwards, you would have to delete the project without content, close Eclipse, run "mvn eclipse:eclipse", remove the .project file manually so that Eclipse can then after restart import the projects in the subfolders. For that reason we clone the repository at the command line, run "mvn eclipse:eclipse" and then switch to Eclipse and import all the projects.

What I would like to see is that the Mercurial import is able to create eclipse projects for all folders that contain a pom.xml file and creates simple "general project" configurations based on the folder names. After import we could then call a versioned launch configuration for "mvn eclipse:eclipse" that overrides the .project files with the real ones. Before using Mercurial we worked with Subversive that pretty much did the same thing when selecting multiple folders.

If you detect an existing m2eclipse plugin, it would also make sense to provide an option to automatically enable m2eclipse dependency management for these projects. In that case projects can also be nested.

Comments & Attachments (3)
Associations (0)
Children (0)
References (0)
SCM Commits (0)
All (0)

Submitted Comment
Mar 17, 2011 04:39
Hi Carsten,

I feel you pain. The root cause is unfortunately something you would never try to fix - it's maven. I hate it because it creates more problems as it solves ( 

So while I understand the need of a proper maven IDE integration, I don't think that MercurialEclipse is the right place where the fix should happen. What would happen if users have additionally Git/Perforce/whatever VCS and then complain about maven's issues? Should other plugin developers implement this maven weirdness over and over again? I think this is not what we should do and I personally would not spend a minute of my time for it. Either maven's folks should finally provide appropriate tooling for their weird system or users should rethink if they should spent another weeks trying to fix issues they never  had without maven.

So please create maven related bugs/feature requests at maven/sonatype bugtrackers or consider to use a better build/deployment system, that just works.



Mar 17, 2011 04:19
@npiguet: If you import "existing Maven Projects", you need to clone the repository first (outside Eclipse?), you need the m2e Eclipse Plugin and all your projects are immediately associated with the Maven Project Nature. That may be a good way to handle project somewhere in the future, when the m2e plugin is stable enough. But currently we prefer the use of "mvn eclipse:eclipse", wich works great for almost all of our projects.

Many, if not most of our developers experience serious problems when using m2e, often ending in a complete freeze of Eclipse, when m2e dependency management is enabled for a project. And we try again regularly with different eclipse versions and plugin bundles, but it's not getting better.

Mar 13, 2011 11:29
Maybe I'm missing something, but isn't this already covered by "import->existing maven projects"? This together with the automatic association of MercurialEclipse to new projects seems to cover the case.

This is pretty much the layout my team uses (a multimodule maven project, with a root pom.xml that declares all the other modules), and it seems to work great.