Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » Eclipse errors after SCM update
Eclipse errors after SCM update [message #27938] Thu, 04 June 2009 08:51 Go to next message
Yves Schumann is currently offline Yves SchumannFriend
Messages: 40
Registered: July 2009
Member
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.

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.

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
--
Arbeiten am Computer ist wie U-Boot fahren. Fängt man an die Fenster zu
öffnen, dann gehen die Probleme los.
Re: Eclipse errors after SCM update [message #27978 is a reply to message #27938] Thu, 04 June 2009 14:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.ifedorenko.com

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
Re: Eclipse errors after SCM update [message #28018 is a reply to message #27978] Thu, 04 June 2009 22:28 Go to previous messageGo to next message
Yves Schumann is currently offline Yves SchumannFriend
Messages: 40
Registered: July 2009
Member
Hello Igor

Igor Fedorenko schrieb:
> I don't have much experience with Eclipse ClearCase plugin (and the
> little experience I had was not a good one),

Which plugin do you try? The Plugin for the full ClearCase installation
or the plugin for the ClearCase Remote Client? Which problems do you have?


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

Done this more than a million times till now... ;-)


> 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.

Same as above.


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

Same as above.


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

OK, I will try this tomorrow. Oh well, not tomorrow, today! :-)


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

I let you know what's going on.


>> 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.
....
> 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.

Hm, I think to try Eclipse 3.5.


Thx a lot for your suggestions. Regards,
Yves
--
"All those moments will be lost in time like tears in the rain. Time to
die..." -- Roy Batty (Rutger Hauer) -- Bladerunner --
Re: Eclipse errors after SCM update [message #28057 is a reply to message #28018] Fri, 05 June 2009 02:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.ifedorenko.com

Yves Schumann wrote:
> Hello Igor
>
> Igor Fedorenko schrieb:
>> I don't have much experience with Eclipse ClearCase plugin (and the
>> little experience I had was not a good one),
>
> Which plugin do you try? The Plugin for the full ClearCase installation
> or the plugin for the ClearCase Remote Client? Which problems do you have?
>
>

Sorry, this was more than 5 years ago and I have very vague
recollections of that experience.

--
Regards,
Igor
Re: Eclipse errors after SCM update [message #28133 is a reply to message #27978] Tue, 09 June 2009 15:39 Go to previous messageGo to next message
Yves Schumann is currently offline Yves SchumannFriend
Messages: 40
Registered: July 2009
Member
Hi there

Igor Fedorenko schrieb:
> 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.

So I've installed Eclipse 3.5RC3 (Galileo) and m2e 0.9.8 and till now
nothing changes in the behaviour. :-(

At first I can tell that the maven importer sometimes shut down Eclipse
like before. No change here.


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

Done with no change on behaviour.


> 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.

Done too, no change.


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

So, what should I say... No change too...


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

Currently I'm very frustrated because it is very time consuming and I
have no idea where to search the problem. What should I try?

Here's just an example:

One of the projects (say A) has a dependency to another project (say B),
defined on pom.xml. Project B is listet on the Maven Dependencies of A
as an open folder. But on A I got the error "The import ... cannot be
resolved" and a part of the imported package is underlayed with a red
line. Note, _not_ the whole package of the imported class! But it
confuses me, that the import is reachable with Ctrl+click on the
importet class.

Aditionally: Why is the file <project>/.settings/org.maven.ide.eclipse
modified during project import? This file is under version control but
the importer replaces them with a new version. On ClearCase all
versioned files are write protected and the ClearCase plugin checks them
out (make them writable) if neccessary. So if I'm disconnected from
ClearCase and import a maven project, this will produce a question like
".settings/org.maven.ide.eclipse is write protected. Make it writable?".
If answering this with "Yes", I got hijacked files on ClearCase.

If I create two Maven projects with some lines of code and the
dependencies as written on the last paragraph, everything is nice. So I
have absolutely no idea what's wrong on the "real" projects. The build
including the deploy is working nice and without any problems from the
commandline and out of Eclipse too. But Eclipse itself "knows" the right
files out of the referenced projects (Ctrl+click works) but underlays
them with a red line as mentioned 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.

As written above, same behaviour with Eclipse 3.5RC3 and m2e 0.9.8.

So what should I do now?


--
MfG
Yves
[eisfair-team]

Arbeiten am Computer ist wie U-Boot fahren. Fängt man an die Fenster zu
öffnen, dann gehen die Probleme los.
Re: Eclipse errors after SCM update [message #28172 is a reply to message #28133] Wed, 10 June 2009 07:24 Go to previous messageGo to next message
Yves Schumann is currently offline Yves SchumannFriend
Messages: 40
Registered: July 2009
Member
Hello

So I dig a little bit deeper. The required other projects are listet as
an open folder on the Maven Dependencies and Eclipse shows me the
imports out of such an other project underlayed with a red line and the
error message "The import ... cannot be resolved". But as mentioned on
my other posting, they are reachable inside of eclipse if using
Ctrl+click on them.

If I close such a required project, then his entry on the list of Maven
Dependencies is changed from an open folder to the library symbol and
all the errors with imports a.s.o. from this project go away!? Strange...


Regards,
Yves
--
"Wie ein gut verbrachter Tag einen glücklichen Schlaf beschert, so
beschert ein gut verbrachtes Leben einen glücklichen Tod." -- Leonardo
da Vinci
Re: Eclipse errors after SCM update [message #28211 is a reply to message #28172] Wed, 10 June 2009 16:20 Go to previous message
Yves Schumann is currently offline Yves SchumannFriend
Messages: 40
Registered: July 2009
Member
Hello,

so I found another difference on behaviour but don't know if this has
something to do with the problem.

If a project is imported using the eclipse importer, the resulting name
on the list of projects on Eclipse is the project name out of the
..project file. But if a project is importet using the m2e importer, the
project is imported with the ArtifactID as the project name. As a result
of this behaviour the .project file is modified during import with m2e
importer. Why is this done this way? Why not the name out of the
..project file?


Regards,
Yves
--
"Wenn ein angesehener, aber älterer Wissenschaftler behauptet, dass
etwas möglich ist, hat er mit an Sicherheit grenzender
Wahrscheinlichkeit recht. Wenn er behauptet, dass etwas unmöglich ist,
hat er höchstwahrscheinlich unrecht." -- Arthur C. Clarke
Previous Topic:BIRT Maven repository?
Next Topic:0.9.9 progress
Goto Forum:
  


Current Time: Thu Apr 18 08:22:26 GMT 2024

Powered by FUDForum. Page generated in 0.02152 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top