0

This one I couldn't find a proper answer.

I have 2 folders. One is called 'src', where my java source code is located. The other one is called 'srcGenerated' and has a set of files created by a code generator. srcGenerated is a superset of src.

I want to use both folders as my build path on Eclipse. The problem is the duplicated files in srcGenerated. Since there is no way to supress the generation of files that are already in src, my question is, how to delete the duplicated files in srcGenerated based on the existing set of files from src.

Ant or Powershell script preferred.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Rod
  • 1
  • 1

1 Answers1

0

May not be the easiest one, but this is what I though of.

You can exclude Java files from srcGenerated that you don't want to be included while building.

Right click on project, Java Build Path

Here you can exclude all the files that you don't want to be built. I know, it's painstaking if there are hundreds of conflicting Java files. But it definitely works.

Set exclude pattern

adarshr
  • 61,315
  • 23
  • 138
  • 167
  • Hi adarshr, Thanks for your reply. Unfortunately we are talking about something like 500 files. :( What´s worst, the number of generated files increases now and then. For each new class in our UML model, something like 20 new files are added. So it isn´t an option for me. Rod –  Feb 23 '11 at 16:36