Reputation: 15117
I would like to mark all of my 'target' directories as 'derived' in Eclipse. However I have about 10 projects and have to repeat the same process 10 times, is there any quick way of marking all 10 'target' folders as derived?
Upvotes: 9
Views: 4236
Reputation: 2863
I wrote the AutoDeriv plugin to handle this specific task easily and efficiently. The short story:
.derived
text fileEnjoy your clean workspace as resources are now correctly marked as 'derived'. The syntax is trivial, just like a .gitignore file.
For your specific case, create a .derived
file at workspace root, write target
in it, and your done.
I hope you will like it =)
Upvotes: 13
Reputation: 9212
It is not easy to set the Derived flag automatically, see Where does Eclipse store information about which files are "Derived"?
This is sad as I have to mark 20 subfolders as "Derived" each time I clone my project on a new machine. If you do it manually too, use the keyboard:
Upvotes: 1
Reputation: 6523
You got to remove 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>
I.e. remove <classpathentry kind="src" output="target/classes" path="src/main/java"/>
Upvotes: 0
Reputation: 8044
Not sure what you mean by 'derived'. However, Eclipse writes most settings to an XML file. Figure out which config file (e.g. .classpath
) gets altered and then run sed over all your config files at once.
Upvotes: 1