Eclipse - Highlighting 10 Target Project Destination Folders

I would like to mark all of my “target” directories as “received” in Eclipse. However, I have about 10 projects and have to repeat the same process 10 times, is there any quick way to mark all 10 'target' folders as output?

+7
source share
4 answers

Not sure what you mean by derivative. However, Eclipse writes most of the settings to an XML file. Find out which configuration file (e.g. .classpath ) changes, and then sed runs on all your configuration files at once.

+1
source

I wrote an AutoDeriv plugin to easily and efficiently solve this problem. Story:

  • specify the resources that you want to install as received in a simple text file .derived
  • No 2.

Enjoy a clean workspace as resources are now correctly marked as “received”. The syntax is trivial, as is the .gitignore file.

In your specific case, create a .derived file in the root directory of the workspace, write target in it and do it.

I hope you enjoy it =)

+9
source

You need to remove the third line from each .classpath

 <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" output="target/classes" path="src/main/java"/> <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> <classpathentry kind="output" path="target/classes"/> </classpath> 

those. remove <classpathentry kind = "src" output = "target / classes" path = "src / main / java" />

0
source

It’s not easy to set the Derived flag automatically, see Where is the Eclipse file information about which Derivative files are stored?

This is sad because I have to mark 20 subfolders as Derived each time I clone my project on a new computer. If you do this manually, use the keyboard:

  • Alt-enter
  • Alt-v
  • Enter
  • Cursor down
  • repeat
0
source

All Articles