7

I have a Maven Java project, imported using m2eclipse.

The target/ directory is not marked as 'Derived' by m2eclipse.

Problems:

  • It is validated, so any validation error appear twice. My example shows a JSP Problem, when I insert intentionally an error in a jsp.
  • When I want to open a resource with Ctrl-Shift-R, all files appear twice, and I run the risk of editing the copy instead of the original file.

Possibly see post eclipse-ignore-folder

Note: When I set manually the directory to derived, the validation problem doesn't disappear, so that would only be part of the solution...

Question:
Is there something I need to do, so that m2eclipse sets the target/ directory to 'Derived' ?

KLE
  • 23,689
  • 4
  • 56
  • 62

4 Answers4

5

Yeah, that has been around for a while. I wrote a plug-in that allows you to mark directories as "derived" without having to find them all (http://eclipsefrills.sourceforge.net/). It's not great, and you still have to manually run the action to make it work, but it may help.

Odd, though, I have not noticed the problem lately, myself. I wonder if there is some setting in the preferences that takes care of this now.

Good luck.

cjstehno
  • 13,468
  • 4
  • 44
  • 56
  • Thanks for this. I've tried the Wiki for these EclipseFrills projects, but I've been kept out by a login/password! – KLE Nov 03 '09 at 18:13
  • Odd, you may need to be a SourceForge member to access the wiki... I will have to look into that. – cjstehno Nov 03 '09 at 19:20
  • I was looking for a plugin for this for ages ! Thank you very much for your work, it's already a real time-saver. "target" folder are one of the most annoying thing under Eclipse when one uses Maven. For me, it would be perfect if it was capable of setting the "derived" bit in the background, without having to manually launch the plugin (with a preferences page where i could put "target", "dist", and maybe a few other entries). Do you think it would be possible ? – SRG Aug 10 '10 at 09:02
  • Yes, I will make a note of it and see what I can do. – cjstehno Aug 17 '10 at 18:48
  • Nice, but Update site installer won't run on Indigo. – Joseph Lust Aug 15 '12 at 19:44
  • Sorry, the project died a few Eclipse releases ago. It's open source if you would like to take it over or try to get it working https://github.com/cjstehno/eclipsefrills – cjstehno Aug 16 '12 at 13:33
3

I got rid of this problem by writing a custom plug-in KeepTargetDerivedPlugin. As its name suggests, it automatically keeps all target folders derived (unlike the other solutions, which require user action).

Still, e. g. the YA2O's plug-in can be used to mark derived folders of projects which already reside in the given Eclipse workspace.

Petr Bodnár
  • 496
  • 3
  • 14
  • 2
    And yes, there was already a bug filed and fixed for m2e: https://bugs.eclipse.org/bugs/show_bug.cgi?id=336411. Not fixing the 'mvn clean' problem though - that's why I decided for my own solution. – Petr Bodnár Oct 24 '12 at 13:30
1

Yes: open a bug report :)

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
0

I have been so annoyed by this problem that I wrote a plugin to solve it. You can get the source and jar from here.

PaulG
  • 13,871
  • 9
  • 56
  • 78
YA2O
  • 101
  • 1
  • 2