[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.m2e] Re: Eclipse errors after SCM update

See my comments inline

Yves Schumann wrote:
Hello

After migrating an application from Ant build to Maven build I ran
into some problems. The original application consists of around 20
eclipse projects from which Ant creates three *.war files, so three webapplications. The amount of functionality of these application
should be increased a lot in the next time but there are a lot of
problems with Ant, so we decide to migrate the projects to use Maven.
That's the history. ;-)


After a lot of cleanup and migration work these projects were split
up into around the double amount of eclipse projects using m2e. Additionally I've created a plain project which is only used for configuration, i. e. profiles, dependency management a.s.o. This configuration project is referenced from nearly all other projects as
parent project. Maybe this is not the final solution but currently
this setup works fine using plain Maven.


The problems begin with m2e and our development behaviour.
Development is done feature based which means, that we have different
branches on our SCM (which is ClearCase) for each feature. After a
lot of tests (like integration tests, system tests, ...) these
branches are merged into the release branch. Additionally some of
these feature branches were merged together in both directions every
two or three days, because they require each other but development
can't be done on one branch. Currently not the best solution but I'm
not in the position to change this. Maybe it can be done step by
step...

One of the major problems for us is, that after an update from SCM Eclipse shows a huge amount of resolving errors but maven build runs successfully through without any errors. Additionally confusing the fact, that this happens mostly on different developers but not all of
them!? After digging into possible solutions I've modified "Goals to
invoke after project clean" on every project and entered "clean
compile test-compile" there. But this helps not really during or
after an update out of SCM, the errors mostly still there on Eclipse,
even after running Eclipse clean.


Now I'm uninspired what to do. :-/ One guess is that this has to do
with Eclipse's own history inside the workspace metadata. Does anyone
know how to clear this history? This history is growing over time but
in my or our case not really necessary because everything is under
version control.


I don't have much experience with Eclipse ClearCase plugin (and the
little experience I had was not a good one), so I can only give you some
hints how you can start troubleshooting this problem but to solution. I
assume you're talking about Maven dependency resolution problems. If you
are talking about Java compilation errors, then most likely these
suggestions do not apply.

First, make sure that Eclipse workspace is in sync with underlying
filesystem (select all projects, right click, Refresh).

If Refresh does not help, try forcing Maven dependency re-resolution
(Project->Update All Maven Dependencies). Internally, m2e uses
filesystem timestamps to detect pom.xml file changes and it may get
confused if ClearCase does anything funny.

You can also try full/clean workspace build (Project->Clean...->Clean
all projects).

And lastly, 0.9.6 is quite old so I would recommend giving 0.9.8 a try.

If any of these steps makes the errors go away, we can dig deeper to see
how to actually fix the problem.



Oh, there is another thing I can mention here: Eclipse hangs without any reaction if I try to import a lot of projects at once. Nothing happens and the percentage counter "Updating Maven Dependencies" on the bottom of the screen freezes. So the creation of a new workspace is very sad because with one import step only a small amount of projects can be importet. It works best for us, if with every import step only three or four projects are imported. The import is done using the default Eclipse project importer. The Maven project importer can't be used because it shut down Eclipse completely sometimes/often. Otherwise the behaviour is the same as described above.

This is likely https://bugs.eclipse.org/bugs/show_bug.cgi?id=249930. It is not m2e specific. You can either build patched JDT core or move to Eclipse 3.5.


All this is done with installed JRE/JDK 6u12, Eclipse 3.4.2 (M20090111-1700) and m2e 0.9.6 because 0.9.7 has a problem with the creation of web projects (If I remember right something with the creation/compression of the *.war file). If this is solved I can try
an update but this a definitive requirement for our developers and
the reason to stay on 0.9.6. Please let me know if I can (or should)
try an update of separate m2e components, but the build of web
projects is a must for us at the moment.


Wow, a lot of text! Would be nice if someone can read it and possibly
 give me a hint. Thx a lot in advance.

Regards, Yves