Alan Kent wrote:
I have had a lot of problems with m2elipse. When it works, its great. Frequently however it got the version numbers messed up of dependencies. For example, I had a multi-module project where all modules were at version 0.1.0. However m2eclipse reported that it failed to resolve a dependency for version 2.4.1 of one of the modules. The number 2.4.1 did not appear in *any* of my pom.xml files - it must have been some transitive dependency version number that got substituted in by accident. Worse, its hard to reliably repeat the problems. Sometimes I can spend half an how enable/disable maven, F5 to refresh, svn update, exit/restart Eclipse all to no effect, then suddenly for no apparent reason it starts working fine. So I don't have a repeatable test case - it was just flaky.
This is ${version} variable in your poms is resolved to system property that one of the Eclipse plugins is setting. See bug MNG-2653 in Maven for more detailed explanation http://jira.codehaus.org/browse/MNG-2653

I've added entry to the project FAQ at http://docs.codehaus.org/display/M2ECLIPSE/Project+FAQ#ProjectFAQ-2.4.1
I have had other different problems where again, it seemed to get the wrong version number of dependencies. For example, the pom.xml file if it specifies a specific version that version should be the one used. Sometimes however it seemed to use the version requested by a transitive dependency.

The m2eclipse plugin also seemed to frequently have trouble downloading artifacts. Frequently I would have to go to the command line, do a mvn compile command to download the dependencies, then Eclipse would be happier. When it got the version numbers wrong, I would have to edit a pom file to point to that version number, do the mvn compile command to download it, then set the pom.xml file back to the version number I wanted. This would get m2eclipse over some problems it had, and when it had a problem it appeared to stop looking for more dependencies. So the dependency list would frequently be truncated.

But all of the above might be completely useless/out of date as its not using the latest build.
Maybe not, but we'll never know if you won't be using recent builds, because problems like that is usually very hard to reproduce with such details.

Also note that most (if not all) dependency resolution is done by Maven Embedder component, which is basically at the level of Maven 2.1
I was also asked to describe what I want with m2eclipse. My goal is to have a large multi-module project where each module has its own, independent, dependency list. Two modules (e.g. WAR files) might legitimately want different versions of artifacts. The newer version might support this.
The code in trunk has an option to support multi-module projects as separate projects in Eclipse and we are planning to make it default. The old way when all modules go under the same project with all their source folders and dependencies is still there and can be enabled. I hope to finish Maven project import wizard that would import multi-module project as multiple Eclipse projects soon. It will have option to import it as a single one too.
Having all the code in one project that gets compiled up as one unit is both good and bad. Its good as svn commands to do tags etc cover the whole project easily. It can be annoying as the project gets larger however as I have to recompile everything, even if just working more in one module. As the project size increases, this is starting to become more of an issue.
Right, there are also some corner cases when sibling modules are using conflicting dependency versions.

However we still won't be able to separate compilation for "test" dependency scope, unless we'll make separate projects for source and test folders, which I don't think would be a good idea.
The alternative to m2eclipse that I have been trying to get work (without success so far) is to use mvn eclipse:eclipse with nested projects. That is, I want a root level project for doing global svn commands, plus independent dependency lists per module. mvn eclipse;eclipse does the dependency stuff per module nicely - but I don't have a global project for doing svn stuff via the UI. Eclipse 3.2 and 3.3 seem to allow nested projects, but the SVN plugins I am not sure are quite there yet. Subclipse has a few problems (being addressed I believe). Subversive I have not had much luck with - trying with Eclipse 3.3 had problems as it was looking for Mylar instead of Mylyn. I am sure these problems will get sorted out over time.
As far as I know there was some fixes in just released Subclipse 1.2.3 to address overlapping projects and it also works with Mylyn 2.0. You may want to try it.
Anyway, I hope this was of use to someone. This is not a request for anything to be done. It might be the latest m2eclipse plugin works better. I might give it another whirl. I have just subscribed to this list (no acknowledgment back yet) so I will try to keep an eye on this thread (but I often get swamped with work).

While the above might seem rather negative, when m2eclipse did work, it worked great. Even when it played up, we still stuck with it because it was so useful. But with nested projects now in Eclipse, I am trying to work out if there is a more reliable way of doing things. I have not seen a good solution yet that has worked reliably for me.
Thanks for your feedback. Really appreciated. Even the negative stuff is useful bit of information that we can use to improve project.

Also, it really help to reproduce issues if reporter did his home work. See some basic guidelines and tips at http://docs.codehaus.org/display/M2ECLIPSE/How+To+Report+Issues

 regards,
 Eugene



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to