Community
Participate
Working Groups
Clone from https://issues.sonatype.org/browse/MNGECLIPSE-2637 I think it would be very useful if m2eclipse could automatically mark the target folder as "Derived" once activated for a project (i.e. after selecting Maven > Enable Dependency Management). I find myself having to do this manually very often as I am often adding new projects to my workspace after checking out from source control and enabling m2eclipse on them. Without the target folder being marked as derived, the folder's contents are automatically picked up by Eclipse's search feature, listed in resources view (i.e. ctrl + shift + R), the SCM plugin tries to automatically mark the files as 'add' to source control, etc.
I was looking for a soluction for this PITA issue. I derived flag should be set when I perform "update proj config" too. I'd even bump priority.
Yes, it is a royal PITA. I solved it by using the Frills plugin with Helios: http://eclipsefrills.sourceforge.net/ It adds a "Frills" menu with a "Mark Derived" option.
we accept good patches ;-)
(In reply to comment #2) > Yes, it is a royal PITA. > > I solved it by using the Frills plugin with Helios: > http://eclipsefrills.sourceforge.net/ > > It adds a "Frills" menu with a "Mark Derived" option. Works as long as the folder is not deleted. If deleted my clean, you have to reset the flag again. Well, way better than doing thing manually.
Created attachment 193736 [details] Mark output folder as derived in configuration Here's a potential patch for this, does it look correct Igor?
http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=6bac8880fd4f0dfb83de5f641929d9ff7f918665 The patch I've committed will mark the build directory as derived during project configuration. As mentioned if the folder is deleted it is marking is gone. Interestingly on 3.7 SDK it appears the properties page has an option to mark a folder as derived.
I wouldn't consider this as resolved, given that a clean will revert the benefit, and cleans happen all the time. Can this behaviour also be hooked in at the clean part of the lifecyle?
I've double checked, if you use Project > Clean the folder is still marked as derived.
Many thanks. Sorry not to have been able to discover that myself from experience, but waiting on AJDT configuration support before moving to 1.0. This is yet another a great papercut to have nailed. Thanks to all for the work that's gone into a bit improvement to Eclipse.
(In reply to comment #8) > I've double checked, if you use Project > Clean the folder is still marked as > derived. Is it possible to make this fix also handle Clean from outside eclipse? I frequently use maven in the command line to build the project ("mvn clean install"), but I still want the target-folders to remain derived.
(In reply to comment #10) > (In reply to comment #8) > > I've double checked, if you use Project > Clean the folder is still marked as > > derived. > > Is it possible to make this fix also handle Clean from outside eclipse? I > frequently use maven in the command line to build the project ("mvn clean > install"), but I still want the target-folders to remain derived. I absolutely agree, this one is really annoying.
We welcome quality patches (though a separate bugreport is probably good idea in this case)
Hi, while this does work for an imported project, if a pom project exists with the children projects, the children targets are still present and not marked as derived. On the other hand, the "Hide folders of physically nested modules" might make this case obsolete.
(In reply to comment #10) > (In reply to comment #8) > > I've double checked, if you use Project > Clean the folder is still marked as > > derived. > > Is it possible to make this fix also handle Clean from outside eclipse? I > frequently use maven in the command line to build the project ("mvn clean > install"), but I still want the target-folders to remain derived. What about this plug-in: http://sourceforge.net/projects/etinyplugins/files/KeepTargetDerivedPlugin/ ?
Confirmed bugs from comments #10 and #12 . I'm gonna open separate reports for each of them
This comment mentions AutoDeriv which is an alternative to KeepTargetDerivedPlugin found in the Eclipse Marketplace: https://bugs.eclipse.org/bugs/show_bug.cgi?id=150578#c39 There's also another possible workaround which doesn't require a plugin: Choose "Properties" of your project(s) in the project explorer; in "Resource -> Resource Filters" click on "Add Filter..." and choose an "Exclude all" filter on the directories/files you don't want.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/